/* ============================================
   ROTA HARİTASI - TAM EKRAN SAYFA
   Modüler CSS (variables.css) ile Tam Uyumlu
   /tema/css/pages/rota-haritasi.css
============================================ */

/* ============================================
   KONTEYNER & LAYOUT
============================================ */
.harita-container {
    max-width: 100%;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ============================================
   HARİTA HEADER
============================================ */
.harita-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 8px 12px;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    box-shadow: var(--shadow-sm);
}

.harita-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.harita-title-section {
    flex: 1;
    min-width: 200px;
}

.harita-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.3;
}

.harita-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.2;
}

.harita-subtitle strong {
    color: var(--accent);
    font-weight: 600;
}

/* ============================================
   HARİTA BUTONLARI
============================================ */
.harita-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.harita-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    position: relative;
}

.harita-btn:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.harita-btn svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.filter-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* ============================================
   FİLTRE PANELİ
============================================ */
.harita-filter-panel {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base);
}

.harita-filter-panel.active {
    max-height: 500px;
    overflow-y: auto;
}

.filter-panel-content {
    padding: var(--spacing-lg);
    display: grid;
    gap: var(--spacing-lg);
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.filter-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.filter-select {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-select:hover,
.filter-select:focus {
    border-color: var(--accent);
    outline: none;
}

/* ============================================
   FİLTRE CHİPS (Radio Buttons)
============================================ */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.chip-option {
    cursor: pointer;
}

.chip-option input[type="radio"] {
    display: none;
}

.chip-option span {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.chip-option input[type="radio"]:checked + span {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.chip-option:hover span {
    border-color: var(--accent);
}

/* ============================================
   FİLTRE BUTONLARI
============================================ */
.filter-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border);
}

.btn-filter-reset,
.btn-filter-apply {
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
}

.btn-filter-reset {
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-filter-reset:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-filter-apply {
    background: var(--accent);
    color: white;
}

.btn-filter-apply:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   HARİTA WRAPPER
============================================ */
.harita-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.route-map {
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
}

/* ============================================
   YÜKLEME GÖSTERGESİ
============================================ */
.map-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: center;
    z-index: var(--z-modal);
}

.map-loader.hidden {
    display: none;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--spacing-md);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.map-loader p {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ============================================
   LEAFLET POPUP - LIGHT MODE (Varsayılan)
============================================ */
.leaflet-popup-content-wrapper {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    padding: 0;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0;
    width: 280px !important;
}

.leaflet-popup-tip {
    background: #ffffff;
}

/* ============================================
   ROTA POPUP İÇERİĞİ - LIGHT MODE
============================================ */
.route-popup {
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s ease;
}

.route-popup-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.route-popup-content {
    padding: 16px;
    background: #ffffff;
}

.route-popup-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.route-popup-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: #64748b;
}

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

.route-popup-difficulty {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

.difficulty-kolay {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.difficulty-orta {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.difficulty-zor {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.route-popup-author {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.route-popup-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.route-popup-author-name {
    font-size: 0.85rem;
    color: #64748b;
}

.route-popup-link-wrapper {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    display: block;
}

.route-popup-link-wrapper:hover {
    transform: translateY(-2px);
}

.route-popup-link-wrapper:hover .route-popup {
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

/* ============================================
   DARK MODE - LEAFLET POPUP
============================================ */
[data-theme="dark"] .leaflet-popup-content-wrapper {
    background: #1e293b !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5) !important;
}

[data-theme="dark"] .leaflet-popup-tip {
    background: #1e293b !important;
}

[data-theme="dark"] .route-popup-content {
    background: #1e293b !important;
}

[data-theme="dark"] .route-popup-title {
    color: #f1f5f9 !important;
}

[data-theme="dark"] .route-popup-meta {
    color: #94a3b8 !important;
}

[data-theme="dark"] .route-popup-author {
    border-top-color: rgba(148, 163, 184, 0.1) !important;
}

[data-theme="dark"] .route-popup-author-name {
    color: #94a3b8 !important;
}

[data-theme="dark"] .route-popup-link-wrapper:hover .route-popup {
    box-shadow: 0 12px 30px rgba(0,0,0,0.7) !important;
}

[data-theme="dark"] .difficulty-kolay {
    background: rgba(52, 211, 153, 0.1) !important;
    color: #34d399 !important;
}

[data-theme="dark"] .difficulty-orta {
    background: rgba(251, 191, 36, 0.1) !important;
    color: #fbbf24 !important;
}

[data-theme="dark"] .difficulty-zor {
    background: rgba(248, 113, 113, 0.1) !important;
    color: #f87171 !important;
}

/* ============================================
   MARKER CLUSTER STİLLERİ
============================================ */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background: rgba(37, 99, 235, 0.2);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    background: #2563eb;
    color: white;
    font-weight: 700;
}

[data-theme="dark"] .marker-cluster-small div,
[data-theme="dark"] .marker-cluster-medium div,
[data-theme="dark"] .marker-cluster-large div {
    background: #3b82f6;
}

/* ============================================
   ROTA MARKER İKONLARI
============================================ */
.route-marker-icon {
    background: transparent !important;
    border: none !important;
}

.route-marker-container {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25),
                0 0 0 3px rgba(255, 255, 255, 0.9),
                0 0 0 4px var(--marker-color, #2563eb);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.route-marker-container::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: var(--marker-color, #2563eb);
    opacity: 0.2;
    z-index: -1;
}

.route-marker-emoji {
    font-size: 22px;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
    z-index: 1;
}

.route-marker-icon:hover .route-marker-container {
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35),
                0 0 0 3px rgba(255, 255, 255, 0.95),
                0 0 0 4px var(--marker-color, #2563eb);
}

.route-marker-trusted {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-Content: center;
    border: 1.5px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.route-popup-badge {
    display: inline-block;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
}

/* Dark mode marker stilleri */
[data-theme="dark"] .route-marker-container {
    background: #1e293b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5),
                0 0 0 3px rgba(30, 41, 59, 0.9),
                0 0 0 4px var(--marker-color, #2563eb);
}

[data-theme="dark"] .route-marker-icon:hover .route-marker-container {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.7),
                0 0 0 3px rgba(30, 41, 59, 0.95),
                0 0 0 4px var(--marker-color, #2563eb);
}

/* ============================================
   MOBİL RESPONSIVE
============================================ */
@media (max-width: 768px) {
    .harita-header {
        padding: 6px 10px;
    }
    
    .harita-header-content {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    
    .harita-title {
        font-size: 1rem;
    }
    
    .harita-subtitle {
        font-size: 0.7rem;
    }
    
    .harita-actions {
        gap: 6px;
    }
    
    .harita-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    
    .harita-btn span {
        display: none;
    }
    
    .filter-panel-content {
        grid-template-columns: 1fr;
        padding: var(--spacing-md);
    }
    
    .leaflet-popup-content {
        width: 240px !important;
    }
    
    .route-popup-image {
        height: 120px;
    }
}

@media (max-width: 480px) {
    .harita-title {
        font-size: 0.95rem;
    }
    
    .harita-subtitle {
        font-size: 0.65rem;
    }
    
    .harita-btn {
        padding: var(--spacing-xs) var(--spacing-sm);
    }
}

/* ============================================
   DARK MODE - HARİTA FİLTRESİ
============================================ */
/* Harita filtreleri kaldırıldı - harita normal parlaklıkta görünecek */

/* ============================================
   DARK MODE - LEAFLET KONTROLLER (Güçlendirilmiş)
============================================ */
[data-theme="dark"] .leaflet-bar a,
[data-theme="dark"] .leaflet-control-zoom-in,
[data-theme="dark"] .leaflet-control-zoom-out {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
    border-color: rgba(148, 163, 184, 0.3) !important;
}

[data-theme="dark"] .leaflet-bar a:hover,
[data-theme="dark"] .leaflet-bar a:focus {
    background-color: #334155 !important;
}

[data-theme="dark"] .leaflet-bar {
    box-shadow: 0 1px 5px rgba(0,0,0,0.8) !important;
}

[data-theme="dark"] .leaflet-control-attribution {
    background: rgba(30, 41, 59, 0.9) !important;
    color: #94a3b8 !important;
}

[data-theme="dark"] .leaflet-control-attribution a {
    color: #60a5fa !important;
}