/* ==========================================================================
   TERFIUI v5 — Türkiye Geneli Deneme Sınavları Modül CSS (Kompakt Tasarım)
   ========================================================================== */

/* ── Sayfa Gövdesi ve Kompakt Hizalama (Kural 20: 8px Spacing) ── */
.gd-tg-body {
    padding: 8px !important;
    gap: 8px !important;
    max-width: 100% !important;
    margin: 0 !important;
    width: 100% !important;
    display: flex;
    flex-direction: column;
}

/* ── Kompakt Hero Header Kartı ── */
.gd-page-header {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.gd-page-header-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gd-page-header-icon {
    width: 36px;
    height: 36px;
    background: #eff6ff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #2563eb;
}

.gd-page-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gd-page-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gd-page-subtitle {
    font-size: 12px !important;
    color: #64748b !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}

.gd-page-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Kompakt Segmented Filtreleme ve Arama Çubuğu (Kural 23 Uyumlu) ── */
.gd-tg-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px;
}

.gd-tg-search-box {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 4px 10px;
    flex: 1;
    min-width: 200px;
    height: 34px;
}

.gd-tg-search-icon {
    display: flex;
    align-items: center;
    color: #64748b;
    margin-right: 6px;
}

.gd-tg-search-input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 13px;
    color: #0f172a;
}

.gd-tg-filter-group {
    display: flex;
    align-items: center;
    gap: 3px;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 6px;
}

.gd-tg-filter-btn {
    border: none;
    background: transparent;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.gd-tg-filter-btn:hover,
.gd-mev-filter-btn:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.gd-tg-filter-btn.active,
.gd-mev-filter-btn.active,
.filter-btn.active {
    background: #2563eb !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25) !important;
}

.gd-tg-filter-btn.active:hover,
.gd-mev-filter-btn.active:hover,
.filter-btn.active:hover {
    background: #1d4ed8 !important;
    color: #ffffff !important;
}

/* ── Kompakt Sınav Kartları Grid Yapısı ── */
.gd-tg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 8px;
}

.gd-tg-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gd-tg-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.gd-tg-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.gd-tg-card-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.gd-tg-badge-live {
    background: #dcfce7;
    color: #15803d;
}

.gd-tg-badge-upcoming {
    background: #fef3c7;
    color: #b45309;
}

.gd-tg-badge-ended {
    background: #f1f5f9;
    color: #64748b;
}

/* ── Erişim Paketi Rozetleri (PRO & HERKESE AÇIK) ── */
.gd-badge-pro {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #b45309;
    border: 1px solid #fde68a;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 2px rgba(217, 119, 6, 0.08);
}

.gd-badge-free {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #15803d;
    border: 1px solid #bbf7d0;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.3px;
}

.gd-badge-demo {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    color: #6b21a8;
    border: 1px solid #d8b4fe;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 2px rgba(107, 33, 168, 0.08);
}

/* ── Paywall Modal ve Kapatma Butonu Konumlandırması (Kural 27 Uyumlu) ── */
.gd-tg-paywall-dialog {
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    max-width: 480px;
    width: 100%;
    position: relative;
}

.gd-tg-paywall-dialog .gd-exams-lock-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.07);
    color: #475569;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    transition: all 0.2s ease;
}

.gd-tg-paywall-dialog .gd-exams-lock-close:hover {
    background: rgba(0, 0, 0, 0.14);
    color: #0f172a;
    transform: scale(1.08);
}

.gd-tg-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.gd-tg-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #64748b;
}

.gd-tg-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.gd-tg-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

/* ── Kompakt Canlı Sınav Motoru & Optik Form Stilleri ── */
.gd-optik-container {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 8px;
}

.gd-optik-question-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gd-optik-sidebar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gd-optik-timer-card {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 8px;
    text-align: center;
}

.gd-optik-timer-value {
    font-size: 20px;
    font-weight: 800;
    color: #1e40af;
    font-family: monospace;
}

.gd-optik-grid,
.gd-optik-grid-nav {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 6px !important;
    max-height: 420px;
    overflow-y: auto;
    padding: 2px;
}

.gd-optik-grid-item,
.gd-optik-nav-btn {
    height: 36px !important;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #334155 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.gd-optik-grid-item:hover,
.gd-optik-nav-btn:hover {
    border-color: #2563eb !important;
    color: #2563eb !important;
    background: #eff6ff !important;
}

.gd-optik-grid-item.current,
.gd-optik-grid-item.active,
.gd-optik-nav-btn.current,
.gd-optik-nav-btn.active {
    border: 2px solid #2563eb !important;
    color: #2563eb !important;
    background: #eff6ff !important;
    font-weight: 800 !important;
}

.gd-optik-grid-item.answered,
.gd-optik-nav-btn.answered {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #1d4ed8 !important;
}

.gd-optik-grid-item.answered.current,
.gd-optik-grid-item.answered.active,
.gd-optik-nav-btn.answered.current,
.gd-optik-nav-btn.answered.active {
    border: 2px solid #0f172a !important;
    box-shadow: 0 0 0 2px #bfdbfe !important;
}

.gd-optik-grid-item.flagged,
.gd-optik-nav-btn.flagged {
    background: #eab308 !important;
    color: #ffffff !important;
    border-color: #ca8a04 !important;
}

/* ── Modern & Dengeli Derece Tablosu Stilleri ── */
.gd-tg-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}

.gd-tg-table th {
    padding: 10px 14px;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.gd-tg-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #0f172a;
    font-size: 13px;
    vertical-align: middle;
}

.gd-tg-table tr:hover td {
    background: #f8fafc;
}

