/* ==========================================================================
   alsatbu.com - Çevre Gürültü ve Sakinlik İndeksi Modülü CSS
   ArchiMap mimarisinde Trafik, Akustik ve Çevre Ses Haritası
   ========================================================================== */

.alsatbu-noise-container {
    position: relative;
    width: 100%;
    margin-bottom: 25px;
    font-family: inherit;
    color: #1e293b;
    box-sizing: border-box;
}

.alsatbu-noise-container * {
    box-sizing: border-box;
}

/* Üst Kontrol & Filtre Kartı */
.noise-controls-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.noise-ctrl-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.noise-ctrl-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.noise-ctrl-label {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.noise-btn-option {
    appearance: none;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    padding: 6px 13px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.noise-btn-option:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.noise-btn-option.active {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border-color: #4f46e5;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

/* Akustik Ses Haritası Tuvali */
.noise-map-viewport {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
    background: #0f172a;
}

.noise-map-canvas {
    width: 100%;
    height: 100%;
}

/* Harita İçi Kayan Kontroller (Overlay Controls) */
.noise-floating-controls {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.noise-floating-btn {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #334155;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(4px);
    transition: all 0.15s ease;
}

.noise-floating-btn:hover {
    background: #ffffff;
    color: #0f172a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.noise-floating-btn.active {
    background: #6366f1;
    border-color: #4f46e5;
    color: #ffffff;
}

/* Harita Sol Üst Canlı Ses & Desibel İbresi Rozeti */
.noise-badge-overlay {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(15, 23, 42, 0.88);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 10;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.noise-gauge-mini {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex: 0 0 44px;
}

.noise-gauge-mini.quiet {
    background: #10b981;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

.noise-gauge-mini.moderate {
    background: #f59e0b;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

.noise-gauge-mini.busy {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}

.noise-badge-info strong {
    font-size: 16px;
    font-weight: 800;
    display: block;
    letter-spacing: -0.01em;
}

.noise-badge-info span {
    font-size: 11px;
    color: #cbd5e1;
    display: block;
    margin-top: 1px;
}

/* Harita Altı Akustik Lejant */
.noise-legend-strip {
    position: absolute;
    bottom: 12px;
    left: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    z-index: 10;
    backdrop-filter: blur(4px);
    font-size: 12px;
    color: #334155;
}

.noise-legend-items {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.noise-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.noise-legend-color {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    display: inline-block;
}

.noise-legend-color.quiet {
    background: #10b981;
}

.noise-legend-color.moderate {
    background: #f59e0b;
}

.noise-legend-color.high {
    background: #ef4444;
}

.noise-legend-color.highway {
    background: #dc2626;
    border: 1px solid #991b1b;
}

/* Yükleniyor Göstergesi */
.noise-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(3px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    z-index: 20;
    transition: opacity 0.3s ease;
}

.noise-loading-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: noiseSpin 0.8s linear infinite;
    margin-bottom: 12px;
}

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

/* Akustik ve Sakinlik Metrik Kartları */
.noise-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.noise-metric-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.noise-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.noise-metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex: 0 0 40px;
}

.noise-metric-icon.score {
    background: #e0e7ff;
    color: #4f46e5;
}

.noise-metric-icon.db {
    background: #ecfdf5;
    color: #059669;
}

.noise-metric-icon.artery {
    background: #fef3c7;
    color: #d97706;
}

.noise-metric-icon.sleep {
    background: #fdf2f8;
    color: #db2777;
}

.noise-metric-data {
    display: flex;
    flex-direction: column;
}

.noise-metric-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.noise-metric-value {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    font-feature-settings: "tnum";
}

.noise-metric-sub {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

/* Çevredeki Yol ve Ulaşım Akustik Mesafeleri Karnesi */
.noise-arteries-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 16px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.noise-arteries-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.noise-arteries-head h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.noise-arteries-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.noise-artery-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.noise-artery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #cbd5e1;
}

.noise-artery-item.safe::before {
    background: #10b981;
}

.noise-artery-item.warn::before {
    background: #f59e0b;
}

.noise-artery-name {
    font-size: 13px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 4px;
}

.noise-artery-dist {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
    font-feature-settings: "tnum";
}

.noise-artery-status {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 4px;
}

.noise-artery-status.safe {
    background: #dcfce7;
    color: #15803d;
}

.noise-artery-status.warn {
    background: #fef3c7;
    color: #b45309;
}

.noise-artery-desc {
    font-size: 10.5px;
    color: #64748b;
    line-height: 1.35;
}

/* Bilgilendirme Kılavuzu */
.noise-guide-box {
    margin-top: 16px;
    padding: 14px 18px;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    border-radius: 10px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 12px;
    color: #5b21b6;
    line-height: 1.5;
}

.noise-guide-box i {
    font-size: 17px;
    color: #7c3aed;
    margin-top: 2px;
}

/* Tam Ekran */
.noise-map-viewport.is-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    border-radius: 0 !important;
    border: none !important;
}

/* Mobil Uyumluluk */
@media (max-width: 768px) {
    .noise-map-viewport {
        height: 380px;
    }
    .noise-ctrl-row {
        flex-direction: column;
        align-items: stretch;
    }
    .noise-arteries-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .noise-dashboard-grid {
        grid-template-columns: 1fr;
    }
    .noise-legend-strip {
        font-size: 11px;
        padding: 6px 10px;
    }
}
