/* Investor awareness modal - visual + responsive enhancement.
   Loaded after the modal's inline styles; overrides them via higher specificity.
   Original markup/styles in templates/investor-modal.php are left untouched. */

.investor-modal-overlay {
    background: rgba(12, 20, 40, .6);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    overflow-y: auto;
    overscroll-behavior: contain;
}

.investor-modal-overlay .investor-modal {
    max-width: 560px;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    margin: auto;
    padding: 56px clamp(20px, 5vw, 40px) clamp(24px, 4vw, 32px);
    border-radius: 24px;
    background:
        radial-gradient(120% 140px at 50% 0, rgba(41, 141, 255, .16), rgba(41, 141, 255, 0) 70%),
        linear-gradient(180deg, #f1f7ff 0, #fff 160px);
    box-shadow: 0 32px 80px rgba(12, 20, 40, .38), 0 0 0 1px rgba(255, 255, 255, .5) inset;
}

/* Top accent bar: clipped cleanly by the card's rounded corners */
.investor-modal-overlay .investor-modal::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #298dff, #5eb0ff 50%, #298dff);
}

/* Shield badge above the title (pure CSS, no markup change) */
.investor-modal-overlay .investor-modal::before {
    content: "";
    position: absolute;
    top: 25px;
    left: 50%;
    width: 44px;
    height: 44px;
    margin-left: -22px;
    border-radius: 14px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 4.5-3.4 8-8 9-4.6-1-8-4.5-8-9V6l8-3z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E") center / 24px no-repeat, linear-gradient(135deg, #4aa3ff, #1c6fe0);
    box-shadow: 0 10px 22px rgba(41, 141, 255, .38), 0 0 0 5px rgba(41, 141, 255, .12);
}

.investor-modal-overlay .investor-modal h2 {
    white-space: normal;
    margin: 22px 0 8px;
    font-size: clamp(1.25rem, 1rem + 1.6vw, 1.75rem);
    color: #0f1b3d;
    text-wrap: balance;
}

