/* GSB Tesis Yönetim Sistemi - Global & Map Styles */
:root {
  --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --primary-navy: #0f172a;
  --secondary-navy: #1e293b;
  --accent-blue: #2563eb;
  --accent-red: #e11d48;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --bg-surface: #ffffff;
  --border-color: #e2e8f0;
  
  /* Category Colors (GSB Emlak Katman Renkleri) */
  --cat-spor: #2563eb;      /* Mavi */
  --cat-genclik: #9333ea;   /* Mor */
  --cat-yurt: #eab308;      /* Sarı */
  --cat-idari: #ea580c;     /* Turuncu */
  --cat-diger: #16a34a;     /* Yeşil */
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: var(--font-family-base);
  color: var(--text-main);
  background-color: #f8fafc;
  overflow: hidden;
}

/* Header Navigation */
.app-header {
  height: 60px;
  width: 100%;
  position: relative;
  z-index: 1000;
}

.bg-dark-navy {
  background-color: var(--primary-navy) !important;
}

.brand-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.brand-title {
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: #f8fafc;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: #94a3b8 !important;
  letter-spacing: 0.02em;
}

.navbar-nav .nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff !important;
}

/* App Main Container */
.app-main {
  height: calc(100vh - 60px);
  width: 100%;
  position: relative;
}

/* Map Wrapper (Tam Ekran) */
.map-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-color: #0b132b;
}

/* Map Controls Custom Styling */
.ol-control {
  width: auto !important;
  max-width: max-content !important;
}

.ol-zoom {
  top: 20px !important;
  left: 20px !important;
  right: auto !important;
  width: auto !important;
  height: auto !important;
  display: inline-block !important;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(8px);
  padding: 4px !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
  border: 1px solid var(--border-color) !important;
}

.ol-zoom button {
  background-color: #ffffff !important;
  color: var(--secondary-navy) !important;
  font-weight: 600 !important;
  font-size: 1.2rem !important;
  border-radius: 8px !important;
  margin: 2px !important;
  width: 34px !important;
  height: 34px !important;
  line-height: 32px !important;
  transition: all 0.15s ease !important;
  border: 1px solid #e2e8f0 !important;
}

.ol-zoom button:hover {
  background-color: #f1f5f9 !important;
  color: var(--accent-blue) !important;
}

.ol-full-screen {
  top: 106px !important;
  left: 20px !important;
  right: auto !important; /* OpenLayers varsayılan right: .5em değerini sıfırlar ve yatay uzamayı engeller */
  width: auto !important;
  height: auto !important;
  display: inline-block !important;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(8px);
  padding: 4px !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
  border: 1px solid var(--border-color) !important;
}

.ol-full-screen button {
  background-color: #ffffff !important;
  color: var(--secondary-navy) !important;
  border-radius: 8px !important;
  width: 34px !important;
  height: 34px !important;
  font-size: 1rem !important;
  border: 1px solid #e2e8f0 !important;
}

.ol-scale-line {
  background: rgba(15, 23, 42, 0.85) !important;
  backdrop-filter: blur(6px);
  border-radius: 6px !important;
  bottom: 20px !important;
  left: 20px !important;
  right: auto !important;
  width: auto !important;
  padding: 4px 8px !important;
}

/* Map Top Quick Toolbar */
.map-top-tools {
  position: absolute;
  top: 20px;
  left: 80px;
  z-index: 10;
  display: flex;
  gap: 8px;
}

