/* ==========================================
   INVESTCOIN1 — LEAD POPUP
   Navy + gold, private-bank feel
   (moved here from WPCode; open/close lives in assets/js/skn-popup.js)
========================================== */

/* ---- Visibility: owned by skn-popup.js via .is-open ----
   !important so a leftover inline `style.display = "block"` (old WPCode JS) can't force it open. */
#skn-popup:not(.is-open),
#skn-popup-overlay:not(.is-open) { display: none !important; }
#skn-popup.is-open,
#skn-popup-overlay.is-open { display: block !important; }

html.skn-popup-lock,
html.skn-popup-lock body { overflow: hidden; }

/* ---- Design (from WPCode) ---- */

#skn-popup,
#skn-popup-overlay,
#skn-popup-trigger {
    --ic-navy: #0b1f3a;
    --ic-navy-2: #142d52;
    --ic-ink: #0f1b2d;
    --ic-text: #4a5568;
    --ic-muted: #8a94a6;
    --ic-line: #e3e7ee;
    --ic-field: #f6f8fb;
    --ic-gold: #c9a24a;
    --ic-gold-soft: rgba(201, 162, 74, 0.18);
    --ic-error: #c2410c;
}

/* Overlay */
#skn-popup-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(6, 14, 28, 0.72) !important;
    backdrop-filter: blur(6px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
    z-index: 999998 !important;
    animation: icFade 0.25s ease both;
}

/* Card */
#skn-popup {
    box-sizing: border-box !important;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;

    width: 560px !important;
    max-width: calc(100vw - 32px) !important;
    max-height: calc(100dvh - 32px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;

    background: #ffffff !important;
    color: var(--ic-ink) !important;
    border: 0 !important;
    border-radius: 16px !important;
    padding: 40px 40px 32px !important;
    margin: 0 !important;

    box-shadow:
        0 0 0 1px rgba(11, 31, 58, 0.06),
        0 24px 64px -12px rgba(6, 14, 28, 0.45) !important;

    z-index: 999999 !important;
    font-family: inherit;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    animation: icRise 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* Thin gold rule across the top */
#skn-popup::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--ic-navy) 0%, var(--ic-gold) 50%, var(--ic-navy) 100%);
}

#skn-popup *,
#skn-popup *::before,
#skn-popup *::after {
    box-sizing: border-box;
}

/* Header */
#skn-popup .skn-popup-header {
    margin: 0 0 24px !important;
    padding: 0 36px 0 0 !important;
    border: 0 !important;
}

/* Heading — the copy is long and all-caps, so keep it compact */
#skn-popup h1,
#skn-popup h2,
#skn-popup h3 {
    color: var(--ic-navy) !important;
    font-size: clamp(19px, 2.2vw, 23px) !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    letter-spacing: 0.01em !important;
    text-transform: uppercase;
    margin: 0 0 10px !important;
    padding: 0 36px 0 0 !important;
}

/* Short gold accent under the heading */
#skn-popup h1::after,
#skn-popup h2::after,
#skn-popup h3::after {
    content: "";
    display: block;
    width: 44px;
    height: 2px;
    margin-top: 14px;
    background: var(--ic-gold);
    border-radius: 2px;
}

#skn-popup p {
    color: var(--ic-text) !important;
    font-size: 14px !important;
    line-height: 1.65 !important;
    margin: 0 0 14px !important;
}

/* Labels */
#skn-popup label {
    display: block;
    color: var(--ic-ink) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.4;
    margin: 0 0 6px;
}

/* Fields */
#skn-popup input[type="text"],
#skn-popup input[type="email"],
#skn-popup input[type="tel"],
#skn-popup input[type="number"],
#skn-popup select,
#skn-popup textarea {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;

    background: var(--ic-field) !important;
    color: var(--ic-ink) !important;
    border: 1px solid var(--ic-line) !important;
    border-radius: 10px !important;

    padding: 0 16px !important;
    margin: 0 0 16px !important;

    font-family: inherit !important;
    font-size: 15px !important;
    line-height: 48px;
    outline: none !important;
    box-shadow: none !important;

    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

