.mobile-stream-tip-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 140ms ease;
}

.mobile-stream-tip-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-stream-tip-sheet {
    width: min(100%, 460px);
    margin: 0 auto;
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
    border-radius: 18px 18px 0 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    color: #050505;
    box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.16);
    transform: translateY(12px);
    transition: transform 160ms ease;
    max-height: min(72dvh, 660px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-padding-bottom: calc(42px + env(safe-area-inset-bottom, 0px));
}

.mobile-stream-tip-sheet::-webkit-scrollbar {
    display: none;
}

.mobile-stream-tip-backdrop.is-checkout-open {
    align-items: flex-end;
}

.mobile-stream-tip-backdrop.is-checkout-open .mobile-stream-tip-sheet {
    max-height: min(84dvh, 760px);
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
}

@supports not (height: 100dvh) {
    .mobile-stream-tip-sheet {
        max-height: min(58vh, 560px);
    }

    .mobile-stream-tip-backdrop.is-checkout-open .mobile-stream-tip-sheet {
        max-height: min(78vh, 720px);
    }

    .mobile-stream-tip-element {
        max-height: none;
    }
}

.mobile-stream-tip-backdrop.is-open .mobile-stream-tip-sheet {
    transform: translateY(0);
}

.mobile-stream-tip-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.mobile-stream-tip-title {
    margin: 0;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.01em;
}

.mobile-stream-tip-subtitle {
    margin: 4px 0 0;
    color: #6b7280;
    font-size: 12px;
    font-weight: 750;
}

.mobile-stream-tip-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: #f0f0f0;
    color: #111;
    font-size: 15px;
}

.mobile-stream-tip-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 10px;
}

.mobile-stream-tip-amount {
    min-height: 66px;
    border: 1px solid #dedede;
    border-radius: 14px;
    background: #fff;
    color: #111;
    font-size: 16px;
    font-weight: 900;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    line-height: 1.1;
}

#mobile-stream-tip-backdrop .mobile-stream-tip-amount span,
#mobile-stream-tip-backdrop .mobile-stream-tip-amount small,
#mobile-stream-tip-backdrop .mobile-stream-tip-amount:focus span,
#mobile-stream-tip-backdrop .mobile-stream-tip-amount:focus small,
#mobile-stream-tip-backdrop .mobile-stream-tip-amount:active span {
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

#mobile-stream-tip-backdrop .mobile-stream-tip-amount small {
    font-size: 8.5px;
    font-weight: 850;
    letter-spacing: 0.01em;
    opacity: 0.72 !important;
}

.mobile-stream-tip-amount.is-selected {
    border-color: #111;
    background: #111;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

#mobile-stream-tip-backdrop .mobile-stream-tip-amount.is-selected span,
#mobile-stream-tip-backdrop .mobile-stream-tip-amount.is-selected small,
#mobile-stream-tip-backdrop .mobile-stream-tip-amount.is-selected:focus span,
#mobile-stream-tip-backdrop .mobile-stream-tip-amount.is-selected:focus small,
#mobile-stream-tip-backdrop .mobile-stream-tip-amount.is-selected:active span {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.mobile-stream-tip-estimate {
    margin: 0 0 12px;
    color: #6b7280;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}

.mobile-stream-tip-custom {
    width: 100%;
    min-height: 48px;
    margin-bottom: 14px;
    padding: 0 14px;
    border: 1px solid #dedede;
    border-radius: 14px;
    background: #fff;
    color: #111;
    -webkit-text-fill-color: #111;
    font-size: 14px;
    font-weight: 800;
    box-sizing: border-box;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 120ms ease, box-shadow 120ms ease;
    text-align: left;
}

.mobile-stream-tip-custom.is-active {
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.mobile-stream-tip-custom span {
    color: #111;
    -webkit-text-fill-color: #111;
}

.mobile-stream-tip-keypad {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: -4px 0 14px;
}

.mobile-stream-tip-keypad.is-open {
    display: grid;
}

.mobile-stream-tip-keypad button {
    min-height: 42px;
    border: 1px solid #e0e0e0;
    border-radius: 14px;
    background: #f8f8f8;
    color: #111;
    -webkit-text-fill-color: #111;
    font-size: 17px;
    font-weight: 900;
    -webkit-tap-highlight-color: transparent;
}

.mobile-stream-tip-element {
    display: none;
    margin: 12px 0 14px;
    padding: 14px;
    border: 1px solid #e6e6e6;
    border-radius: 14px;
    background: #fafafa;
    max-height: none;
    overflow: visible;
    scrollbar-width: none;
    scroll-padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
}

.mobile-stream-tip-element.is-ready {
    display: block;
}

.mobile-stream-tip-element::-webkit-scrollbar {
    display: none;
}

.mobile-stream-tip-fastpay {
    margin: 4px 0 10px;
}

.mobile-stream-tip-express {
    display: none;
    min-height: 56px;
}

.mobile-stream-tip-express.is-ready {
    display: block;
}

.mobile-stream-tip-primary {
    width: 100%;
    min-height: 54px;
    margin-top: 10px;
    border: 0;
    border-radius: 16px;
    background: #111;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    font-size: 15px;
    font-weight: 900;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1 !important;
    padding: 0 18px;
}

.mobile-stream-tip-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 26px 10px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 800;
}

.mobile-stream-tip-divider::before,
.mobile-stream-tip-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #ececec;
}

