/* ==========================================================================
   FortMU - Ice Blue Cookie Banner & Legal Modal (TOS, Privacy, Refunds, Cookies)
   Theme: Electric Blue / Neon Cyan / Deep Navy Glassmorphism
   ========================================================================== */

/* --- BLUR BACKDROP OVERLAY FOR INITIAL VISIT --- */
.fm-cookie-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 6, 18, 0.75);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    z-index: 999998;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.45s ease, visibility 0.45s ease;
    pointer-events: auto;
}

.fm-cookie-backdrop.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* --- COOKIE FLOATING BANNER (BLUE THEME) --- */
.fm-cookie-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    width: 95%;
    max-width: 1240px;
    background: linear-gradient(180deg, rgba(7, 18, 36, 0.96) 0%, rgba(3, 10, 22, 0.98) 100%);
    border: 1px solid rgba(0, 210, 255, 0.35);
    border-radius: 12px;
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.92), 0 0 25px rgba(0, 210, 255, 0.22);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    z-index: 999999;
    opacity: 1;
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.fm-cookie-bar.is-hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(50px);
    pointer-events: none;
    visibility: hidden;
}

.fm-cookie-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.fm-cookie-icon-wrapper {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d2ff 0%, #0284c7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.fm-cookie-icon-wrapper svg {
    width: 26px;
    height: 26px;
    fill: #ffffff;
}

.fm-cookie-text {
    color: #e2e8f0;
    font-size: 13.5px;
    line-height: 1.5;
    margin: 0;
    font-family: 'PT Sans', sans-serif;
}

.fm-cookie-link {
    color: #00d2ff;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.fm-cookie-link:hover {
    color: #38bdf8;
    text-decoration: underline;
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.7);
}

.fm-cookie-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.fm-cookie-btn {
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 700;
    border-radius: 8px;
    padding: 10px 24px;
    transition: all 0.2s ease;
    font-family: 'PT Sans', sans-serif;
    letter-spacing: 0.3px;
}

.fm-cookie-btn-decline {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: #94a3b8;
}

.fm-cookie-btn-decline:hover {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(56, 189, 248, 0.5);
    color: #f1f5f9;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.fm-cookie-btn-accept {
    background: linear-gradient(180deg, #00b4d8 0%, #0077b6 100%);
    border: 1px solid #00d2ff;
    color: #ffffff;
    padding: 10px 28px;
    box-shadow: 0 0 18px rgba(0, 180, 216, 0.45);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.fm-cookie-btn-accept:hover {
    background: linear-gradient(180deg, #00d2ff 0%, #0096c7 100%);
    border-color: #7dd3fc;
    box-shadow: 0 0 25px rgba(0, 210, 255, 0.7);
    transform: translateY(-1px);
}

.fm-cookie-btn-accept:active {
    transform: translateY(0);
}

/* --- LEGAL POPUP MODAL (BLUE THEME) --- */
.fm-legal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(1, 4, 12, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-sizing: border-box;
}

.fm-legal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.fm-legal-modal {
    width: 100%;
    max-width: 880px;
    max-height: 88vh;
    background: #040e1d;
    border: 1px solid rgba(0, 210, 255, 0.35);
    border-radius: 12px;
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.95), 0 0 35px rgba(0, 210, 255, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.fm-legal-overlay.is-open .fm-legal-modal {
    transform: scale(1);
}

/* Modal Header & Tabs */
.fm-legal-header {
    background: linear-gradient(180deg, #07172e 0%, #040e1d 100%);
    border-bottom: 1px solid rgba(0, 210, 255, 0.25);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.fm-legal-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.fm-legal-tab {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    padding: 7px 15px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'PT Sans', sans-serif;
}

.fm-legal-tab:hover {
    background: rgba(0, 210, 255, 0.12);
    color: #00d2ff;
    border-color: rgba(0, 210, 255, 0.35);
}

.fm-legal-tab.active {
    background: linear-gradient(180deg, #00b4d8 0%, #0077b6 100%);
    color: #ffffff;
    border-color: #00d2ff;
    box-shadow: 0 0 14px rgba(0, 210, 255, 0.45);
}

.fm-legal-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
    transition: color 0.2s, background 0.2s;
}

.fm-legal-close-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

/* Modal Body & Custom Blue/Cyan Scrollbar */
.fm-legal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
    color: #cbd5e1;
    font-size: 13.5px;
    line-height: 1.65;
    font-family: 'PT Sans', sans-serif;
}

.fm-legal-body::-webkit-scrollbar {
    width: 7px;
}

.fm-legal-body::-webkit-scrollbar-track {
    background: #020710;
}

.fm-legal-body::-webkit-scrollbar-thumb {
    background: #00b4d8;
    border-radius: 4px;
    box-shadow: 0 0 6px rgba(0, 210, 255, 0.5);
}

.fm-legal-body::-webkit-scrollbar-thumb:hover {
    background: #00d2ff;
}

/* Content Typography */
.fm-legal-pane {
    display: none;
}

.fm-legal-pane.active {
    display: block;
    animation: fmFadeIn 0.25s ease-out;
}

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

.fm-legal-pane h2 {
    color: #00d2ff;
    font-size: 19px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 210, 255, 0.25);
    font-family: 'Cinzel', serif;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

.fm-legal-pane h3 {
    color: #38bdf8;
    font-size: 15.5px;
    font-weight: 700;
    margin-top: 22px;
    margin-bottom: 8px;
}

.fm-legal-pane p {
    margin-bottom: 12px;
    color: #cbd5e1;
}

.fm-legal-pane ol, .fm-legal-pane ul {
    margin-bottom: 14px;
    padding-left: 22px;
}

.fm-legal-pane li {
    margin-bottom: 6px;
    color: #cbd5e1;
}

.fm-legal-pane strong {
    color: #38bdf8;
}

.fm-legal-pane a {
    color: #00d2ff;
    text-decoration: underline;
}

.fm-legal-pane a:hover {
    color: #7dd3fc;
}

.fm-legal-highlight-box {
    background: rgba(0, 210, 255, 0.08);
    border-left: 3px solid #00d2ff;
    padding: 12px 16px;
    border-radius: 0 6px 6px 0;
    margin: 16px 0;
    font-weight: 600;
    color: #bae6fd;
}

/* Modal Footer */
.fm-legal-footer {
    background: #030a14;
    border-top: 1px solid rgba(0, 210, 255, 0.2);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fm-legal-btn-close {
    background: #07172e;
    border: 1px solid rgba(0, 210, 255, 0.4);
    color: #00d2ff;
    font-size: 13.5px;
    font-weight: 700;
    border-radius: 8px;
    padding: 9px 36px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'PT Sans', sans-serif;
}

.fm-legal-btn-close:hover {
    background: #0d2850;
    border-color: #00d2ff;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.4);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .fm-cookie-bar {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
        bottom: 10px;
    }
    .fm-cookie-actions {
        width: 100%;
        justify-content: flex-end;
    }
    .fm-legal-tabs {
        width: 100%;
    }
    .fm-legal-tab {
        flex: 1 1 40%;
        text-align: center;
        justify-content: center;
    }
}