#skn-popup textarea {
    height: auto !important;
    min-height: 96px !important;
    padding: 12px 16px !important;
    line-height: 1.5;
    resize: vertical;
}

/* Custom select arrow */
#skn-popup select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    padding-right: 44px !important;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%230b1f3a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 12px 8px !important;
}

#skn-popup input:hover,
#skn-popup select:hover,
#skn-popup textarea:hover {
    border-color: #cfd6e2 !important;
}

#skn-popup input:focus,
#skn-popup select:focus,
#skn-popup textarea:focus {
    background-color: #ffffff !important;
    border-color: var(--ic-navy) !important;
    box-shadow: 0 0 0 4px rgba(11, 31, 58, 0.08) !important;
}

#skn-popup input::placeholder,
#skn-popup textarea::placeholder {
    color: var(--ic-muted);
    opacity: 1;
}

/* Consent checkbox */
#skn-popup input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    flex: 0 0 18px;
    width: 18px !important;
    height: 18px !important;
    min-height: 0 !important;
    margin: 2px 10px 0 0 !important;
    padding: 0 !important;
    border: 1.5px solid #b8c1d1 !important;
    border-radius: 5px !important;
    background: #fff center / 12px no-repeat !important;
    vertical-align: top;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

#skn-popup input[type="checkbox"]:checked {
    background-color: var(--ic-navy) !important;
    border-color: var(--ic-navy) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

#skn-popup input[type="checkbox"]:focus-visible {
    box-shadow: 0 0 0 4px rgba(11, 31, 58, 0.12) !important;
}

/* Consent text: small, sentence case, aligned with the box */
#skn-popup label:has(input[type="checkbox"]),
#skn-popup .wpcf7-acceptance label,
#skn-popup .wpcf7-list-item label {
    display: flex !important;
    align-items: flex-start;
    gap: 0;
    font-size: 12.5px !important;
    font-weight: 400 !important;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ic-text) !important;
    line-height: 1.55;
    margin: 4px 0 20px;
    cursor: pointer;
}

#skn-popup .wpcf7-list-item {
    margin: 0 !important;
}

/* Submit */
#skn-popup button[type="submit"],
#skn-popup input[type="submit"],
#skn-popup .wpcf7-submit {
    display: block;
    width: 100% !important;
    height: 52px !important;
    min-height: 52px;

    background: var(--ic-navy) !important;
    background-image: linear-gradient(180deg, var(--ic-navy-2), var(--ic-navy)) !important;
    color: #ffffff !important;
    border: 0 !important;
    border-radius: 10px !important;
    padding: 0 24px !important;
    margin: 4px 0 0 !important;

    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;

    cursor: pointer;
    box-shadow: 0 8px 20px -8px rgba(11, 31, 58, 0.55), inset 0 -2px 0 var(--ic-gold) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

#skn-popup button[type="submit"]:hover,
#skn-popup input[type="submit"]:hover,
#skn-popup .wpcf7-submit:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
    box-shadow: 0 12px 26px -10px rgba(11, 31, 58, 0.6), inset 0 -2px 0 var(--ic-gold) !important;
}

#skn-popup button[type="submit"]:active,
#skn-popup input[type="submit"]:active,
#skn-popup .wpcf7-submit:active {
    transform: translateY(0);
}

#skn-popup button[type="submit"]:focus-visible,
#skn-popup input[type="submit"]:focus-visible,
#skn-popup .wpcf7-submit:focus-visible {
    outline: 2px solid var(--ic-gold) !important;
    outline-offset: 3px;
}

/* Close button
   Catches #close plus any button/link with "close" in its id or class,
   and the stray theme-styled button at the top of the popup. */
