/*
  Premium application page overrides.
  Loaded after apply-styles.min.css for apply.html and subscription-apply.html.
*/

:root {
    --apply-bg: #050505;
    --apply-panel: rgba(12, 12, 10, 0.76);
    --apply-panel-strong: rgba(18, 17, 13, 0.9);
    --apply-line: rgba(215, 180, 106, 0.25);
    --apply-line-soft: rgba(215, 180, 106, 0.14);
    --apply-gold: #d7b46a;
    --apply-gold-bright: #f2d889;
    --apply-gold-deep: #9f742d;
    --apply-ivory: #f7f1df;
    --apply-muted: rgba(247, 241, 223, 0.66);
    --apply-faint: rgba(247, 241, 223, 0.42);
    --apply-red: #c95c52;
}

html {
    background: var(--apply-bg);
}

body {
    position: relative;
    overflow-x: hidden;
    color: var(--apply-ivory) !important;
    background:
        linear-gradient(rgba(215, 180, 106, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(215, 180, 106, 0.034) 1px, transparent 1px),
        radial-gradient(ellipse at 14% 8%, rgba(215, 180, 106, 0.12), transparent 30%),
        radial-gradient(ellipse at 86% 0%, rgba(215, 180, 106, 0.09), transparent 28%),
        linear-gradient(180deg, #050505 0%, #080807 48%, #050505 100%) !important;
    background-size: 46px 46px, 46px 46px, auto, auto, auto !important;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.88)),
        url("../images/hero-bg-egypt-wide.webp") center top / cover no-repeat;
    opacity: 0.32;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(215, 180, 106, 0.12), transparent 18%, transparent 82%, rgba(215, 180, 106, 0.08)),
        radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.58) 78%);
}

.apply-header {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    min-height: 330px;
    padding: 76px 24px 58px !important;
    border-bottom: 1px solid var(--apply-line-soft) !important;
    overflow: hidden;
}

.apply-header::before {
    content: "";
    position: absolute;
    inset: 28px 24px;
    z-index: -1;
    border: 1px solid rgba(215, 180, 106, 0.12);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 34%),
        linear-gradient(180deg, rgba(12, 12, 10, 0.52), rgba(12, 12, 10, 0.18));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 30px 120px rgba(0, 0, 0, 0.54);
}

.apply-header::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 40px;
    width: 160px;
    height: 1px;
    z-index: -1;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(242, 216, 137, 0.95), transparent);
    box-shadow: 0 0 22px rgba(215, 180, 106, 0.36);
}

.apply-header a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 18px;
    color: var(--apply-gold-bright) !important;
    border: 1px solid rgba(215, 180, 106, 0.28);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.42);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    letter-spacing: 0 !important;
}

.apply-header h1 {
    max-width: 980px;
    margin-top: 26px !important;
    font-size: 3rem !important;
    line-height: 1.08 !important;
    letter-spacing: 0 !important;
    text-shadow: 0 18px 60px rgba(215, 180, 106, 0.24);
}

.apply-header p {
    max-width: 760px;
    margin-top: 16px !important;
    color: var(--apply-muted) !important;
    font-size: 1rem !important;
    line-height: 1.9 !important;
}

.container {
    width: min(100% - 40px, 1040px) !important;
    max-width: none !important;
    padding: 44px 0 88px !important;
}

.step-section {
    position: relative;
    margin: 0 auto 34px !important;
    padding: 36px !important;
    overflow: hidden;
    border: 1px solid var(--apply-line) !important;
    border-radius: 8px !important;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 28%),
        linear-gradient(180deg, var(--apply-panel-strong), rgba(8, 8, 7, 0.78)) !important;
    box-shadow:
        0 28px 90px rgba(0, 0, 0, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.step-section::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(242, 216, 137, 0.72), transparent);
}

.step-section::after {
    content: "";
    position: absolute;
    inset: auto -20% -40% 38%;
    height: 220px;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(215, 180, 106, 0.09), transparent 72%);
}

.step-section > * {
    position: relative;
    z-index: 1;
}

.step-badge {
    border-radius: 999px !important;
    border-color: rgba(215, 180, 106, 0.34) !important;
    background: linear-gradient(135deg, rgba(215, 180, 106, 0.18), rgba(215, 180, 106, 0.05)) !important;
    color: var(--apply-gold-bright) !important;
    letter-spacing: 0 !important;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.28);
}

.step-section h2 {
    max-width: 900px;
    color: var(--apply-ivory) !important;
    font-size: 1.7rem !important;
    line-height: 1.35 !important;
    letter-spacing: 0 !important;
}

.step-section p,
.step-section li {
    color: var(--apply-muted) !important;
}

.info-box,
.pay-option,
.wallet-addr,
.checklist li,
#txidVerifyResult,
#applyFileDropArea {
    border-radius: 8px !important;
}

.info-box {
    padding: 22px !important;
    border-color: var(--apply-line-soft) !important;
    background:
        linear-gradient(135deg, rgba(215, 180, 106, 0.1), rgba(255, 255, 255, 0.025)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.info-box.warn {
    border-color: rgba(201, 92, 82, 0.34) !important;
    background: linear-gradient(135deg, rgba(201, 92, 82, 0.14), rgba(255, 255, 255, 0.025)) !important;
}

.info-box h4 {
    color: var(--apply-gold-bright) !important;
    letter-spacing: 0 !important;
}

.pay-grid {
    gap: 18px !important;
}

.pay-option {
    min-height: 174px;
    padding: 24px !important;
    border-color: rgba(215, 180, 106, 0.2) !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018)),
        rgba(0, 0, 0, 0.38) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: transform 500ms cubic-bezier(.16, 1, .3, 1), border-color 500ms ease, box-shadow 500ms ease;
}