.map-tool-btn {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  color: var(--secondary-navy);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.map-tool-btn:hover {
  background: #ffffff;
  color: var(--accent-blue);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* Google Basemap Switcher Floating Widget */
.basemap-switcher-group {
  display: flex;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.basemap-btn {
  border: none;
  background: transparent;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.basemap-btn:hover {
  color: var(--text-main);
}

.basemap-btn.active {
  background: var(--accent-blue);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

/* Bottom Floating Status Bar */
.map-bottom-info {
  position: absolute;
  bottom: 20px;
  left: 170px;
  z-index: 10;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  color: #f8fafc;
  font-size: 0.76rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

/* Map Interactive Feature Popup */
.ol-popup {
  position: absolute;
  background-color: #ffffff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  bottom: 14px;
  left: -50px;
  min-width: 250px;
  max-width: 340px;
  z-index: 99;
  display: none;
}

.ol-popup:after, .ol-popup:before {
  top: 100%;
  border: solid transparent;
  content: " ";
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none;
}

.ol-popup:after {
  border-top-color: #ffffff;
  border-width: 10px;
  left: 48px;
  margin-left: -10px;
}

.ol-popup:before {
  border-top-color: var(--border-color);
  border-width: 11px;
  left: 48px;
  margin-left: -11px;
}

.ol-popup-closer {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 2px;
  line-height: 1;
}

.ol-popup-closer:hover {
  color: var(--text-main);
}

.popup-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  align-items: center;
}

.popup-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--secondary-navy);
  margin-top: 4px;
  margin-bottom: 6px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.popup-details {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--secondary-navy);
  border-top: 1px solid #f1f5f9;
  padding-top: 8px;
}

.popup-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.3;
}

.popup-detail-row i {
  margin-top: 2px;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.popup-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

/* ========================================================
   UNIFIED LEFT SIDEBAR PANEL (SEARCH & LAYERS PANEL)
   ======================================================== */
.map-sidebar-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 360px;
    bottom: 45px;
    max-height: calc(100% - 40px);
    z-index: 20;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.18), 0 4px 10px -3px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    overflow: hidden;
}

.map-sidebar-panel.collapsed {
  transform: translateX(calc(-100% - 40px));
  opacity: 0;
  pointer-events: none;
}

/* Floating Toggle Button to re-open sidebar on Left */
.sidebar-toggle-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 19;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  color: var(--secondary-navy);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
  background: #ffffff;
  color: var(--accent-blue);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

/* Tab Nav Bar inside Left Sidebar */
.panel-tab-nav {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  padding: 5px;
  gap: 4px;
}

.panel-tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 9px 10px;
  font-size: 0.83rem;
  font-weight: 600;
  color: #64748b;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.panel-tab-btn:hover {
  color: #1e293b;
  background: rgba(255, 255, 255, 0.6);
}

.panel-tab-btn.active {
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Tab Content Panes */
.panel-tab-content {
  display: none;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
}

.panel-tab-content.active {
  display: flex;
}

/* Panel Header */
.panel-header {
  padding: 16px 18px 12px 18px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--secondary-navy);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-title i {
  color: var(--accent-blue);
  font-size: 1.1rem;
}

.panel-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.panel-close-btn:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

/* Panel Controls & Quick Actions */
.panel-actions {
  padding: 12px 18px 6px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.action-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-blue);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.15s;
}

.action-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.action-link.text-muted:hover {
  color: var(--text-main) !important;
}

/* Filter Search Input */
.panel-search {
  padding: 8px 18px 12px 18px;
}

.search-wrapper {
  position: relative;
}

.search-wrapper i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.search-input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  font-size: 0.83rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #f8fafc;
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Panel Content / Checkbox List */
.panel-body {
  padding: 6px 18px 18px 18px;
  overflow-y: auto;
  flex: 1;
}

.layer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Custom Card Checkbox Item */
.layer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.layer-item:hover {
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.layer-item.active {
  border-color: rgba(37, 99, 235, 0.4);
  background: #f8faff;
}

.layer-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.layer-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.bg-cat-spor {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8); /* Mavi */
}