#skn-popup #close,
#skn-popup :is(button, a, span, div)[id*="close" i],
#skn-popup :is(button, a, span)[class*="close" i],
#skn-popup > button:not([type="submit"]),
#skn-popup .skn-popup-header button {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    left: auto !important;
    bottom: auto !important;
    float: none !important;

    display: block !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;

    background: #f2f4f8 !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    outline: none;

    /* hide the tiny "×" text; the X is drawn below */
    font-size: 0 !important;
    line-height: 0 !important;
    color: transparent !important;
    text-indent: 0 !important;
    text-decoration: none !important;
    text-transform: none !important;

    cursor: pointer;
    z-index: 10;
    transition: background-color 0.2s ease, transform 0.25s ease;
}

/* Crisp drawn X */
#skn-popup #close::before,
#skn-popup #close::after,
#skn-popup :is(button, a, span, div)[id*="close" i]::before,
#skn-popup :is(button, a, span, div)[id*="close" i]::after,
#skn-popup :is(button, a, span)[class*="close" i]::before,
#skn-popup :is(button, a, span)[class*="close" i]::after,
#skn-popup > button:not([type="submit"])::before,
#skn-popup > button:not([type="submit"])::after,
#skn-popup .skn-popup-header button::before,
#skn-popup .skn-popup-header button::after {
    content: "" !important;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 1.75px;
    margin: 0;
    background: var(--ic-navy);
    border-radius: 2px;
    transition: background-color 0.2s ease;
}

#skn-popup #close::before,
#skn-popup :is(button, a, span, div)[id*="close" i]::before,
#skn-popup :is(button, a, span)[class*="close" i]::before,
#skn-popup > button:not([type="submit"])::before,
#skn-popup .skn-popup-header button::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

#skn-popup #close::after,
#skn-popup :is(button, a, span, div)[id*="close" i]::after,
#skn-popup :is(button, a, span)[class*="close" i]::after,
#skn-popup > button:not([type="submit"])::after,
#skn-popup .skn-popup-header button::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

#skn-popup #close:hover,
#skn-popup :is(button, a, span, div)[id*="close" i]:hover,
#skn-popup :is(button, a, span)[class*="close" i]:hover,
#skn-popup > button:not([type="submit"]):hover,
#skn-popup .skn-popup-header button:hover {
    background: var(--ic-navy) !important;
    transform: rotate(90deg);
}

#skn-popup #close:hover::before,
#skn-popup #close:hover::after,
#skn-popup :is(button, a, span, div)[id*="close" i]:hover::before,
#skn-popup :is(button, a, span, div)[id*="close" i]:hover::after,
#skn-popup :is(button, a, span)[class*="close" i]:hover::before,
#skn-popup :is(button, a, span)[class*="close" i]:hover::after,
#skn-popup > button:not([type="submit"]):hover::before,
#skn-popup > button:not([type="submit"]):hover::after,
#skn-popup .skn-popup-header button:hover::before,
#skn-popup .skn-popup-header button:hover::after {
    background: #ffffff;
}

#skn-popup #close:focus-visible,
#skn-popup :is(button, a, span, div)[id*="close" i]:focus-visible,
#skn-popup :is(button, a, span)[class*="close" i]:focus-visible,
#skn-popup > button:not([type="submit"]):focus-visible,
#skn-popup .skn-popup-header button:focus-visible {
    box-shadow: 0 0 0 3px var(--ic-gold-soft), 0 0 0 1px var(--ic-gold) !important;
}

/* "INVESTCOIN" sits above the main heading: make it a small gold eyebrow
   so there's only one gold rule, under the real headline. */
#skn-popup :is(h1, h2, h3):has(+ :is(h1, h2, h3)) {
    color: var(--ic-gold) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.22em !important;
    margin: 0 0 10px !important;
}

#skn-popup :is(h1, h2, h3):has(+ :is(h1, h2, h3))::after {
    display: none !important;
}

