/* =============================================
   İRTİBAT OFİSLERİ - LEAFLET HARİTA STİLLERİ
   Dosya: wwwroot/assets/css/irtibat_harita.css
   ============================================= */

.irtibat-harita-section {
    margin-bottom: 30px;
}

/* ===== Ana Kart ===== */
.harita-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* ===== Harita + Sidebar Konteyner ===== */
.harita-map-container {
    position: relative;
    display: flex;
    height: 520px;
}

#irtibatMap {
    flex: 1;
    min-height: 100%;
    z-index: 1;
}

/* ===== Özel Pin Stili ===== */
.custom-pin {
    background: transparent !important;
    border: none !important;
}

.pin-marker {
    width: 30px;
    height: 40px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    color: #c0392b;
    font-size: 30px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    transition: all 0.25s ease;
}

    .pin-marker i {
        transition: transform 0.25s ease, color 0.25s ease;
    }

    .pin-marker.active {
        color: #1a5276;
    }

        .pin-marker.active i {
            transform: scale(1.2);
            filter: drop-shadow(0 3px 8px rgba(26,82,118,0.5));
        }

.active-pin .pin-marker {
    color: #1a5276;
}

/* ===== Popup Stili ===== */
.ofis-popup .leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    padding: 0;
    overflow: hidden;
}

.ofis-popup .leaflet-popup-content {
    margin: 0;
    min-width: 240px;
}

.ofis-popup .leaflet-popup-tip {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.popup-card {
    padding: 16px;
}

.popup-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef1f5;
}

.popup-icon {
    color: #2980b9;
    font-size: 16px;
}

.popup-title {
    font-size: 14px;
    color: #1a2b3c;
    line-height: 1.3;
}

.popup-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 5px 0;
    font-size: 12px;
    color: #5a6d7e;
}

    .popup-row i {
        color: #2980b9;
        width: 14px;
        text-align: center;
        margin-top: 2px;
        flex-shrink: 0;
    }

    .popup-row a {
        color: #2980b9;
        text-decoration: none;
    }

        .popup-row a:hover {
            text-decoration: underline;
        }

.popup-actions {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #eef1f5;
    flex-wrap: wrap;
}

.popup-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
}

    .popup-btn i {
        font-size: 10px;
    }

.popup-btn-primary {
    background: #2980b9;
    color: #fff;
}

    .popup-btn-primary:hover {
        background: #3498db;
        color: #fff;
    }

.popup-btn-outline {
    background: #f0f4f8;
    color: #2c3e50;
    border: 1px solid #dce4ec;
}

    .popup-btn-outline:hover {
        background: #e4ebf2;
    }

/* ===== Sol Panel: Sidebar ===== */
.harita-sidebar {
    width: 280px;
    background: #fff;
    border-left: 1px solid #e8ecf0;
    display: flex;
    flex-direction: column;
    z-index: 2;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid #e8ecf0;
    background: #f8fafb;
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #1a2b3c;
    margin-bottom: 10px;
}

    .sidebar-title i {
        color: #2980b9;
    }

.sidebar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #dce4ec;
    border-radius: 8px;
    padding: 7px 12px;
}

    .sidebar-search i {
        color: #9ba8b5;
        font-size: 13px;
    }

    .sidebar-search input {
        border: none;
        outline: none;
        width: 100%;
        font-size: 13px;
        color: #2c3e50;
        background: transparent;
    }

        .sidebar-search input::placeholder {
            color: #b0bec5;
        }

.sidebar-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

    .sidebar-list::-webkit-scrollbar {
        width: 4px;
    }

    .sidebar-list::-webkit-scrollbar-track {
        background: transparent;
    }

    .sidebar-list::-webkit-scrollbar-thumb {
        background: #d0d7de;
        border-radius: 4px;
    }

/* City Item */
.city-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: 2px;
}

    .city-item:hover {
        background: #f0f6fb;
    }

    .city-item.active {
        background: #e3f0fa;
        border-left: 3px solid #2980b9;
    }

.city-item-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2980b9;
    flex-shrink: 0;
}

.city-item.active .city-item-dot {
    background: #1a5276;
    box-shadow: 0 0 0 3px rgba(26,82,118,0.2);
}

.city-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.city-item-name {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
}

.city-item-count {
    font-size: 11px;
    color: #8e99a4;
    margin-top: 1px;
}

.city-item-arrow {
    color: #c0c9d1;
    font-size: 11px;
    transition: color 0.15s;
}