.bg-cat-genclik {
  background: linear-gradient(135deg, #a855f7, #7e22ce); /* Mor */
}

.bg-cat-yurt {
  background: linear-gradient(135deg, #eab308, #ca8a04); /* Sarı */
}

.bg-cat-idari {
  background: linear-gradient(135deg, #f97316, #c2410c); /* Turuncu */
}

.bg-cat-diger {
  background: linear-gradient(135deg, #22c55e, #15803d); /* Yeşil */
}

.bg-cat-iller {
  background: linear-gradient(135deg, #0284c7, #0369a1); /* Gökyüzü Mavisi / İl */
}

.bg-cat-ilceler {
  background: linear-gradient(135deg, #6366f1, #4338ca); /* İndigo / İlçe */
}

.layer-section-divider {
  display: flex;
  align-items: center;
  margin: 14px 0 6px 0;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.layer-section-divider::before,
.layer-section-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px dashed var(--border-color);
}

.layer-section-divider span {
  padding: 0 10px;
}

.layer-info {
  display: flex;
  flex-direction: column;
}

.layer-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--secondary-navy);
  line-height: 1.25;
}

.layer-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Custom Checkbox Toggle Switch */
.custom-checkbox-wrapper {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
}

.custom-checkbox-wrapper input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--accent-blue);
  margin: 0;
}

/* Panel Footer Info */
.panel-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border-color);
  background: #f8fafc;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

.footer-hint {
  font-size: 0.73rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

/* ==========================================================================
   Sol Taraf: Tesis Arama Paneli & Sonuç Kartları
   ========================================================================== */
.map-search-panel {
  position: absolute;
  top: 180px;
  left: 14px;
  bottom: 45px;
  width: 340px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
  z-index: 30;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.map-search-panel.collapsed {
  transform: translateX(-390px);
  opacity: 0;
  pointer-events: none;
}

.search-sidebar-toggle-btn {
  position: absolute;
  top: 180px;
  left: 14px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 12px;
  padding: 9px 15px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--secondary-navy);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  z-index: 25;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s ease;
}

.search-sidebar-toggle-btn:hover {
  background: #ffffff;
  color: var(--accent-blue);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.panel-search-box {
  padding: 12px 18px 8px 18px;
  border-bottom: 1px solid #f1f5f9;
}

.search-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-icon {
  position: absolute;
  left: 12px;
  color: var(--accent-blue);
  font-size: 0.95rem;
}

.facility-search-input {
  width: 100%;
  padding: 9px 34px 9px 34px;
  font-size: 0.85rem;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--secondary-navy);
  transition: all 0.2s ease;
}

.facility-search-input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-clear-search {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  font-size: 0.9rem;
}

.btn-clear-search:hover {
  color: var(--text-main);
}

.search-select {
  border-radius: 8px;
  font-size: 0.8rem;
  border-color: var(--border-color);
  background-color: #f8fafc;
}

.search-status-bar {
  padding: 8px 18px;
  display: flex;
  align-items: center;
  background: #fbfcfe;
  border-bottom: 1px solid #f1f5f9;
}

.search-results-body {
  padding: 12px 16px;
  overflow-y: auto;
  flex: 1;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Result Card */
.search-result-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 14px;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.search-result-card:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

.result-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--secondary-navy);
  margin-top: 6px;
  margin-bottom: 4px;
  line-height: 1.3;
}

.result-card-loc {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-zoom-facility {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: var(--accent-blue);
  font-size: 0.73rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-zoom-facility:hover {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-blue);
}

.search-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.search-empty-icon {
  font-size: 2.2rem;
  color: #cbd5e1;
  margin-bottom: 10px;
  display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .map-search-panel {
    width: calc(100% - 30px);
    left: 15px;
    top: 15px;
    bottom: 15px;
    max-height: calc(100% - 30px);
  }

  .map-sidebar-panel {
    width: calc(100% - 30px);
    right: 15px;
    top: 15px;
    bottom: 15px;
    max-height: calc(100% - 30px);
  }
  
  .map-top-tools {
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
  }
  
  .map-bottom-info {
    display: none;
  }
}

/* Multi-Level Navigation Dropdown Styling */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu > .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -6px;
  margin-left: -1px;
  border-radius: 12px;
  padding: 8px 0;
  min-width: 320px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.dropdown-submenu:hover > .dropdown-menu {
  display: block;
}

.dropdown-submenu > a:after {
  display: block;
  content: " ";
  float: right;
  width: 0;
  height: 0;
  border-color: transparent;
  border-style: solid;
  border-width: 5px 0 5px 5px;
  border-left-color: #64748b;
  margin-top: 5px;
  margin-right: -10px;
}

.dropdown-submenu:hover > a:after {
  border-left-color: #2563eb;
}

.dropdown-menu .dropdown-item {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 16px;
  color: #1e293b;
  white-space: normal;
  word-wrap: break-word;
  transition: all 0.15s ease;
}

.dropdown-menu .dropdown-item:hover {
  background-color: #f1f5f9;
  color: #2563eb;
}

/* Floating Active Thematic Map Bar (Sürüklenebilir Yapı) */
.thematic-active-bar {
  position: absolute;
  top: 75px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #ffffff;
  padding: 8px 18px 8px 12px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  max-width: 92%;
  flex-wrap: wrap;
  justify-content: center;
  touch-action: none;
}

.thematic-active-bar.is-dragging {
  opacity: 0.92;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  transition: none !important;
  user-select: none;
}

.thematic-drag-handle {
  cursor: grab;
  cursor: move;
  padding: 4px 6px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.65);
  transition: all 0.2s ease;
  user-select: none;
}

.thematic-drag-handle:hover, .thematic-drag-handle:active {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.thematic-active-bar.is-dragging .thematic-drag-handle {
  cursor: grabbing;
  color: #38bdf8;
}

.thematic-active-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.thematic-year-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.thematic-year-dropdown {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  font-size: 0.8rem;
  padding: 1px 8px;
  height: 26px;
  cursor: pointer;
  font-weight: 700;
  outline: none;
  transition: all 0.2s ease;
}

.thematic-year-dropdown:hover, .thematic-year-dropdown:focus {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.6);
}

.thematic-year-dropdown option {
  background: #0f172a;
  color: #ffffff;
}

/* Tematik Bar Gizle / Küçült Butonları */
.btn-minimize-thematic {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  outline: none;
}

.btn-minimize-thematic:hover {
  background: rgba(255, 255, 255, 0.32);
  border-color: #ffffff;
  transform: translateY(-1px);
}

/* Küçültülmüş Tematik Harita Barı Açma Düğmesi (Mobil & Masaüstü) */
.thematic-mini-toggle-btn {
  position: absolute;
  top: 75px;
  left: 20px;
  z-index: 24;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 7px 15px;
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.28);
  transition: all 0.2s ease;
}

