/* ==========================================================
   ATATÜRK ATLASI — modal.css
   Details modal, hero header, navigation panel, witness tags,
   speaker button, markdown content styles
   ========================================================== */

/* --- DETAILS MODAL BACKDROP --- */
#detailsModal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6);
    z-index: -1;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
    padding: 12px;
    opacity: 0;
    visibility: hidden;
    display: flex;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
#detailsModal.active {
    opacity: 1;
    visibility: visible;
    z-index: 9999;
}

/* --- MODAL CONTENT CARD --- */
.modal-content {
    background: #fff;
    width: 100%;
    max-width: 850px;
    height: 90vh;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.96) translateY(20px);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}
#detailsModal.active .modal-content {
    transform: scale(1) translateY(0);
}

/* --- STICKY HEADER --- */
.modal-header-sticky {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

/* --- RANK BADGE --- */
.rank-badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ffffff;
    background: #334155;
    padding: 6px 14px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 12px;
}
.rank-badge-modern:hover {
    transform: translateY(-1px);
    background: #1e293b;
}

/* --- HERO YEAR (watermark) --- */
.hero-year {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    color: rgba(203, 213, 225, 0.4);
    position: absolute;
    top: 0; right: 20px;
    z-index: 0;
    pointer-events: none;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.05em;
}

.hero-title {
    position: relative;
    z-index: 2;
    font-size: 2.25rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
    padding-right: 20px;
}

/* --- SCROLLABLE CONTENT AREA --- */
.modal-content-scrollable {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 10;
    margin-top: 0;
    padding-top: 60px; /* matches sticky header height */
}

/* --- MARKDOWN CONTENT --- */
.markdown-content { font-size: 1.05rem; line-height: 1.85; color: #334155; letter-spacing: -0.011em; }
.markdown-content h1, .markdown-content h2, .markdown-content h3 { font-weight: 800; color: #0f172a; margin-top: 2rem; margin-bottom: 0.75rem; line-height: 1.3; }
.markdown-content p { margin-bottom: 1.5rem; text-align: justify; }
.markdown-content strong { color: #1e1b4b; font-weight: 700; }
.markdown-content ul, .markdown-content ol { margin-bottom: 1.5rem; padding-left: 1.25rem; }
.markdown-content li { margin-bottom: 0.5rem; }

/* --- SPOTIFY PODCAST BUTTON --- */
.inline-spotify-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 16px;
    background: #1DB954;
    color: white;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(29, 185, 84, 0.25);
    border: 1px solid #169c46;
    text-decoration: none;
}
.inline-spotify-btn:hover {
    background: #1ED760;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(29, 185, 84, 0.35);
}
.inline-spotify-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* --- WITNESS TAGS --- */
.witness-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid #f1f5f9; }
.witness-strip-label { font-size: 0.7rem; font-weight: 800; color: #0f766e; text-transform: uppercase; letter-spacing: 0.1em; margin-right: 8px; display: flex; align-items: center; gap: 6px; }
.witness-compact-tag { font-size: 0.75rem; font-weight: 600; color: #0f766e; background: #f0fdfa; border: 1px solid #ccfbf1; padding: 4px 10px; border-radius: 6px; transition: all 0.2s; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.witness-compact-tag:hover { background: #0f766e; color: white; border-color: #0f766e; transform: translateY(-1px); }
.witness-mini-avatar { width: 16px; height: 16px; border-radius: 50%; background: rgba(15,118,110,0.2); display: flex; align-items: center; justify-content: center; font-size: 9px; }
.witness-compact-tag:hover .witness-mini-avatar { background: white; color: #0f766e; }

/* --- FLOATING NAVIGATION PANEL --- */
.nav-panel-container { position: absolute; bottom: 32px; left: 0; width: 100%; padding: 0 24px; pointer-events: none; z-index: 50; display: flex; justify-content: center; }
.nav-panel-inner { background: rgba(255,255,255,0.98); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid #cbd5e1; border-radius: 24px; padding: 8px 12px; display: flex; align-items: center; gap: 16px; box-shadow: 0 20px 40px -5px rgba(15,23,42,0.2); pointer-events: auto; width: 100%; max-width: 500px; }
.nav-dropdown { background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 12px; outline: none; padding: 10px 16px; font-size: 0.85rem; font-weight: 700; color: #1e293b; cursor: pointer; flex-grow: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; transition: border-color 0.2s; }
.nav-dropdown:hover { border-color: #94a3b8; }
.nav-btn { width: 44px; height: 44px; border-radius: 14px; background: #1e293b; color: white; display: flex; align-items: center; justify-content: center; transition: all 0.2s; border: none; flex-shrink: 0; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
.nav-btn:hover:not(:disabled) { background: #0f172a; transform: translateY(-2px) scale(1.05); box-shadow: 0 8px 12px -1px rgba(0,0,0,0.2); }
.nav-btn:disabled { opacity: 0.4; cursor: not-allowed; background: #94a3b8; }

/* --- CLOSE BUTTON --- */
.modal-close-icon-btn { width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; }
.modal-close-icon-btn:hover { color: #ef4444; transform: rotate(90deg); }
