/* Beverage checkout and payment cards use the order sheet and profile tokens. */
[data-beverage-payment] {
    margin: 0 0 16px;
}

[data-beverage-payment][hidden],
[data-beverage-cart][hidden],
[data-beverage-method-trigger][hidden],
[data-beverage-payment-picker][hidden],
[data-beverage-new-card][hidden],
.combo-ui-sheet [data-combo-ui-confirm][hidden],
.bp-beverage-remove-confirm[hidden] {
    display: none;
}

.beverage-cart-footer:has([data-beverage-cart]:not([hidden])) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: center;
    gap: 12px;
    padding-bottom: 8px;
}

.beverage-cart-footer:has([data-beverage-cart]:not([hidden])) .sum-total {
    display: grid;
    min-width: 0;
    gap: 1px;
    padding: 0;
    text-align: right;
}

.beverage-cart-footer:has([data-beverage-cart] .bp-beverage-cart-pending) {
    grid-template-columns: minmax(0, 1fr);
}

.beverage-cart-footer:has([data-beverage-cart] .bp-beverage-cart-pending) .sum-total {
    display: none;
}

.bp-beverage-cart-pending {
    color: var(--bp-espresso-2);
    font-size: 13px;
    font-weight: 700;
}

body:has(#cart-screen.active .beverage-cart-footer:not([hidden])) > [data-cart-added-toast] {
    display: none;
}

.bp-beverage-method {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 9px;
    min-height: 56px;
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--bp-border);
    border-radius: 14px;
    background: var(--bp-paper);
    color: var(--bp-fg);
    text-align: left;
}

.bp-beverage-method svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
}

.bp-beverage-method .bp-beverage-method-chevron {
    width: 16px;
    height: 16px;
    color: var(--bp-espresso-2);
}

.bp-beverage-method small,
.bp-beverage-method strong {
    display: block;
}

.bp-beverage-method small {
    color: var(--bp-espresso-2);
    font-size: 11px;
    line-height: 1.25;
}

.bp-beverage-method strong {
    font-size: 14px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.bp-beverage-method:disabled {
    cursor: default;
}

.combo-ui-sheet [data-beverage-wallet-source] {
    display: none;
}

#combo-order-modal[data-beverage-dialog] {
    --bp-beverage-dialog-inset: max(20px, var(--bp-safe-top, 0px), env(safe-area-inset-top, 0px));
    padding-top: var(--bp-beverage-dialog-inset);
}

#combo-order-modal[data-beverage-dialog] .combo-ui-sheet {
    max-height: calc(100dvh - var(--bp-beverage-dialog-inset) - 10px);
}

#combo-order-modal[data-beverage-dialog] #combo-ui-sheet-title {
    margin-inline-end: 56px;
    overflow-wrap: anywhere;
    white-space: normal;
}

body:has(#combo-order-modal[data-beverage-dialog]) .bw-badge {
    display: none;
    pointer-events: none;
}

.bp-beverage-sheet-dismiss {
    position: sticky;
    top: 6px;
    z-index: 4;
    height: 0;
    pointer-events: none;
}

.bp-beverage-sheet-dismiss .combo-ui-close {
    top: 0;
    right: 0;
    min-width: 44px;
    min-height: 44px;
    pointer-events: auto;
}

.combo-ui-sheet[data-beverage-checkout-pane="new-card"] > [data-combo-ui-confirm] {
    white-space: normal;
}

.combo-ui-sheet:is([data-beverage-checkout-pane="picker"], [data-beverage-checkout-pane="new-card"]) >
    :is(.combo-ui-review-lines, .upsell-total, .combo-soft, .combo-stock-problem) {
    display: none;
}

.bp-beverage-pane-back {
    min-height: 44px;
    margin-bottom: 4px;
    color: var(--bp-espresso-2);
    font-size: 14px;
    font-weight: 700;
}

.bp-beverage-picker-legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.bp-beverage-fieldset + [data-beverage-picker-apply] {
    margin-top: 10px;
}

.bp-beverage-fieldset {
    min-width: 0;
    border: 0;
    padding: 0;
}

.bp-beverage-fieldset legend {
    margin-bottom: 8px;
    color: var(--bp-fg);
    font-size: 13px;
    font-weight: 800;
}

.bp-beverage-option {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    margin-bottom: 6px;
    padding: 8px 12px;
    border: 1px solid var(--bp-border);
    border-radius: 12px;
    background: var(--bp-paper);
    color: var(--bp-fg);
    cursor: pointer;
}

.bp-beverage-option:has(input:checked) {
    border-color: var(--bp-pistachio-d);
    background: var(--bp-pistachio-xxl);
}

.bp-beverage-option:has(input:disabled) {
    opacity: .55;
    cursor: default;
}

.bp-beverage-option input {
    flex: none;
    width: 18px;
    height: 18px;
    accent-color: var(--bp-pistachio-d);
}

.bp-beverage-option strong,
.bp-beverage-option small {
    display: block;
}

.bp-beverage-option small {
    color: var(--bp-espresso-2);
    font-size: 12px;
    line-height: 1.35;
}

.bp-beverage-consent {
    margin-top: 10px;
}

.bp-beverage-hint {
    margin: 2px 0 0 34px;
    color: var(--bp-espresso-2);
    font-size: 12px;
    line-height: 1.5;
}

.bp-beverage-hint a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.bp-beverage-consent-details {
    margin-left: 34px;
    color: var(--bp-espresso-2);
    font-size: 12px;
    line-height: 1.5;
}

