/* ============================================================
   JLIVE — Legal Information & Privacy Policy
   MDPI Scholarly Legal Layout in JLIVE Oxford Blue & Gold Palette
   ============================================================ */

.mdpi-legal-page {
    background-color: #f4f6f9;
    min-height: 90vh;
    padding-top: calc(var(--nav-height, 72px) + 28px);
    padding-bottom: 70px;
    font-family: var(--font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    color: #2b3648;
}

.mdpi-legal-container {
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
}

/* --- Layout Grid: Sidebar + Main Content --- */
.mdpi-legal-layout {
    display: grid;
    grid-template-columns: 260px 1fr auto;
    gap: 28px;
    align-items: start;
}

/* ============================================================
   LEFT SIDEBAR: Legal Information Navigation
   ============================================================ */
.mdpi-legal-sidebar {
    position: sticky;
    top: calc(var(--nav-height, 72px) + 20px);
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.sidebar-main-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--navy, #0A1F44);
    margin: 0 0 18px 0;
    letter-spacing: -0.2px;
}

/* Nav Section Group */
.sidebar-nav-group {
    margin-bottom: 12px;
}

.sidebar-tab-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    padding: 6px 0;
    text-align: left;
    font-size: 14.5px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: color 0.15s ease;
    text-decoration: none;
}

.sidebar-tab-btn:hover {
    color: var(--navy, #0A1F44);
}

.sidebar-tab-btn.active {
    color: var(--navy, #0A1F44);
    font-weight: 700;
}

/* Sub-items (Bullets under Privacy Policy) */
.sidebar-sub-list {
    list-style: none;
    margin: 6px 0 14px 0;
    padding: 0 0 0 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-sub-item {
    position: relative;
    padding-left: 18px;
}

.sidebar-sub-item::before {
    content: "•";
    position: absolute;
    left: 4px;
    top: 0;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.4;
    transition: color 0.15s ease;
}

.sidebar-sub-link {
    display: block;
    font-size: 13px;
    line-height: 1.45;
    color: #64748b;
    text-decoration: none;
    transition: all 0.15s ease;
    padding: 2px 0;
}

.sidebar-sub-link:hover {
    color: var(--navy, #0A1F44);
}

.sidebar-sub-item.active .sidebar-sub-link {
    color: var(--navy, #0A1F44);
    font-weight: 600;
}

.sidebar-sub-item.active::before {
    color: var(--gold, #C9A84C);
}

/* Divider line matching MDPI */
.sidebar-divider {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 14px 0;
}

/* ============================================================
   MAIN CONTENT AREA: MDPI Scholarly White Card
   ============================================================ */
.mdpi-content-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 44px 52px;
    box-shadow: 0 2px 12px rgba(10, 31, 68, 0.03);
    min-height: 800px;
}

/* Tab Panels */
.legal-tab-panel {
    display: none;
}

.legal-tab-panel.active {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

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

/* Document Title */
.mdpi-doc-title {
    font-family: var(--font-display, 'IBM Plex Serif', Georgia, serif);
    font-size: 29px;
    font-weight: 700;
    color: var(--navy, #0A1F44);
    margin: 0 0 18px 0;
    letter-spacing: -0.3px;
    line-height: 1.25;
}

/* Document Intro */
.mdpi-doc-intro {
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
    margin: 0 0 32px 0;
    padding-bottom: 22px;
    border-bottom: 1px solid #f1f5f9;
}

/* ============================================================
   MDPI NUMBERED SECTION SYSTEM (e.g. 1 Scope, 1.1 Text)
   ============================================================ */

/* Main Section Header Row: e.g. "1  Scope" */
.mdpi-section-row {
    display: flex;
    align-items: baseline;
    gap: 18px;
    margin-top: 32px;
    margin-bottom: 14px;
    scroll-margin-top: calc(var(--nav-height, 72px) + 30px);
}

.mdpi-section-num {
    min-width: 44px;
    font-family: var(--font-mono, 'DM Mono', monospace);
    font-size: 15px;
    font-weight: 700;
    color: var(--navy, #0A1F44);
    flex-shrink: 0;
}

.mdpi-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--navy, #0A1F44);
    margin: 0;
    letter-spacing: -0.1px;
}

/* Subsection Row: e.g. "1.1  This website is made available..." */
.mdpi-sub-row {
    display: flex;
    align-items: baseline;
    gap: 18px;
    margin-bottom: 18px;
    scroll-margin-top: calc(var(--nav-height, 72px) + 30px);
}

.mdpi-sub-num {
    min-width: 44px;
    font-family: var(--font-mono, 'DM Mono', monospace);
    font-size: 13.5px;
    font-weight: 600;
    color: #64748b;
    flex-shrink: 0;
}

.mdpi-sub-content {
    flex: 1;
    font-size: 13.8px;
    line-height: 1.68;
    color: #334155;
}

.mdpi-sub-content p {
    margin: 0 0 8px 0;
}

.mdpi-sub-content p:last-child {
    margin-bottom: 0;
}

/* Sub-bullets inside subsections */
.mdpi-bullet-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 10px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mdpi-bullet-list li {
    position: relative;
    padding-left: 18px;
    font-size: 13.5px;
    line-height: 1.55;
    color: #334155;
}

.mdpi-bullet-list li::before {
    content: "•";
    position: absolute;
    left: 4px;
    top: 0;
    color: var(--gold, #C9A84C);
    font-weight: bold;
    font-size: 15px;
}

/* Subtle link styling within text */
.mdpi-sub-content a {
    color: var(--navy, #0A1F44);
    text-decoration: underline;
    text-decoration-color: rgba(10, 31, 68, 0.3);
    text-underline-offset: 2px;
    transition: color 0.15s, text-decoration-color 0.15s;
}

.mdpi-sub-content a:hover {
    color: var(--gold, #C9A84C);
    text-decoration-color: var(--gold, #C9A84C);
}

/* ============================================================
   RIGHT FLOATING ACTION BUTTONS (Share, Contact, Download PDF)
   ============================================================ */
.mdpi-floating-actions {
    position: sticky;
    top: calc(var(--nav-height, 72px) + 20px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
}

.floating-action-btn {
    width: 42px;
    height: 42px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #334155;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
}

.floating-action-btn:hover {
    background: #f8fafc;
    border-color: var(--navy, #0A1F44);
    color: var(--navy, #0A1F44);
    box-shadow: 0 3px 8px rgba(10, 31, 68, 0.1);
    transform: translateY(-1px);
}

.floating-action-btn svg {
    width: 18px;
    height: 18px;
}

/* Tooltip for floating buttons */
.floating-action-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--navy, #0A1F44);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 500;
    padding: 5px 9px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.floating-action-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Toast message for link copied */
#toast-notification {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: var(--navy, #0A1F44);
    color: #ffffff;
    border-left: 3px solid var(--gold, #C9A84C);
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

#toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */
@media (max-width: 1080px) {
    .mdpi-legal-layout {
        grid-template-columns: 240px 1fr;
    }

    .mdpi-floating-actions {
        display: none;
    }
}

@media (max-width: 860px) {
    .mdpi-legal-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .mdpi-legal-sidebar {
        position: static;
    }

    .mdpi-content-card {
        padding: 28px 24px;
    }

    .mdpi-doc-title {
        font-size: 24px;
    }

    .mdpi-section-row, .mdpi-sub-row {
        gap: 12px;
    }

    .mdpi-section-num, .mdpi-sub-num {
        min-width: 36px;
    }
}