.pay-option:hover {
    transform: translateY(-4px);
    border-color: rgba(242, 216, 137, 0.48) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.09),
        0 22px 54px rgba(0, 0, 0, 0.36);
}

.pay-option .price {
    color: var(--apply-gold-bright) !important;
    text-shadow: 0 0 24px rgba(215, 180, 106, 0.2);
}

.wallet-addr {
    padding: 16px !important;
    border-color: rgba(215, 180, 106, 0.26) !important;
    background:
        linear-gradient(90deg, rgba(215, 180, 106, 0.06), rgba(0, 0, 0, 0.48)),
        rgba(0, 0, 0, 0.52) !important;
    color: var(--apply-gold-bright) !important;
}

.form-row {
    gap: 22px !important;
}

.form-group label {
    color: var(--apply-ivory) !important;
    letter-spacing: 0 !important;
}

.form-group input,
.form-group select,
.form-group textarea {
    min-height: 54px;
    border-color: rgba(247, 241, 223, 0.14) !important;
    border-radius: 8px !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)) !important;
    color: var(--apply-ivory) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: rgba(215, 180, 106, 0.32) !important;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--apply-gold) !important;
    box-shadow:
        0 0 0 3px rgba(215, 180, 106, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
}

.form-group .help {
    color: var(--apply-faint) !important;
}

.check-group label {
    color: var(--apply-muted) !important;
}

.check-group input[type="checkbox"] {
    accent-color: var(--apply-gold);
}

.cta-btn,
.submit-btn {
    min-height: 52px;
    border-radius: 8px !important;
    background: linear-gradient(135deg, #d4a840 0%, #f2d889 42%, #9f742d 100%) !important;
    color: #080806 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    letter-spacing: 0 !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.42),
        0 16px 50px rgba(215, 180, 106, 0.18);
}

.cta-btn.secondary {
    color: var(--apply-gold-bright) !important;
    background: linear-gradient(135deg, rgba(215, 180, 106, 0.16), rgba(255, 255, 255, 0.035)) !important;
    border-color: rgba(215, 180, 106, 0.34) !important;
}

.cta-btn:hover,
.submit-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 22px 64px rgba(215, 180, 106, 0.26) !important;
}

.submit-btn:disabled {
    color: rgba(247, 241, 223, 0.42) !important;
    background: rgba(38, 31, 18, 0.72) !important;
    border-color: rgba(215, 180, 106, 0.14) !important;
    box-shadow: none !important;
}

.apply-footer {
    border-top: 1px solid var(--apply-line-soft) !important;
    background: rgba(0, 0, 0, 0.28);
}

.toast {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px !important;
    background: linear-gradient(135deg, rgba(215, 180, 106, 0.94), rgba(159, 116, 45, 0.94)) !important;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
}

.success-screen {
    width: min(100% - 40px, 760px);
    margin: 54px auto;
    padding: 56px 32px !important;
    border: 1px solid var(--apply-line);
    border-radius: 8px;
    background: var(--apply-panel);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
}

.scroll-reveal {
    animation: applyLuxuryReveal 900ms cubic-bezier(.16, 1, .3, 1) both;
}

.scroll-reveal:nth-of-type(2) {
    animation-delay: 120ms;
}

@keyframes applyLuxuryReveal {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 760px) {
    .apply-header {
        min-height: 250px;
        padding: 54px 18px 42px !important;
    }

    .apply-header::before {
        inset: 18px 12px;
    }

    .apply-header h1 {
        font-size: 2.2rem !important;
    }

    .apply-header p {
        font-size: 0.92rem !important;
    }

    .container {
        width: min(100% - 24px, 1040px) !important;
        padding-top: 28px !important;
    }

    .step-section {
        padding: 24px 18px !important;
        margin-bottom: 24px !important;
    }

    .step-section h2 {
        font-size: 1.36rem !important;
    }

    .form-row,
    .pay-grid {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }

    .cta-btn,
    .submit-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 420px) {
    .apply-header h1 {
        font-size: 1.9rem !important;
    }

    .step-section {
        padding: 22px 14px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   GLOBAL TYPOGRAPHY OVERRIDES (LP-style baseline adjustments)
   ========================================================================== */
.step-badge {
    font-size: 0.85rem !important; /* Was 0.7rem */
}

.pay-option .note,
.form-group .help,
.apply-footer p,
.wallet-addr .copy-hint {
    font-size: 0.85rem !important; /* Absolute minimum readable size */
}

.wallet-addr {
    font-size: 1.15rem !important; /* Was 0.7rem */
    letter-spacing: 1px !important;
}

.info-box p,
.info-box li,
.checklist li {
    font-size: 0.95rem !important; /* Was 0.82rem */
    line-height: 1.7 !important;
}

.guide-list li p {
    font-size: 0.95rem !important;
}

/* Force override inline small styles in HTML to ensure readability */
[style*="font-size: 0.7"],
[style*="font-size:0.7"],
[style*="font-size: 0.8rem"],
[style*="font-size:0.8rem"],
[style*="font-size: 0.82rem"],
[style*="font-size:0.82rem"] {
    font-size: 0.88rem !important;
}
