/**
 * TerfiUI v5 - Akıllı Mevzuat Okuyucu & Detay Sayfası CSS (assets/css/pages/legislation.css)
 * Tüm Fonksiyonel Modüller, Not Defteri, Sesli Ders, Modallar, Görünüm Modları & v1 Stilleri
 */

:root {
    --hub-primary: #1d4ed8;
    --hub-bg: #f8fafc;
    --hub-text-main: #1e293b;
    --hub-text-muted: #64748b;
    --hub-border: #e2e8f0;

    --leg-bg: #ffffff;
    --leg-border: #e2e8f0;
    --leg-border-hover: #3b82f6;
    --leg-text: #1e3a8a;
    --leg-accent: #10b981;
    --leg-q-btn: #8b5cf6;
    --leg-q-btn-hover: #7c3aed;
    --leg-voice-btn: #f59e0b;
    --leg-voice-btn-hover: #d97706;

    --note-sidebar-bg: #ffffff;
    --note-sidebar-header: #ca8a04;
    --note-card-bg: #fffbeb;
    --note-card-border: #fde68a;
}

/* ── 1. GLOBAL & KAPSAYICI DÜZENLEMELERİ ─────────────────────────────────────── */
html, body {
    overflow-x: hidden !important;
}

.full-bleed-container,
.full-content-body,
.hub-page-wrapper,
.hub-page-content,
.gd-page-body {
    width: 100%;
    box-sizing: border-box;
}

/* ── 2. ÜST NAVİGASYON VE KONTROL BARI (GÖRSEL 2 İLE %100 BİREBİR) ─────────────── */
.hub-nav-bar {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 20px;
    box-shadow: none;
}