.thematic-mini-toggle-btn:hover {
  background: rgba(15, 23, 42, 1);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* Pop-up Google Maps "Beni Buraya Götür" Rota Butonu */
.btn-popup-navigate {
  width: 100%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.38);
  transition: all 0.2s ease;
  letter-spacing: -0.01em;
}

.btn-popup-navigate:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 5px 16px rgba(16, 185, 129, 0.55);
  transform: translateY(-1px);
  color: #ffffff;
  text-decoration: none;
}

/* Pop-up Buton Kaydırma Konteynırı (Haritada Az Yer Kaplaması İçin) */
.popup-action-scroll-container {
  max-height: 98px;
  overflow-y: auto;
  padding-right: 4px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border-color);
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.popup-action-scroll-container::-webkit-scrollbar {
  width: 5px;
}

.popup-action-scroll-container::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

.popup-action-scroll-container::-webkit-scrollbar-thumb {
  background: #10b981;
  border-radius: 10px;
}

.popup-action-scroll-container::-webkit-scrollbar-thumb:hover {
  background: #059669;
}

.btn-popup-navigate:active {
  transform: translateY(0);
}

/* Kompakt Altlık & Odaklanma Barı (Sağ Panel İçinde) */
.panel-basemap-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.basemap-icon-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.basemap-icon-divider {
  width: 1px;
  height: 20px;
  background: #cbd5e1;
  margin: 0 4px;
}