.bp-beverage-consent-details summary {
    min-height: 32px;
    padding: 7px 0;
    color: var(--bp-fg);
    cursor: pointer;
    font-weight: 700;
}

.bp-beverage-consent-details p {
    margin-bottom: 6px;
    overflow-wrap: anywhere;
}

.bp-beverage-profile {
    width: 100%;
    text-align: left;
}

.bp-beverage-status {
    margin: 0 0 14px;
    color: var(--bp-espresso-2);
}

.bp-beverage-status:empty {
    display: none;
}

.bp-beverage-pending-amount:not([hidden]) {
    font-weight: 700;
}

.bp-beverage-widget:not([hidden]) {
    margin-bottom: 14px;
    min-width: 0;
}

.bp-beverage-widget iframe {
    max-width: 100%;
}

.bp-beverage-card-entry,
.bp-beverage-issuer {
    min-width: 0;
    margin-bottom: 12px;
}

.bp-beverage-card-entry iframe,
.bp-beverage-issuer iframe {
    display: block;
    width: 100%;
    border: 0;
}

.bp-beverage-card-entry iframe {
    height: 154px;
}

.bp-beverage-issuer iframe {
    height: min(460px, 64dvh);
    min-height: 280px;
}

#combo-order-modal[data-beverage-issuer-active] {
    padding: 0;
    background: #fff;
    backdrop-filter: none;
}

#combo-order-modal[data-beverage-dialog][data-beverage-issuer-active] > .combo-ui-sheet {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto minmax(0, 1fr);
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    padding: max(var(--bp-safe-top, 0px), env(safe-area-inset-top, 0px), var(--tg-content-safe-area-inset-top, 0px))
        max(env(safe-area-inset-right, 0px), var(--tg-content-safe-area-inset-right, 0px))
        max(var(--bp-safe-bottom, 0px), env(safe-area-inset-bottom, 0px), var(--tg-content-safe-area-inset-bottom, 0px))
        max(env(safe-area-inset-left, 0px), var(--tg-content-safe-area-inset-left, 0px));
    overflow: hidden;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    animation: none;
}

#combo-order-modal[data-beverage-dialog][data-beverage-issuer-active] #combo-ui-sheet-title {
    grid-area: 1 / 1;
    align-self: center;
    margin: 0;
    padding: 8px 0 8px 16px;
    color: var(--bp-fg);
    font-size: 16px;
    line-height: 1.25;
}

[data-beverage-issuer-active] .bp-beverage-sheet-dismiss {
    grid-area: 1 / 2;
    position: static;
    height: auto;
    padding: 6px 12px;
}

[data-beverage-issuer-active] .bp-beverage-sheet-dismiss .combo-ui-close {
    position: static;
}

[data-beverage-issuer-active] .combo-ui-sheet > :is(.combo-ui-grab, .bp-beverage-actions, .bp-beverage-widget, [data-beverage-pending-amount]) {
    display: none;
}

[data-beverage-issuer-active] [data-beverage-payment-status] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    overflow: hidden;
    clip-path: inset(50%);
}

[data-beverage-issuer-active] .bp-beverage-issuer {
    grid-area: 2 / 1 / 3 / 3;
    min-height: 0;
    margin: 0;
    border-top: 1px solid var(--bp-border);
}

[data-beverage-issuer-active] .bp-beverage-issuer iframe {
    height: 100%;
    min-height: 0;
}

.bp-beverage-card-entry [hidden],
.bp-beverage-issuer[hidden] {
    display: none;
}

.bp-beverage-card-security {
    margin: -4px 0 12px;
    color: var(--bp-espresso-2);
    font-size: 12px;
    line-height: 1.4;
}

.bp-beverage-cards {
    display: grid;
    gap: 8px;
    list-style: none;
}

[data-beverage-card-list] {
    display: grid;
    gap: 16px;
}

[data-beverage-card-list] > :is(.bp-beverage-status, .bp-beverage-cards, .bp-beverage-resumes) {
    margin: 0;
}

.bp-beverage-cards li {
    padding: 0 12px;
    border: 1px solid var(--bp-border);
    border-radius: 12px;
    background: var(--bp-paper);
}

.bp-beverage-card-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 52px;
}

.bp-beverage-card-summary svg {
    flex: none;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
}

.bp-beverage-card-summary small {
    display: block;
    color: var(--bp-espresso-2);
}

.bp-beverage-card-summary button {
    min-height: 44px;
    margin-left: auto;
    padding: 0 4px;
    color: var(--bp-error);
    font-size: 13px;
    font-weight: 700;
}

.bp-beverage-remove-confirm {
    padding: 10px 0 12px;
    border-top: 1px solid var(--bp-border);
}

.bp-beverage-remove-confirm p {
    margin-bottom: 8px;
}

.bp-beverage-add .btn {
    margin-top: 14px;
}

.bp-beverage-actions {
    display: grid;
    gap: 8px;
}

.bp-beverage-actions:empty {
    display: none;
}

.bp-beverage-resumes {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

[data-beverage-payment] :is(button, input, a, summary):focus-visible,
[data-beverage-cart] button:focus-visible,
[data-beverage-payment-picker] :is(button, input):focus-visible,
[data-beverage-card-list] :is(button, input, a, summary):focus-visible,
.bp-beverage-actions button:focus-visible,
.bp-beverage-profile:focus-visible {
    outline: 2px solid var(--bp-pistachio-d);
    outline-offset: 3px;
}