.city-item.active .city-item-arrow {
    color: #2980b9;
}

/* ===== İstatistik Bar ===== */
.harita-stats {
    background: linear-gradient(135deg, #152536 0%, #1a3045 100%);
    padding: 14px 24px;
    display: flex;
    justify-content: center;
    gap: 50px;
    color: #fff;
}

.stat {
    text-align: center;
}

.stat-num {
    font-size: 22px;
    font-weight: 700;
}

.stat-lbl {
    font-size: 11px;
    opacity: 0.5;
    margin-top: 2px;
}

/* ===== Alt Detay Paneli ===== */
.ofis-detay-panel {
    display: none;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
    margin-top: 16px;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

    .ofis-detay-panel.active {
        display: block;
    }

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detay-panel-header {
    padding: 18px 24px 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c3e50 100%);
    color: #fff;
}

.detay-panel-icon {
    width: 42px;
    height: 42px;
    background: rgba(41,128,185,0.25);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #5dade2;
    flex-shrink: 0;
}

.detay-panel-title {
    flex: 1;
}

    .detay-panel-title h4 {
        font-size: 18px;
        font-weight: 700;
        margin: 0;
    }

.detay-count-badge {
    font-size: 12px;
    opacity: 0.6;
    display: block;
    margin-top: 2px;
}

.detay-close-btn {
    background: rgba(255,255,255,0.08);
    border: none;
    color: rgba(255,255,255,0.5);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

    .detay-close-btn:hover {
        background: rgba(255,255,255,0.15);
        color: #fff;
    }

/* Detay Paneli - Ofis Kartları */
.detay-panel-content {
    padding: 16px 24px;
}

.detay-ofis-card {
    background: #f8fafb;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 12px;
    border: 1px solid #e8ecf0;
    transition: border-color 0.15s, box-shadow 0.15s;
}

    .detay-ofis-card:hover {
        border-color: #bdd6ea;
        box-shadow: 0 2px 8px rgba(41,128,185,0.08);
    }

    .detay-ofis-card:last-child {
        margin-bottom: 0;
    }

.detay-ofis-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8ecf0;
}

.detay-ofis-badge {
    background: #2980b9;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detay-ofis-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a2b3c;
}

.detay-row {
    display: flex;
    align-items: flex-start;
    padding: 6px 0;
}

.detay-row-icon {
    width: 30px;
    height: 30px;
    background: #e3f0fa;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
    font-size: 12px;
    color: #2980b9;
}

.detay-row-text {
    flex: 1;
}

.detay-row-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #8e99a4;
    font-weight: 600;
    margin-bottom: 2px;
}

.detay-row-value {
    font-size: 13px;
    color: #2c3e50;
    line-height: 1.4;
}

    .detay-row-value a {
        color: #2980b9;
        text-decoration: none;
    }

        .detay-row-value a:hover {
            text-decoration: underline;
        }

.detay-ofis-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e8ecf0;
    flex-wrap: wrap;
}

.detay-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
}

    .detay-btn i {
        font-size: 11px;
    }

.detay-btn-primary {
    background: #2980b9;
    color: #fff;
}

    .detay-btn-primary:hover {
        background: #3498db;
        color: #fff;
    }

.detay-btn-outline {
    background: #fff;
    color: #2c3e50;
    border: 1px solid #dce4ec;
}

    .detay-btn-outline:hover {
        background: #f0f4f8;
    }

.detay-btn-map {
    background: #eaf5ec;
    color: #27ae60;
    border: 1px solid #c8e6c9;
}

    .detay-btn-map:hover {
        background: #d4edda;
    }

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .harita-map-container {
        flex-direction: column;
        height: auto;
    }

    #irtibatMap {
        height: 400px;
    }

    .harita-sidebar {
        width: 100%;
        max-height: 260px;
        border-left: none;
        border-top: 1px solid #e8ecf0;
    }
}

@media (max-width: 768px) {
    #irtibatMap {
        height: 320px;
    }

    .harita-sidebar {
        max-height: 220px;
    }

    .harita-stats {
        gap: 24px;
    }

    .detay-panel-header {
        padding: 14px 16px 10px;
    }

    .detay-panel-content {
        padding: 12px 16px;
    }

    .detay-ofis-actions {
        flex-direction: column;
    }

    .detay-btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    #irtibatMap {
        height: 260px;
    }

    .harita-sidebar {
        max-height: 180px;
    }

    .popup-actions {
        flex-direction: column;
    }
}