/* Links (privacy policy) */
#skn-popup a:not(#close):not([id*="close" i]):not([class*="close" i]) {
    color: var(--ic-navy) !important;
    font-weight: 600;
    text-decoration: underline !important;
    text-decoration-color: var(--ic-gold) !important;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
}

#skn-popup a:not(#close):not([id*="close" i]):not([class*="close" i]):hover {
    color: var(--ic-gold) !important;
}

/* Contact Form 7 validation + messages */
#skn-popup .wpcf7-form-control-wrap {
    display: block;
    position: relative;
}

#skn-popup .wpcf7-not-valid {
    border-color: var(--ic-error) !important;
    background-color: #fff8f5 !important;
}

#skn-popup .wpcf7-not-valid-tip {
    color: var(--ic-error) !important;
    font-size: 12px !important;
    margin: -10px 0 12px !important;
}

#skn-popup .wpcf7-response-output {
    margin: 16px 0 0 !important;
    padding: 12px 14px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    border-width: 1px !important;
}

#skn-popup .wpcf7-spinner {
    display: block;
    margin: 10px auto 0 !important;
}

/* Mobile */
@media (max-width: 767px) {
    #skn-popup {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        max-height: calc(100dvh - 20px) !important;
        padding: 32px 20px 24px !important;
        border-radius: 14px !important;
    }

    #skn-popup h1,
    #skn-popup h2,
    #skn-popup h3 {
        font-size: 18px !important;
        padding-right: 40px !important;
    }

    #skn-popup .skn-popup-header {
        padding-right: 0 !important;
        margin-bottom: 20px !important;
    }

    /* 16px stops iOS zooming into fields */
    #skn-popup input[type="text"],
    #skn-popup input[type="email"],
    #skn-popup input[type="tel"],
    #skn-popup input[type="number"],
    #skn-popup select,
    #skn-popup textarea {
        font-size: 16px !important;
        margin-bottom: 14px !important;
    }

    #skn-popup #close,
    #skn-popup :is(button, a, span, div)[id*="close" i],
    #skn-popup :is(button, a, span)[class*="close" i],
    #skn-popup > button:not([type="submit"]),
    #skn-popup .skn-popup-header button {
        top: 12px !important;
        right: 12px !important;
    }
}

/* ---- Floating "reopen" button (navy + gold to match the card) ---- */
#skn-popup-trigger {
    position: fixed;
    /* sit left of the theme's #go-top button (fixed, right/bottom 20px, 35x35) */
    right: 66px;
    bottom: 20px;
    z-index: 999990;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0 20px;
    height: 46px;

    background: var(--ic-navy) !important;
    background-image: linear-gradient(180deg, var(--ic-navy-2), var(--ic-navy)) !important;
    color: #ffffff !important;
    border: 0 !important;
    border-radius: 999px !important;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
    cursor: pointer;

    box-shadow: 0 12px 28px -10px rgba(6, 14, 28, 0.6), inset 0 -2px 0 var(--ic-gold) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
    animation: icFade 0.3s ease both;
}

#skn-popup-trigger[hidden] { display: none; }
#skn-popup-trigger span { color: var(--ic-gold); font-size: 14px; }
#skn-popup-trigger:hover { filter: brightness(1.12); transform: translateY(-2px); }
#skn-popup-trigger:focus-visible { outline: 2px solid var(--ic-gold); outline-offset: 3px; }
html.skn-popup-lock #skn-popup-trigger { visibility: hidden; }

@media (max-width: 767px) {
    #skn-popup-trigger { right: 64px; bottom: 16px; height: 40px; padding: 0 16px; font-size: 12px; }
}

/* Animations */
@keyframes icFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes icRise {
    from { opacity: 0; transform: translate(-50%, calc(-50% + 14px)) scale(0.98); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    #skn-popup,
    #skn-popup *,
    #skn-popup-overlay,
    #skn-popup-trigger {
        transition: none !important;
        animation: none !important;
    }
}