.basemap-icon-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.basemap-icon-btn:hover {
  background: #f1f5f9;
  color: #2563eb;
  border-color: #93c5fd;
  transform: translateY(-1px);
}

.basemap-icon-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

.basemap-icon-btn:focus {
  outline: none;
}

/* GeoServer Renkli Lejant Alanı */
.thematic-legend-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(30, 41, 59, 0.75);
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.76rem;
  font-weight: 500;
  color: #f1f5f9;
}

.legend-color-box {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  display: inline-block;
  flex-shrink: 0;
}

.legend-title-text {
  color: #ffffff;
  font-weight: 600;
}

.legend-img {
  max-height: 32px;
  border-radius: 4px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}

.btn-remove-thematic {
  background: rgba(225, 29, 72, 0.85);
  color: #ffffff;
  border: none;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-remove-thematic:hover {
  background: #e11d48;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.4);
}

/* Layer Reordering Controls (Up/Down Buttons) */
.layer-reorder-btns {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-right: 8px;
  flex-shrink: 0;
}

.btn-layer-reorder {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  width: 20px;
  height: 18px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-size: 0.68rem;
  transition: all 0.15s ease;
}

.btn-layer-reorder:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.btn-layer-reorder:focus {
  outline: none;
}

.bg-cat-tematik {
  background: linear-gradient(135deg, #0284c7, #2563eb);
}

.btn-delete-thematic {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 4px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
  font-size: 0.9rem;
}

.btn-delete-thematic:hover {
  color: #e11d48;
  background: #fee2e2;
}

/* Layer Card Flex Layout Adjustment for Opacity Slider */
.layer-item {
  flex-direction: column !important;
  align-items: stretch !important;
  padding: 10px 12px !important;
  gap: 8px !important;
}

.layer-item-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* Horizontal Opacity Slider Styling */
.layer-opacity-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border-radius: 8px;
  padding: 4px 8px;
  border: 1px solid #f1f5f9;
  width: 100%;
}

.opacity-icon {
  font-size: 0.76rem;
  color: #64748b;
  flex-shrink: 0;
}

.layer-opacity-slider {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: #cbd5e1;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.layer-opacity-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #2563eb;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.4);
  transition: transform 0.1s ease;
}

.layer-opacity-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.layer-opacity-slider::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #2563eb;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.4);
}

.opacity-value {
  font-size: 0.7rem;
  font-weight: 700;
  color: #475569;
  min-width: 32px;
  text-align: right;
  flex-shrink: 0;
}

/* OpenLayers Scale Control Styling (Sol Alt Ölçek Göstergesi) */
.ol-scale-line {
  background: rgba(15, 23, 42, 0.88) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-radius: 8px !important;
  padding: 5px 9px !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
  bottom: 14px !important;
  left: 14px !important;
}

.ol-scale-line-inner {
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  border-top: none !important;
  color: #ffffff !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 0.76rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  text-align: center !important;
  margin: 1px !important;
  padding: 0 6px !important;
}

/* Modal İçi KYGM Yurt Arama Widget'ı */
.kygm-search-widget {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 100;
  width: 280px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  color: #f8fafc;
  overflow: hidden;
  transition: all 0.25s ease;
}

.kygm-search-widget.collapsed .kygm-search-body {
  display: none;
}

.kygm-search-header {
  padding: 10px 14px;
  background: rgba(30, 41, 59, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  user-select: none;
}

.kygm-search-body {
  padding: 12px;
}

.btn-kygm-toggle {
  background: transparent;
  border: none;
  color: #f59e0b;
  font-size: 1rem;
  padding: 0;
  line-height: 1;
  cursor: pointer;
}

.kygm-search-results-list {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kygm-search-item {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.kygm-search-item:hover {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.5);
}

.kygm-search-item-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 2px;
}

.kygm-search-item-sub {
  font-size: 0.73rem;
  color: #94a3b8;
}