/* Sütun Hizalama ve Doğal Esneklik Kuralları */
.gd-tg-table .col-rank {
    width: 60px;
    text-align: center;
    white-space: nowrap;
    font-weight: 700;
    color: #0f172a;
}

.gd-tg-table .col-name {
    font-weight: 600;
    color: #1e293b;
}

.gd-tg-table .col-city {
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
}

.gd-tg-table .col-stats {
    text-align: center;
    white-space: nowrap;
    font-size: 12px;
}

.gd-tg-stat-d { color: #16a34a; font-weight: 700; }
.gd-tg-stat-y { color: #dc2626; font-weight: 700; }
.gd-tg-stat-b { color: #64748b; }

.gd-tg-table .col-net {
    text-align: center;
    white-space: nowrap;
    font-weight: 700;
    color: #16a34a;
}

.gd-tg-table .col-score {
    text-align: center;
    white-space: nowrap;
    font-weight: 800;
    color: #2563eb;
}

.gd-tg-table .col-time {
    text-align: center;
    white-space: nowrap;
    color: #64748b;
    font-size: 12px;
}

.gd-tg-table .col-badge {
    text-align: center;
    white-space: nowrap;
}

/* ── Modern Compact Breadcrumb Stilleri ── */
/* Standard site.css breadcrumb is used */

/* ── Sınav Layout Masaüstü Yapısı ── */
.gd-exam-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 16px;
    align-items: start;
}

/* ── Mobile Responsive Overhaul (Mobile-First Kural 4 & 20) ── */
@media (max-width: 991px) {
    .gd-exam-layout,
    .gd-optik-container {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .gd-exam-sticky-sidebar {
        position: relative !important;
        top: 0 !important;
        width: 100% !important;
        margin-top: 12px !important;
    }

    .gd-page-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        padding: 12px !important;
    }

    .gd-page-header-main {
        width: 100% !important;
    }

    .gd-page-title {
        white-space: normal !important;
        word-break: break-word !important;
        font-size: 15px !important;
    }

    .gd-page-header-actions {
        width: 100% !important;
        justify-content: space-between !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .gd-page-header-actions .gd-btn {
        flex: 1 !important;
        justify-content: center !important;
    }

    .gd-tg-controls {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        padding: 8px !important;
    }

    .gd-tg-search-box {
        width: 100% !important;
        min-width: 100% !important;
    }

    .gd-tg-filter-group {
        width: 100% !important;
        display: flex !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        padding: 4px !important;
    }

    .gd-tg-filter-btn {
        flex: 1 0 auto !important;
        text-align: center !important;
        padding: 6px 10px !important;
        font-size: 12px !important;
    }

    .gd-tg-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .gd-tg-card {
        padding: 12px !important;
    }

    .gd-tg-card-actions {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        width: 100% !important;
    }

    .gd-exam-question-card {
        padding: 14px 12px !important;
    }

    .gd-exam-option-item {
        padding: 10px 12px !important;
    }

    .gd-optik-grid {
        grid-template-columns: repeat(5, 1fr) !important;
        max-height: 260px !important;
    }

    .gd-offstart-card {
        padding: 16px 12px !important;
        margin: 10px 0 !important;
        width: 100% !important;
    }

    .gd-offstart-actions {
        flex-direction: column !important;
        width: 100% !important;
    }

    .gd-offstart-actions .gd-btn {
        width: 100% !important;
    }

    .gd-leaderboard-table-wrapper {
        padding: 8px !important;
    }

    .gd-tg-table {
        min-width: 580px !important;
    }

    .gd-tg-table th,
    .gd-tg-table td {
        padding: 6px 8px !important;
        font-size: 12px !important;
    }
}

@media (max-width: 480px) {
    .gd-tg-card-meta {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    .gd-optik-timer-card {
        width: 100% !important;
    }
}

/* ── Soru Numarası ve Metninin Aynı Satırda Kalması ── */
.gd-rich-text-content p {
    display: inline !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ── Türkiye Geneli İstatistik Widget Paneli ── */
.gd-tg-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.gd-tg-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gd-tg-stat-label {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
}

.gd-tg-stat-value {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
}

.gd-tg-stat-value.primary { color: #2563eb; }
.gd-tg-stat-value.success { color: #059669; }
.gd-tg-stat-value.warning { color: #d97706; }

.gd-tg-user-result-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.gd-tg-result-col {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gd-tg-result-item-label {
    font-size: 11px;
    color: #64748b;
    display: block;
}

.gd-tg-result-item-val {
    font-size: 14px;
    font-weight: 800;
    color: #1e293b;
}

.gd-tg-inst-badge {
    background: #fdf4ff;
    color: #c026d3;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 10px;
    white-space: nowrap;
}

.gd-tg-info-btn-wrap {
    padding-top: 12px;
}

.gd-tg-full-btn {
    width: 100%;
    justify-content: center;
}

@media (max-width: 992px) {
    .gd-tg-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .gd-tg-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Türkiye Geneli Sayfalama (Pagination) Stilleri ── */
.gd-tg-pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    flex-wrap: wrap;
}

.gd-tg-pagination-info {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

.gd-tg-pagination-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.gd-tg-page-btn {
    padding: 4px 10px;
    font-size: 12px;
    min-width: 32px;
    justify-content: center;
}

.gd-tg-dots {
    padding: 4px 6px;
    color: #94a3b8;
    font-size: 12px;
}

.gd-tg-btn-seviye {
    background: linear-gradient(135deg, #7e22ce, #6b21a8) !important;
    color: #ffffff !important;
    width: 100% !important;
    justify-content: center !important;
    border: none !important;
}

.gd-tg-btn-seviye:hover {
    background: linear-gradient(135deg, #6b21a8, #581c87) !important;
    color: #ffffff !important;
}


