/* =========================================================================
   pay.css — /pay page: astralink-style two-column layout, MSE dark/gold theme
   ========================================================================= */

/* ── Reset for pay page ──────────────────────────────────────────────────── */
.pay-body {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    overflow-x: hidden;
}

/* ── Minimal Header ──────────────────────────────────────────────────────── */
.pay-header {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(5, 5, 6, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pay-header__inner {
    width: min(100% - 28px, 1280px);
    margin-inline: auto;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pay-header__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.pay-header__logo img {
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    object-fit: cover;
}

.pay-header__brand {
    font-family: var(--font-display, 'Onest'), sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: var(--text, #f4f1ea);
    letter-spacing: -0.01em;
}

.pay-header__login {
    font-family: var(--font-display, 'Onest'), sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted, #9b9488);
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(8px);
    transition: color 0.15s, border-color 0.15s;
    text-decoration: none;
}

.pay-header__login:hover {
    color: var(--text, #f4f1ea);
    border-color: rgba(255, 255, 255, 0.18);
}

/* ── Main layout ─────────────────────────────────────────────────────────── */
.pay-main {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 48px 0;
}

.pay-grid {
    width: min(100% - 28px, 1100px);
    margin-inline: auto;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 60px;
    align-items: center;
}

/* ── LEFT COLUMN ─────────────────────────────────────────────────────────── */
.pay-left__inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pay-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 100px;
    background: rgba(243, 197, 90, 0.10);
    border: 1px solid rgba(243, 197, 90, 0.22);
    color: var(--yellow, #f3c55a);
    font-family: var(--font-display, 'Onest'), sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    width: fit-content;
}

.pay-title {
    font-family: var(--font-display, 'Onest'), sans-serif;
    font-size: clamp(36px, 5vw, 58px);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.03em;
    color: var(--text, #f4f1ea);
    margin: 0;
}

.pay-title__accent {
    background: linear-gradient(135deg, #ffe2a2 0%, #f3c55a 50%, #e8a93c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pay-subtitle {
    font-size: 16px;
    color: var(--muted, #9b9488);
    line-height: 1.65;
    margin: 0;
    max-width: 440px;
}

.pay-features {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pay-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text, #f4f1ea);
    opacity: 0.9;
}

.pay-feature__check {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(243, 197, 90, 0.12);
    border: 1.5px solid rgba(243, 197, 90, 0.30);
    color: var(--yellow, #f3c55a);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── RIGHT COLUMN — CARD ─────────────────────────────────────────────────── */
.pay-right {
    /* intentionally no extra padding — card handles it */
}

.pay-card {
    background: rgba(12, 12, 14, 0.90);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.pay-card::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(243, 197, 90, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.pay-card__head {
    text-align: center;
}

.pay-card__title {
    font-family: var(--font-display, 'Onest'), sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--text, #f4f1ea);
    margin: 0 0 4px;
}

.pay-card__sub {
    font-size: 13px;
    color: var(--muted, #9b9488);
    margin: 0;
}

/* ── Plan tabs ───────────────────────────────────────────────────────────── */
.pay-tabs {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pay-tab {
    flex: 1 1 0;
    min-width: 0;
    padding: 9px 6px;
    border-radius: 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted, #9b9488);
    font-family: var(--font-display, 'Onest'), sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    text-align: center;
    white-space: nowrap;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
}

.pay-tab:hover {
    border-color: rgba(243, 197, 90, 0.30);
    color: var(--text, #f4f1ea);
    background: rgba(243, 197, 90, 0.04);
}

.pay-tab:focus-visible {
    box-shadow: 0 0 0 2px rgba(243, 197, 90, 0.5);
}

.pay-tab--active {
    border-color: var(--yellow, #f3c55a);
    background: rgba(243, 197, 90, 0.10);
    color: var(--yellow, #f3c55a);
}

/* ── Plan info ───────────────────────────────────────────────────────────── */
.pay-plan-info {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pay-plan-info__price-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}

.pay-plan-info__old {
    font-size: 16px;
    color: var(--muted, #9b9488);
    text-decoration: line-through;
}

.pay-plan-info__price {
    font-family: var(--font-display, 'Onest'), sans-serif;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #ffe2a2, #f3c55a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.pay-plan-info__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--muted, #9b9488);
}

.pay-plan-info__discount {
    color: var(--yellow, #f3c55a);
    font-weight: 600;
}

/* ── Form ────────────────────────────────────────────────────────────────── */
.pay-error {
    background: rgba(239, 68, 68, 0.10);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
    color: #fca5a5;
    line-height: 1.5;
}

.pay-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pay-input {
    width: 100%;
    padding: 15px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    color: var(--text, #f4f1ea);
    font-family: var(--font-body, 'Manrope'), sans-serif;
    font-size: 15px;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.pay-input::placeholder {
    color: var(--muted, #9b9488);
    opacity: 0.65;
}

.pay-input:focus {
    border-color: rgba(243, 197, 90, 0.55);
    background: rgba(243, 197, 90, 0.03);
}

.pay-btn {
    width: 100%;
    min-height: 54px;
    padding: 14px 20px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #ffe1a0, #f2bf51);
    color: #090909;
    font-family: var(--font-display, 'Onest'), sans-serif;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 251, 234, 0.55), 0 8px 28px rgba(242, 191, 81, 0.22);
    transition: opacity 0.18s, transform 0.12s;
}

.pay-btn:hover:not(:disabled) {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 252, 234, 0.65), 0 12px 36px rgba(242, 191, 81, 0.28);
}

.pay-btn:active:not(:disabled) {
    transform: translateY(0);
}

.pay-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pay-btn__price {
    opacity: 0.75;
    font-size: 0.9em;
    font-weight: 700;
}

.pay-legal {
    font-size: 11px;
    color: var(--muted, #9b9488);
    opacity: 0.65;
    line-height: 1.6;
    text-align: center;
    margin: 0;
}

.pay-legal a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── Renewal disclosure ──────────────────────────────────────────────────── */
.pay-plan-info__renewal {
    font-size: 12px;
    color: var(--muted, #9b9488);
    opacity: 0.85;
    margin: 2px 0 0;
    line-height: 1.5;
}

/* ── Consent checkbox ────────────────────────────────────────────────────── */
.pay-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.pay-consent input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.pay-consent__box {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #090909;
    transition: background 0.15s, border-color 0.15s;
    margin-top: 1px;
}

.pay-consent__box svg {
    opacity: 0;
    transition: opacity 0.12s;
}

.pay-consent input:checked + .pay-consent__box {
    background: linear-gradient(135deg, #ffe1a0, #f2bf51);
    border-color: rgba(255, 225, 156, 0.9);
}

.pay-consent input:checked + .pay-consent__box svg {
    opacity: 1;
}

.pay-consent input:focus-visible + .pay-consent__box {
    box-shadow: 0 0 0 2px rgba(243, 197, 90, 0.5);
}

.pay-consent__text {
    font-size: 12px;
    color: var(--muted, #9b9488);
    line-height: 1.55;
}

.pay-consent__link {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: var(--yellow, #f3c55a);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.pay-consent__link:hover {
    color: var(--yellow-soft, #ffe2a2);
}

/* ── Subscription terms modal ────────────────────────────────────────────── */
.pay-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.pay-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.pay-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 480px);
    max-height: 86dvh;
    overflow-y: auto;
    background: rgba(14, 14, 16, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 20px;
    padding: 28px 26px;
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.6);
}

.pay-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted, #9b9488);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pay-modal__close:hover {
    color: var(--text, #f4f1ea);
}

.pay-modal__title {
    font-family: var(--font-display, 'Onest'), sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--text, #f4f1ea);
    margin: 0 0 16px;
}

.pay-modal__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pay-modal__list li {
    font-size: 13.5px;
    color: var(--muted, #9b9488);
    line-height: 1.6;
    padding-left: 18px;
    position: relative;
}

.pay-modal__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--yellow, #f3c55a);
    opacity: 0.6;
}

.pay-modal__list strong {
    color: var(--text, #f4f1ea);
}

.pay-modal__list em {
    font-style: normal;
    color: var(--yellow-soft, #ffe2a2);
}

/* ── Trust row ───────────────────────────────────────────────────────────── */
.pay-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--muted, #9b9488);
    opacity: 0.7;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 16px;
    margin-top: -4px;
}

.pay-trust__lock {
    display: flex;
    color: var(--yellow, #f3c55a);
    opacity: 0.7;
}

/* Reuse checkout payment method badges from main.css */
.checkout-payment-method {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 216, 128, 0.18);
    background: rgba(255, 216, 128, 0.06);
    color: rgba(245, 241, 232, 0.9);
    font-family: var(--font-display, 'Onest'), sans-serif;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1;
}

.checkout-payment-method--sbp {
    color: #ffe2a3;
    background: linear-gradient(135deg, rgba(255, 216, 128, 0.14), rgba(255, 216, 128, 0.04));
}

.checkout-payment-method--card {
    color: #dce6f7;
    border-color: rgba(132, 159, 202, 0.26);
    background: rgba(132, 159, 202, 0.08);
}

.checkout-payment-method--ru {
    min-width: 30px;
    color: #f5f1e8;
    border-color: rgba(255, 255, 255, 0.14);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0 33%, rgba(43, 91, 190, 0.18) 33% 66%, rgba(214, 52, 62, 0.2) 66% 100%),
        rgba(8, 16, 29, 0.72);
}

/* ── Minimal Footer ──────────────────────────────────────────────────────── */
.pay-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 0;
}

.pay-footer__inner {
    width: min(100% - 28px, 1280px);
    margin-inline: auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 20px;
    font-size: 12px;
    color: var(--muted, #9b9488);
    opacity: 0.55;
}

.pay-footer__inner a {
    color: inherit;
    text-decoration: none;
}

.pay-footer__inner a:hover {
    opacity: 1;
    color: var(--text, #f4f1ea);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

/* Tablet: narrower grid */
@media (max-width: 960px) {
    .pay-grid {
        grid-template-columns: 1fr 380px;
        gap: 36px;
    }
    .pay-title {
        font-size: clamp(30px, 5vw, 46px);
    }
}

/* Mobile: single column */
@media (max-width: 720px) {
    .pay-main {
        padding: 24px 0 32px;
        align-items: flex-start;
    }

    .pay-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* On mobile: hide the left hero, show only card */
    .pay-left {
        display: none;
    }

    .pay-card {
        padding: 24px 18px;
        border-radius: 20px;
    }

    .pay-plan-info__price {
        font-size: 36px;
    }
}

/* Mobile landscape / small screens: show condensed left */
@media (max-width: 720px) and (min-width: 481px) {
    .pay-left {
        display: block;
        margin-bottom: 24px;
    }
    .pay-features { display: none; }
    .pay-subtitle { display: none; }
    .pay-badge { display: none; }
    .pay-title { font-size: 28px; margin-bottom: 0; }
    .pay-grid { gap: 20px; }
}

.hide-mobile {
    display: inline;
}

@media (max-width: 720px) {
    .hide-mobile { display: none; }
}

/* Very narrow */
@media (max-width: 380px) {
    .pay-tab {
        font-size: 12px;
        padding: 8px 4px;
    }
    .pay-card {
        padding: 20px 14px;
    }
}
