﻿/* Checkout modal: Legacy layout, BERDA arcade skin (square, steel, Russo/Tektur). */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.payment-modal-open {
    overflow: hidden;
}

.payment-email-modal.checkout-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: rgba(6, 12, 22, 0.78);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 200ms ease, visibility 200ms ease;
}

.payment-email-modal.checkout-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.payment-email-modal[hidden] {
    display: none;
}

.checkout-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.checkout-modal {
    position: relative;
    z-index: 1;
    width: min(1080px, 100%);
    max-height: min(92vh, 880px);
    overflow: auto;
    border: 1px solid rgba(127, 178, 232, 0.22);
    background: #16202c;
    box-shadow: 8px 8px 0 #081426;
    color: #e8eef6;
    opacity: 0;
    transform: translateY(18px) scale(0.97);
    transition: opacity 220ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.payment-email-modal.is-visible .checkout-modal {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.checkout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.35rem 0.35rem;
}

.checkout-header h2 {
    margin: 0;
    padding-right: 0;
    color: #f5f9ff;
    font-size: 1.05rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1.2;
}

.checkout-close {
    position: static;
    width: 2.2rem;
    height: 2.2rem;
    border: 1px solid rgba(160, 197, 245, 0.2);
    background: rgba(20, 42, 68, 0.86);
    color: #d6e7ff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 1.6rem;
    line-height: 1;
}

.checkout-close:hover {
    color: #fff;
    background: rgba(40, 70, 104, 0.9);
}

.checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 1.15rem;
    padding: 1rem 1.35rem 1.35rem;
}

.checkout-block,
.checkout-summary {
    min-width: 0;
    border: 1px solid rgba(127, 178, 232, 0.16);
    background: rgba(12, 20, 30, 0.72);
    padding: 1rem 1.05rem;
}

.checkout-step {
    margin: 0 0 0.85rem;
    color: var(--muted, #9db0cc);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.checkout-country-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
}

.checkout-country-dd {
    position: relative;
    min-width: 240px;
}

.checkout-country-toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(8, 16, 26, 0.85);
    color: inherit;
    padding: 0.6rem 0.8rem;
    text-align: left;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease;
}

.checkout-country-toggle:hover,
.checkout-country-toggle.is-open {
    border-color: rgba(62, 207, 106, 0.5);
    background: rgba(10, 22, 34, 0.95);
}

.checkout-country-flag {
    display: inline-flex;
}