/* Short divider under the title */
.investor-modal-overlay .investor-modal h2::after {
    content: "";
    display: block;
    width: 40px;
    height: 3px;
    margin: 12px auto 0;
    border-radius: 3px;
    background: linear-gradient(90deg, #298dff, #5eb0ff);
}

.investor-modal-overlay .investor-modal ul {
    margin-top: 20px;
}

/* Bullets become soft cards with a check mark */
.investor-modal-overlay .investor-modal ul {
    display: grid;
    gap: 10px;
    margin: 0 0 22px;
}

.investor-modal-overlay .investor-modal li {
    margin: 0;
    padding: 13px 16px 13px 52px;
    font-size: clamp(.95rem, .9rem + .3vw, 1.0625rem);
    line-height: 1.4;
    color: #1d2a4d;
    background: linear-gradient(90deg, #f6faff, #fff 55%);
    border: 1px solid #e3ebf6;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(20, 30, 71, .04);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.investor-modal-overlay .investor-modal li:hover {
    border-color: #bcd7fb;
    box-shadow: 0 6px 16px rgba(41, 141, 255, .12);
    transform: translateY(-1px);
}

.investor-modal-overlay .investor-modal li::before {
    left: 14px;
    top: 50%;
    width: 24px;
    height: 24px;
    margin-top: -12px;
    box-shadow: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 13px no-repeat, linear-gradient(135deg, #4aa3ff, #1c6fe0);
    box-shadow: 0 3px 8px rgba(41, 141, 255, .3);
}

/* Link button */
.investor-modal-overlay .investor-modal-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: clamp(.8125rem, .75rem + .35vw, .9375rem);
    overflow-wrap: anywhere;
    background: linear-gradient(135deg, #298dff, #1c6fe0);
    box-shadow: 0 10px 22px rgba(41, 141, 255, .3);
}

.investor-modal-overlay .investor-modal-link::after {
    content: "\2197";
    flex: none;
    font-size: 1.1em;
}

.investor-modal-overlay .investor-modal-link:hover {
    background: linear-gradient(135deg, #1c74dc, #165bb8);
    box-shadow: 0 14px 28px rgba(41, 141, 255, .38);
}

/* Close button: larger touch target, clear focus ring */
.investor-modal-overlay .investor-modal-close {
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 22px;
    line-height: 1;
    color: #4a5670;
    background: #eef2f8;
    border: 0;
    outline: 0;
    box-shadow: none;
    transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.investor-modal-overlay .investor-modal-close:hover {
    background: #e1e8f4;
    color: #1a1a2e;
    transform: rotate(90deg);
}

/* The modal focuses this button on open: no ring/border, just a slightly darker fill */
.investor-modal-overlay .investor-modal-close:focus,
.investor-modal-overlay .investor-modal-close:focus-visible {
    outline: 0;
    box-shadow: none;
    background: #e1e8f4;
}

.investor-modal-overlay .investor-modal-link:focus-visible {
    outline: 3px solid #0f4fa8;
    outline-offset: 2px;
}

/* Tablets and below */
@media (max-width: 768px) {
    .investor-modal-overlay .investor-modal {
        border-radius: 20px;
    }
}

/* Phones: bottom-sheet feel */
@media (max-width: 480px) {
    .investor-modal-overlay {
        align-items: flex-end;
        padding: 12px;
    }

    .investor-modal-overlay .investor-modal {
        margin: 0 auto;
        padding-top: 52px;
        border-radius: 22px 22px 18px 18px;
    }

    .investor-modal-overlay .investor-modal li {
        padding: 12px 12px 12px 48px;
    }
}

/* Very small phones (<=360px) */
@media (max-width: 360px) {
    .investor-modal-overlay .investor-modal {
        padding-left: 16px;
        padding-right: 16px;
    }

    .investor-modal-overlay .investor-modal li::before {
        left: 12px;
    }
}

/* Small + short portrait screens (e.g. 320x480): compact so it fits without cramping */
@media (max-width: 480px) and (max-height: 600px) {
    .investor-modal-overlay {
        padding: 8px;
    }

    .investor-modal-overlay .investor-modal {
        max-height: calc(100dvh - 16px);
        padding: 44px 14px 14px;
        border-radius: 18px;
    }

    .investor-modal-overlay .investor-modal::before {
        top: 10px;
        width: 32px;
        height: 32px;
        margin-left: -16px;
        border-radius: 10px;
        background-size: 18px;
    }

    .investor-modal-overlay .investor-modal h2 {
        margin: 6px 36px 6px;
        font-size: 1.125rem;
    }

    .investor-modal-overlay .investor-modal h2::after {
        margin-top: 8px;
    }

    .investor-modal-overlay .investor-modal ul {
        gap: 6px;
        margin-top: 12px;
        margin-bottom: 12px;
    }

    .investor-modal-overlay .investor-modal li {
        padding: 9px 10px 9px 42px;
        font-size: .875rem;
        line-height: 1.3;
        border-radius: 12px;
    }

    .investor-modal-overlay .investor-modal li::before {
        left: 10px;
        width: 22px;
        height: 22px;
        margin-top: -11px;
    }

    .investor-modal-overlay .investor-modal-link {
        min-height: 42px;
        padding: 9px 12px;
        font-size: .75rem;
        border-radius: 12px;
    }

    .investor-modal-overlay .investor-modal-close {
        top: 10px;
        right: 10px;
        width: 34px;
        height: 34px;
    }
}

/* Short landscape screens (wide enough for 2 columns): keep everything reachable */
@media (max-height: 520px) and (min-width: 569px) {
    .investor-modal-overlay {
        align-items: flex-start;
    }

    .investor-modal-overlay .investor-modal {
        padding-top: 20px;
    }

    .investor-modal-overlay .investor-modal::before {
        display: none;
    }

    .investor-modal-overlay .investor-modal h2 {
        margin-top: 0;
    }

    .investor-modal-overlay .investor-modal ul {
        grid-template-columns: 1fr 1fr;
    }
}

/* Large screens */
@media (min-width: 1600px) {
    .investor-modal-overlay .investor-modal {
        max-width: 620px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .investor-modal-overlay .investor-modal li,
    .investor-modal-overlay .investor-modal-link,
    .investor-modal-overlay .investor-modal-close {
        transition: none;
    }

    .investor-modal-overlay .investor-modal-close:hover {
        transform: none;
    }
}