.nav-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.gd-leg-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.gd-leg-top-btn {
    height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.15s ease;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #334155;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.gd-leg-top-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.gd-leg-top-btn.btn-back:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

.gd-leg-top-btn.btn-questions {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.gd-leg-top-btn.btn-questions:hover {
    background: #dbeafe;
    color: #1e40af;
}

.gd-leg-top-btn.btn-facts {
    background: #fffbeb;
    border-color: #fde68a;
    color: #b45309;
}

.gd-leg-top-btn.btn-facts:hover {
    background: #fef3c7;
    color: #92400e;
}

.font-controls-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.view-mode-selector {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
    height: 30px;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.view-btn {
    width: 26px;
    height: 24px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.view-btn:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.view-btn.active {
    background: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(29, 78, 216, 0.25);
}

.gd-leg-btn-notes {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #b45309;
    font-weight: 700;
    font-size: 0.78rem;
    height: 30px;
    padding: 0 12px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.gd-leg-btn-notes:hover {
    background: #fde68a;
    color: #92400e;
}

.font-btn-compact {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0f172a;
    font-weight: 800;
    font-size: 11.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.font-btn-compact:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* ── 3. MEVZUAT BAŞLIK KARTI ─────────────────────────────────────────────────── */
.hub-cat-trigger {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    margin-bottom: 20px;
}

.hub-cat-trigger:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.hub-cat-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hub-cat-title-text {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── 4. İLERLEME VE TAHMİNİ OKUMA PANELİ ─────────────────────────────────────── */
.overall-progress-card {
    background: #ffffff;
    border: 1px solid var(--hub-border);
    border-radius: 16px;
    padding: 12px 20px;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    width: fit-content;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.overall-progress-card.full-progress {
    width: 100%;
    display: block;
    padding: 18px 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
}

.overall-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.overall-progress-title {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.overall-progress-title .title-label {
    color: #0f172a;
    font-weight: 900;
    font-size: 14.5px;
}

.gd-leg-est-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-left: 20px;
    background: transparent;
    padding: 0;
    border: none;
}

.gd-leg-est-time strong {
    color: #0f172a;
    font-weight: 800;
}

.gd-leg-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gd-leg-filter-pills {
    display: inline-flex;
    align-items: center;
    background: #e2e8f0;
    padding: 3px;
    border-radius: 12px;
    gap: 2px;
}

.gd-leg-filter-pill {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    padding: 6px 16px;
    border-radius: 9px;
    border: none;
    text-decoration: none;
    transition: all 0.15s ease;
}

.gd-leg-filter-pill:hover {
    color: #1e293b;
}

.gd-leg-filter-pill.active {
    background: #ffffff;
    color: #1d4ed8;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.overall-progress-value {
    font-size: 16px;
    font-weight: 900;
    color: #1d4ed8;
    margin-left: 4px;
}

.overall-progress-bar-bg {
    height: 10px;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.overall-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #00b4d8 50%, #10b981 100%);
    border-radius: 10px;
    transition: width 0.5s ease-out;
}

.gd-leg-progress-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
}

#legCompletedLabel {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    font-size: 13px;
    color: #10b981;
}

/* ── 5. CANLI ARAMA KUTUSU ────────────────────────────────────────────────────── */
.leg-search-box {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.leg-search-input-wrapper {
    position: relative;
}

.leg-search-input-wrapper i#legSearchIcon,
.gd-leg-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.leg-search-input {
    width: 100%;
    height: 48px;
    padding: 12px 20px 12px 48px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    font-size: 14.5px;
    color: #0f172a;
    background: #ffffff;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
}

.leg-search-input:focus {
    outline: none;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

.leg-search-clear {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    cursor: pointer;
    display: none;
}

/* ── 6. GÖRÜNÜM MODLARI (CARDS, COMPACT, ACCORDION, TIMELINE) ─────────────────── */
#legislation-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.03);
    margin-bottom: 30px;
}

.leg-group {
    margin-bottom: 30px;
}

.leg-group-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--hub-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.leg-group-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--hub-border);
}

/* A) KART GÖRÜNÜMÜ (view-style-cards - Default 2 Grid) */
.view-style-cards .leg-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 992px) {
    .view-style-cards .leg-grid {
        grid-template-columns: 1fr;
    }
}

/* B) KOMPAKT LİSTE GÖRÜNÜMÜ (view-style-compact) */
.view-style-compact .leg-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.view-style-compact .leg-item-card {
    border-radius: 14px;
    padding: 14px 20px;
}

.view-style-cards .leg-text,
.view-style-compact .leg-text {
    font-size: 0.92rem;
    line-height: 1.65;
    color: #334155;
    margin-bottom: 10px;
}

/* C) AKORDEON GÖRÜNÜMÜ (view-style-accordion) */
.view-style-accordion .leg-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.view-style-accordion .leg-item-card {
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
}

.view-style-accordion .leg-title {
    padding: 16px 20px;
    margin: 0;
    cursor: pointer;
    background: #ffffff;
    user-select: none;
}

.view-style-accordion .leg-text,
.view-style-accordion .leg-footer-meta,
.view-style-accordion .leg-fact-box {
    display: none;
    padding: 0 20px 16px;
}

.view-style-accordion .leg-item-card.is-expanded .leg-text,
.view-style-accordion .leg-item-card.is-expanded .leg-footer-meta,
.view-style-accordion .leg-item-card.is-expanded .leg-fact-box {
    display: block;
}

/* ── 7. MADDE KARTI İÇ YAPISI VE DETAYLARI ───────────────────────────────────── */
.leg-item-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    padding: 20px;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    position: relative;
    box-sizing: border-box;
}

.leg-item-card:hover {
    border-color: #94a3b8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.leg-item-card.is-read {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.leg-content-box {
    width: 100%;
}

.leg-title {
    font-size: 1rem;
    font-weight: 800;
    color: #1e3a8a;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.leg-title .title-text {
    color: #1d4ed8;
}

.leg-text {
    font-size: var(--leg-font-size, 0.95rem);
    line-height: 1.65;
    color: #334155;
    white-space: pre-wrap;
    margin-bottom: 16px;
}

.leg-text img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 15px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.leg-footer-meta {
    font-size: 12px;
    color: var(--hub-text-muted);
    border-top: 1px dashed #e2e8f0;
    padding-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.leg-actions-grp {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.read-toggle-btn {
    padding: 0 12px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    box-sizing: border-box;
    white-space: nowrap;
}

.read-toggle-btn:hover {
    background: #f1f5f9;
    color: #1d4ed8;
    border-color: #cbd5e1;
}

.read-toggle-btn.active {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
}

.read-toggle-btn.btn-resolve-questions {
    background: #8b5cf6;
    color: #ffffff;
    border-color: #8b5cf6;
}

.read-toggle-btn.btn-resolve-questions:hover {
    background: #7c3aed;
    border-color: #7c3aed;
}

.leg-highlight {
    background: #fde68a;
    color: #92400e;
    padding: 0 4px;
    border-radius: 4px;
    font-weight: 800;
    box-shadow: 0 2px 4px rgba(252, 211, 77, 0.4);
}

/* ── SÜRE VE ZAMAN VURGULARI (COLORFUL DURATION BADGES) ─────────────────────── */
.leg-duration-highlight {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.9em;
    margin: 0 2px;
    cursor: help;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.leg-duration-highlight:hover {
    transform: translateY(-1px);
}

/* Günlük Süreler: Amber / Sıcak Altın */
.leg-duration-highlight.duration-day,
.leg-duration-highlight:not([class*="duration-"]) {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Aylık ve Haftalık Süreler: Zümrüt Yeşili */
.leg-duration-highlight.duration-month {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Yıllık ve Saatlik Süreler: İndigo Mavi */
.leg-duration-highlight.duration-year {
    background: #e0e7ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

/* Acil / Kritik Zaman İfadeleri: Gül Kırmızı */
.leg-duration-highlight.duration-urgent {
    background: #ffe4e6;
    color: #9f1239;
    border: 1px solid #fecdd3;
    font-weight: 900;
}

/* Takvim Ayları: Mor */
.leg-duration-highlight.duration-cal {
    background: #f3e8ff;
    color: #6b21a8;
    border: 1px solid #e9d5ff;
}

.art-note-badge {
    background: #f59e0b;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ── 8. AKILLI NOT DEFTERİ SLIDE-OVER SIDEBAR ─────────────────────────────────── */
#notebook-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    z-index: 100005;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

body.notebook-open #notebook-sidebar {
    right: 0;
}

#notebook-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
    z-index: 100004;
    display: none;
}

body.notebook-open #notebook-overlay {
    display: block;
}

.notebook-header {
    background: #ca8a04;
    color: #ffffff;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notebook-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notebook-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8fafc;
}

.notebook-note-card {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
}

.note-card-meta {
    font-size: 11px;
    color: #92400e;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    font-weight: 700;
}

.note-card-content {
    font-size: 13.5px;
    color: #451a03;
    line-height: 1.5;
    white-space: pre-wrap;
}

.note-card-actions {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
}

.note-action-btn.delete {
    background: none;
    border: none;
    color: #dc2626;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.notebook-footer {
    padding: 18px 20px;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
}

.notebook-textarea {
    width: 100%;
    min-height: 75px;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 13.5px;
    resize: vertical;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.notebook-btn-save {
    background: #ca8a04;
    color: #ffffff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notebook-btn-save:hover {
    background: #a16207;
}

/* Mobile Slide from Top */
@media (max-width: 991px) {
    #notebook-sidebar {
        width: 100%;
        height: 70vh;
        right: 0;
        top: -75vh;
        left: 0;
        border-bottom: 3px solid #ca8a04;
        transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    body.notebook-open #notebook-sidebar {
        top: 0;
    }
}

/* ── 9. MODALLAR (KONU SEÇİCİ VE SESLİ DERS MODALI) ────────────────────────────── */
.hub-cat-selector-overlay,
#voiceModalOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    z-index: 100010;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.hub-cat-selector-modal,
#voiceModal {
    background: #ffffff;
    width: 100%;
    max-width: 550px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.3s ease-out;
}

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

.hub-cat-selector-header,
.modal-voice-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
}

.modal-voice-header {
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    color: white;
    text-align: center;
    flex-direction: column;
}

.modal-voice-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    background: #f8fafc;
}

.modal-voice-footer {
    padding: 20px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.v-bubble {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    max-width: 85%;
}

.v-bubble.hoca { align-self: flex-start; }
.v-bubble.ogrenci { align-self: flex-end; margin-left: auto; align-items: flex-end; }

.v-bubble-content {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.v-bubble.hoca .v-bubble-content { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.v-bubble.ogrenci .v-bubble-content { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.v-bubble-content.active { box-shadow: 0 0 0 3px #3b82f6; }

.v-main-play {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #1d4ed8;
    color: white;
    border: none;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(29, 78, 216, 0.4);
    transition: all 0.2s ease;
}

.v-main-play:hover { transform: scale(1.05); }

.v-progress-bg {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.v-progress-fill {
    height: 100%;
    background: #1d4ed8;
    width: 0%;
    transition: width 0.1s linear;
}

/* ── 10. HYBRID PAYWALL ONAY KUTUSU ────────────────────────────────────────────── */
#leg-countdown-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(12px);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 100px;
    display: none;
    align-items: center;
    gap: 16px;
    z-index: 99998;
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#leg-countdown-bar.show { display: flex; }

#leg-paywall-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.blurred-paywall {
    filter: blur(10px) grayscale(40%);
    pointer-events: none;
    user-select: none;
}

/* ── 11. E-E-A-T DOĞRULANMIŞ UZMAN KART KARTLARI ──────────────────────────────── */
.expert-badge-card {
    margin: 40px 0 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 24px 30px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 20px;
    border-left: 6px solid #10b981;
}

.expert-avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.expert-info { flex: 1; }

.expert-label {
    font-size: 11px;
    font-weight: 800;
    color: #047857;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.expert-name {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}

.expert-bio {
    font-size: 13.5px;
    color: #475569;
    margin-top: 4px;
}

/* ── 12. ADMIN HIZLI DÜZENLEME (INLINE EDIT) ─────────────────────────────────── */
.leg-item-card.is-editing .leg-text,
.leg-item-card.is-editing .leg-title {
    display: none;
}

.inline-edit-area {
    display: none;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 16px;
    margin-top: 10px;
}

.leg-item-card.is-editing .inline-edit-area {
    display: block;
}

.edit-input-title {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.edit-input-content {
    width: 100%;
    min-height: 120px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
    margin-bottom: 10px;
    resize: vertical;
}

.edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-edit-save {
    background: #1d4ed8;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

.btn-edit-cancel {
    background: #64748b;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

/* ── 13. RESPONSIVE MOBİL UYUM ───────────────────────────────────────────────── */
@media (max-width: 991px) {
    #legislation-wrapper {
        border-radius: 14px;
        padding: 14px 12px;
        margin-bottom: 16px;
        width: 100%;
        box-sizing: border-box;
    }

    .nav-top-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .gd-leg-top-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
    }

    .font-controls-compact {
        width: 100%;
        justify-content: space-between;
        margin-left: 0;
        flex-wrap: wrap;
        gap: 8px;
    }

    .expert-badge-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }

    /* 1. Tamamlama Oranı & Filtreler Kartı Mobil Uyum */
    .overall-progress-card.full-progress {
        padding: 14px 16px;
    }

    .overall-progress-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .overall-progress-title {
        flex-wrap: wrap;
        gap: 8px 12px;
        justify-content: space-between;
        width: 100%;
    }

    .gd-leg-est-time {
        margin-left: 0;
    }

    .gd-leg-header-right {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
    }

    .gd-leg-filter-pills {
        flex: 1;
        justify-content: space-around;
        padding: 2px;
    }

    .gd-leg-filter-pill {
        padding: 6px 12px;
        font-size: 11.5px;
        text-align: center;
        flex: 1;
    }
}

@media (max-width: 480px) {
    .gd-page-body {
        padding: 6px !important;
        gap: 6px !important;
    }

    #legislation-wrapper {
        padding: 10px 8px;
        border-radius: 12px;
    }

    .gd-leg-top-actions .gd-btn {
        flex: 1 1 auto;
        justify-content: center;
        text-align: center;
    }

    .gd-leg-filter-pill {
        padding: 5px 6px;
        font-size: 10.5px;
    }

    .overall-progress-title .title-label {
        font-size: 13px;
    }

    .gd-leg-est-time {
        font-size: 11.5px;
    }

    .font-controls-compact {
        gap: 4px;
    }
}

/* ── 8. ADMIN INLINE EDIT AREA STYLES ─────────────────────────────────────── */
.edit-trigger-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: #2563eb;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
}

.edit-trigger-btn:hover {
    background: #dbeafe;
    color: #1d4ed8;
    transform: scale(1.05);
}

.inline-edit-area {
    display: none;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 14px;
    padding: 18px;
    margin-top: 12px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.leg-item-card.is-editing .inline-edit-area {
    display: block !important;
}

.leg-item-card.is-editing .leg-content-box {
    display: none !important;
}

.edit-input-title {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1.5px solid #cbd5e1;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    background: #ffffff;
    margin-bottom: 12px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.edit-input-title:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.edit-input-content {
    width: 100%;
    min-height: 140px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1.5px solid #cbd5e1;
    font-size: 14px;
    line-height: 1.65;
    color: #334155;
    background: #ffffff;
    margin-bottom: 14px;
    box-sizing: border-box;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.edit-input-content:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.edit-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.btn-edit-cancel {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 6px 16px;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-edit-cancel:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.btn-edit-save {
    background: #2563eb;
    color: #ffffff;
    border: 1px solid #1d4ed8;
    padding: 6px 18px;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.btn-edit-save:hover {
    background: #1d4ed8;
}