.mobile-stream-tip-backdrop.is-checkout-open .mobile-stream-tip-primary {
    position: sticky;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 4;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.mobile-stream-tip-primary span {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
}

.mobile-stream-tip-primary:disabled {
    opacity: 0.55;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

.mobile-stream-tip-status {
    min-height: 18px;
    margin-top: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 750;
    text-align: center;
}

[data-theme="dark"] .mobile-stream-tip-sheet,
[data-theme="dark-accent"] .mobile-stream-tip-sheet {
    border-color: rgba(255, 255, 255, 0.12);
    background: #111;
    color: #fff;
}

[data-theme="dark"] .mobile-stream-tip-subtitle,
[data-theme="dark"] .mobile-stream-tip-status,
[data-theme="dark"] .mobile-stream-tip-estimate,
[data-theme="dark-accent"] .mobile-stream-tip-subtitle,
[data-theme="dark-accent"] .mobile-stream-tip-status,
[data-theme="dark-accent"] .mobile-stream-tip-estimate {
    color: rgba(255, 255, 255, 0.68);
}

[data-theme="dark"] .mobile-stream-tip-divider::before,
[data-theme="dark"] .mobile-stream-tip-divider::after,
[data-theme="dark-accent"] .mobile-stream-tip-divider::before,
[data-theme="dark-accent"] .mobile-stream-tip-divider::after {
    background: rgba(255, 255, 255, 0.14);
}

[data-theme="dark"] .mobile-stream-tip-close,
[data-theme="dark-accent"] .mobile-stream-tip-close {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

[data-theme="dark"] .mobile-stream-tip-amount,
[data-theme="dark"] .mobile-stream-tip-custom,
[data-theme="dark-accent"] .mobile-stream-tip-amount,
[data-theme="dark-accent"] .mobile-stream-tip-custom {
    border-color: rgba(255, 255, 255, 0.14);
    background: #171717;
    color: #fff;
}

[data-theme="dark"] .mobile-stream-tip-custom span,
[data-theme="dark-accent"] .mobile-stream-tip-custom span,
[data-theme="dark"] .mobile-stream-tip-keypad button,
[data-theme="dark-accent"] .mobile-stream-tip-keypad button {
    color: #fff;
    -webkit-text-fill-color: #fff;
}

[data-theme="dark"] .mobile-stream-tip-keypad button,
[data-theme="dark-accent"] .mobile-stream-tip-keypad button {
    border-color: rgba(255, 255, 255, 0.14);
    background: #171717;
}

[data-theme="dark"] .mobile-stream-tip-amount.is-selected,
[data-theme="dark-accent"] .mobile-stream-tip-amount.is-selected {
    border-color: #fff;
    background: #fff;
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
}

[data-theme="dark"] .mobile-stream-tip-amount.is-selected span,
[data-theme="dark-accent"] .mobile-stream-tip-amount.is-selected span {
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
}