.checkout-flag {
    width: 1.5rem;
    height: 1rem;
    overflow: hidden;
    flex: 0 0 auto;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.checkout-flag-lg {
    width: 2rem;
    height: 1.35rem;
}

.checkout-country-name {
    flex: 1;
    font-size: 0.92rem;
}

.checkout-country-chevron {
    display: inline-flex;
    width: 0.75rem;
    color: var(--muted, #9db0cc);
    transition: transform 180ms ease;
}

.checkout-country-chevron.is-open {
    transform: rotate(180deg);
}

.checkout-country-chevron svg {
    width: 100%;
}

.checkout-country-list {
    position: absolute;
    z-index: 30;
    top: calc(100% + 0.4rem);
    left: 0;
    right: 0;
    margin: 0;
    padding: 0.35rem;
    list-style: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #121c28;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
    max-height: 17rem;
    overflow: auto;
}

.checkout-country-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    padding: 0.55rem 0.65rem;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: background 130ms ease;
}

.checkout-country-option:hover {
    background: rgba(255, 255, 255, 0.06);
}

.checkout-country-option.is-active {
    background: rgba(62, 207, 106, 0.12);
}

.checkout-country-option span {
    flex: 1;
}

.checkout-country-tick {
    flex: 0 0 auto !important;
    color: #7dce88;
    font-size: 0.8rem;
}

.checkout-greeting {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.35rem 1.35rem 0;
    border: 1px solid rgba(62, 207, 106, 0.28);
    background: linear-gradient(100deg, rgba(62, 207, 106, 0.12), rgba(62, 207, 106, 0.04));
    padding: 0.7rem 0.9rem;
    animation: checkout-greet-in 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.checkout-greeting p {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.4;
    color: #cde8d2;
}

.checkout-greeting-flag {
    display: inline-flex;
    flex: 0 0 auto;
    transform-origin: 50% 100%;
    animation: checkout-flag-wiggle 900ms ease-out;
}

@keyframes checkout-greet-in {
    from { opacity: 0; transform: translateY(-10px) scale(0.97); }
    to { opacity: 1; transform: none; }
}

@keyframes checkout-flag-wiggle {
    0% { transform: rotate(-14deg) scale(0.5); }
    35% { transform: rotate(8deg) scale(1); }
    55% { transform: rotate(-6deg); }
    75% { transform: rotate(4deg); }
    100% { transform: none; }
}

.checkout-auto {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    color: #8fd89a;
    font-size: 0.8rem;
}

.checkout-hint,
.checkout-legal {
    margin: 0.7rem 0 0;
    color: var(--muted, #9db0cc);
    font-size: 0.78rem;
    line-height: 1.45;
}

.checkout-legal a {
    color: #7dce88;
}

.checkout-methods {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.7rem;
}

.checkout-methods:has(.checkout-method:only-child) {
    grid-template-columns: 1fr;
}

.checkout-method {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    min-width: 0;
    min-height: 4.6rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 18, 28, 0.85);
    padding: 0.8rem;
    text-align: left;
    color: inherit;
    cursor: pointer;
    font: inherit;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
    animation: checkout-method-in 320ms ease both;
}

.checkout-method:hover {
    border-color: rgba(62, 207, 106, 0.4);
    transform: translateY(-2px);
}

.checkout-method.is-selected {
    border-color: #3ecf6a;
    background: rgba(62, 207, 106, 0.08);
}

.checkout-method-copy {
    flex: 1 1 0;
    min-width: 0;
}

.checkout-method strong,
.checkout-method small {
    display: block;
    overflow-wrap: anywhere;
}

.checkout-method small {
    margin-top: 0.2rem;
    color: var(--muted, #9db0cc);
    font-size: 0.75rem;
}

.checkout-radio {
    width: 0.95rem;
    height: 0.95rem;
    margin-top: 0.15rem;
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    flex: 0 0 auto;
}

.checkout-radio.is-on {
    border-color: #3ecf6a;
    box-shadow: inset 0 0 0 3px #3ecf6a;
}

.checkout-method-art {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2.6rem;
    height: 2.6rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.checkout-method-art svg,
.checkout-method-art img {
    width: 1.7rem;
    height: 1.7rem;
    object-fit: contain;
}

.checkout-method.is-selected .checkout-method-art {
    transform: scale(1.08);
    box-shadow: 0 0 14px rgba(62, 207, 106, 0.25);
}

.checkout-method-art-sbp {
    background: rgba(255, 255, 255, 0.92);
}

.checkout-method-art-tpay {
    background: #ffdd2d;
}

.checkout-method-art-card {
    background: rgba(76, 132, 189, 0.16);
}

.checkout-security {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 0.9rem;
}

.checkout-security p {
    margin: 0.2rem 0 0;
    color: var(--muted, #9db0cc);
    font-size: 0.78rem;
    line-height: 1.4;
}

.checkout-shield svg,
.checkout-lock svg {
    width: 1.7rem;
    height: 1.7rem;
}

.checkout-lock {
    margin-left: auto;
    align-self: center;
    color: rgba(255, 255, 255, 0.35);
}

.checkout-email-block .checkout-hint {
    margin-top: 0;
}

.payment-email-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-top: 0.7rem;
}

.payment-email-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    min-height: 42px;
    border: 1px solid rgba(160, 197, 245, 0.3);
    background: #10243b;
    color: #d6e7ff;
    padding: 0 12px;
    font: inherit;
    font-size: 15px;
}

.payment-email-input::placeholder {
    color: rgba(214, 231, 255, 0.48);
}

.payment-email-input[readonly] {
    background: rgba(16, 36, 59, 0.68);
    color: #b9c9dd;
}

.payment-email-change[hidden] {
    display: none;
}

.payment-subscription-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
    color: rgba(157, 176, 204, 0.55);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.3;
}

.payment-subscription-consent[hidden] {
    display: none;
}

.payment-subscription-consent input {
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    margin: 2px 0 0;
    opacity: 0.45;
    accent-color: #6b7c94;
}

.checkout-product {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.checkout-product img {
    width: 3.6rem;
    height: 3.6rem;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.06);
    padding: 0.3rem;
}

.checkout-product p {
    margin: 0.25rem 0 0;
    color: var(--muted, #9db0cc);
    font-size: 0.78rem;
}

.checkout-product-badge {
    display: none;
    margin-left: 0.5rem;
    background: rgba(62, 207, 106, 0.16);
    color: #7dce88;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.15rem 0.55rem;
    vertical-align: middle;
}

.checkout-product-badge.is-on {
    display: inline-block;
}

.checkout-facts {
    display: grid;
    gap: 0.55rem;
    margin: 0;
}

.checkout-facts div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.88rem;
}

.checkout-facts dt {
    color: var(--muted, #9db0cc);
}

.checkout-facts dd {
    margin: 0;
    text-align: right;
    color: #e8eef6;
}

.checkout-method-bonus {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.35rem;
    color: #f8c544;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.checkout-method-bonus-icon {
    width: 0.9rem;
    height: 0.9rem;
}

.payment-email-change {
    flex: 0 0 auto;
    white-space: nowrap;
}

.checkout-benefits {
    display: grid;
    gap: 0.55rem;
    margin: 1rem 0 0;
    padding: 0.85rem 0.9rem;
    list-style: none;
    border: 1px solid rgba(62, 207, 106, 0.18);
    background: rgba(62, 207, 106, 0.05);
    font-size: 0.82rem;
}

.checkout-benefits[hidden] {
    display: none;
}

.checkout-benefits li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    line-height: 1.35;
}

.checkout-benefit-icon {
    flex: 0 0 auto;
    display: inline-flex;
    width: 1.25rem;
    height: 1.25rem;
}

.checkout-benefit-icon svg {
    width: 100%;
    height: 100%;
}

.checkout-benefit-icon-coin {
    animation: checkout-coin-spin 2.4s ease-in-out 3s infinite;
}

.checkout-benefit-icon-save {
    animation: checkout-save-bob 1.6s ease-in-out 2.4s infinite;
}

.checkout-benefit-icon-ice {
    animation: checkout-ice-spin 14s linear infinite;
}

@keyframes checkout-coin-spin {
    0%, 70%, 100% { transform: rotateY(0); }
    85% { transform: rotateY(360deg); }
}

@keyframes checkout-save-bob {
    0%, 70%, 100% { transform: none; }
    85% { transform: translateY(-2.5px); }
}

@keyframes checkout-ice-spin {
    to { transform: rotate(360deg); }
}

@keyframes checkout-method-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

.checkout-total-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.85rem;
}

.checkout-total-row span {
    color: var(--muted, #9db0cc);
    font-size: 0.85rem;
}

.checkout-total-row strong {
    color: #f8c544;
    font-size: 1.45rem;
    font-weight: 800;
    animation: checkout-total-pop 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes checkout-total-pop {
    from { transform: scale(1.12); opacity: 0.4; }
    to { transform: none; opacity: 1; }
}

.checkout-cta {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1.1rem;
    border: 2px solid rgba(238, 246, 255, 0.28);
    background: linear-gradient(180deg, #4c84bd, #356ca2);
    color: #eef6ff;
    padding: 0.95rem 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 4px 4px 0 #081426;
    transition: background 180ms ease, transform 120ms ease;
}

.checkout-cta::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%);
    background-size: 250% 100%;
    animation: checkout-cta-sheen 3.2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes checkout-cta-sheen {
    0%, 55% { background-position: 160% 0; }
    100% { background-position: -90% 0; }
}

.checkout-cta:hover:not(:disabled) {
    background: linear-gradient(180deg, #5b94cc, #3f77ae);
}

.checkout-cta:active:not(:disabled) {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 #081426;
}

.checkout-cta:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.checkout-cta:disabled::after {
    display: none;
}

.checkout-error {
    margin: 0.7rem 0 0;
    color: #ffb2a3;
    font-size: 0.82rem;
}

.payment-email-input:focus-visible,
.checkout-close:focus-visible,
.payment-email-change:focus-visible,
.checkout-method:focus-visible,
.checkout-country-toggle:focus-visible,
.checkout-cta:focus-visible {
    outline: 2px solid var(--ui-focus-ring, #7fb2e8);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .payment-email-modal,
    .checkout-modal,
    .checkout-greeting,
    .checkout-greeting-flag,
    .checkout-method,
    .checkout-benefit-icon,
    .checkout-cta::after,
    .checkout-total-row strong {
        animation: none !important;
        transition: none !important;
    }
}

@media (max-width: 860px) {
    .payment-email-modal.checkout-overlay {
        padding: 0;
        align-items: stretch;
    }

    .checkout-modal {
        width: 100%;
        max-height: 100vh;
        box-shadow: none;
    }

    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .checkout-methods {
        grid-template-columns: 1fr;
    }

    .checkout-summary {
        order: -1;
    }

    .payment-email-row {
        flex-direction: column;
    }
}
