/*
 * Cart and checkout blocks. Built on WooCommerce's own totals classes so the
 * rows line up with the ones around them; only what those classes do not cover
 * is styled here.
 */

.wc-store-balance-form__row {
    margin: 0;
}

.wc-store-balance-form__input input {
    text-transform: uppercase;
}

.wc-store-balance-form__input.has-error input {
    border-color: #cc1818;
}

.wc-store-balance-form__button[aria-disabled='true'] {
    opacity: 0.6;
    cursor: progress;
}

.wc-store-balance__error {
    margin: 8px 0 0;
    color: #cc1818;
}

.wc-store-balance__note {
    margin: 8px 0 0;
    font-size: 0.875em;
}

.wc-store-balance__note.is-success {
    font-weight: 600;
}

.wc-store-balance-form__codes {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.wc-store-balance-form__code {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 4px 8px 12px;
    margin-top: 6px;
    border-radius: 4px;
    background: color-mix(in srgb, currentColor 7%, transparent);
}

.wc-store-balance-form__code-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.wc-store-balance-form__code-name {
    font-weight: 600;
}

.wc-store-balance-form__code-detail {
    font-size: 0.875em;
}

.wc-store-balance-form__code.has-reason .wc-store-balance-form__code-detail {
    color: #cc1818;
}

/* A text button, but with the 44px a thumb needs. */
.wc-store-balance-form__remove {
    flex: 0 0 auto;
    min-width: 44px;
    min-height: 44px;
    padding: 0 8px;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.wc-store-balance-form__remove:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -2px;
}

.wc-store-balance-summary__toggle-label {
    display: block;
}

.wc-store-balance-summary__detail {
    display: block;
    font-size: 0.875em;
}

.wc-store-balance-summary__account + .wc-store-balance-summary__applied,
.wc-store-balance__note + .wc-store-balance-summary__applied {
    margin-top: 12px;
}

.wc-store-balance-summary__applied .wc-block-components-totals-item__value {
    white-space: nowrap;
}

/* A link inside a notice or an error: recognisable as one whatever the theme does to links in the checkout. */
.wc-store-balance__store-link {
    text-decoration: underline;
    font-weight: 600;
    color: inherit;
}
