/* Arşiv Leaflet harita modu — yalnızca body.archive-map-mode ile birlikte */

#preview-section.map-active .preview-bg,
#preview-section.map-active .video-location,
#preview-section.map-active .video-pips,
#preview-section.map-active .preview-content {
  visibility: hidden;
  pointer-events: none;
}

#preview-section .archive-map-stack {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 25;
  flex-direction: column;
  background: transparent;
}

#preview-section.map-active .archive-map-stack {
  display: flex;
}

.archive-map-toolbar {
  position: relative;
  flex-shrink: 0;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: none;
  backdrop-filter: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

body.dark .archive-map-toolbar {
  background: transparent;
  border: none;
}

.archive-map-toolbar-inner {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1002;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  pointer-events: none;
}

.archive-map-toolbar-inner > * {
  pointer-events: auto;
}

/* Material simgeleri: üst buton inherit ile Inter’a düşmesin */
.archive-map-toolbar-inner .material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: 'liga';
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.archive-map-toolbar-icon {
  font-size: 20px !important;
  line-height: 1;
}

.archive-map-geom-icon {
  display: block;
  flex-shrink: 0;
}

.archive-map-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  font-size: 0;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

body.dark .archive-map-tool-btn {
  background: rgba(30, 41, 59, 0.92);
  border-color: rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.archive-map-tool-btn:hover {
  border-color: #2546a9;
  color: #1e3a8a;
  background: #fff;
}

body.dark .archive-map-tool-btn:hover {
  border-color: #3b82f6;
  color: #f1f5f9;
  background: rgba(51, 65, 85, 0.95);
}

.archive-map-tool-btn[aria-expanded='true'] {
  border-color: #2546a9;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(37, 70, 169, 0.2);
}

body.dark .archive-map-tool-btn[aria-expanded='true'] {
  border-color: #3b82f6;
  background: rgba(51, 65, 85, 0.98);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.archive-map-tool-btn-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
}

.archive-map-layer-dropdown-wrap {
  position: relative;
  z-index: 30;
}

.archive-map-layer-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  min-width: 240px;
  max-height: min(70vh, 380px);
  overflow-y: auto;
  padding: 6px 0;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  box-shadow: 0 12px 40px -8px rgba(15, 23, 42, 0.18);
}

body.dark .archive-map-layer-menu {
  background: #1e293b;
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.45);
}

.archive-map-menu-section {
  padding: 4px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

body.dark .archive-map-menu-section {
  border-bottom-color: rgba(148, 163, 184, 0.12);
}

.archive-map-menu-section:last-child {
  border-bottom: none;
}

.archive-map-menu-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  padding: 6px 14px 4px;
}

body.dark .archive-map-menu-label {
  color: #94a3b8;
}

.archive-map-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: #0f172a;
  cursor: pointer;
  font-family: inherit;
}

body.dark .archive-map-menu-item {
  color: #e2e8f0;
}

.archive-map-menu-item:hover {
  background: rgba(37, 70, 169, 0.08);
}

body.dark .archive-map-menu-item:hover {
  background: rgba(59, 130, 246, 0.12);
}

.archive-map-menu-item.active,
.archive-map-menu-item[aria-checked='true'] {
  background: rgba(37, 70, 169, 0.12);
  font-weight: 700;
  color: #1e3a8a;
}

body.dark .archive-map-menu-item.active,
body.dark .archive-map-menu-item[aria-checked='true'] {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}

.archive-map-canvas-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.archive-map-canvas {
  flex: 1;
  min-height: 0;
  width: 100%;
}

.archive-map-layers-panel {
  position: absolute;
  top: 48px;
  left: 8px;
  z-index: 1001;
  max-width: min(280px, calc(100% - 16px));
  max-height: 104px;
  overflow-y: auto;
  font-size: 11px;
  color: #475569;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.1);
  pointer-events: auto;
}

.archive-map-layers-panel:empty {
  display: none;
  padding: 0;
  border: none;
  box-shadow: none;
}

body.dark .archive-map-layers-panel {
  color: #94a3b8;
  background: rgba(30, 41, 59, 0.94);
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.archive-map-layer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

body.dark .archive-map-layer-row {
  border-bottom-color: rgba(148, 163, 184, 0.12);
}

.archive-map-layer-row:last-child {
  border-bottom: none;
}

.archive-map-layer-row button {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}

.archive-map-layer-row .archive-map-layer-toggle {
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: #fff;
  color: #334155;
}

body.dark .archive-map-layer-row .archive-map-layer-toggle {
  border-color: #475569;
  background: transparent;
  color: #cbd5e1;
}

.archive-map-layer-row .archive-map-layer-remove {
  border: 1px solid rgba(185, 28, 28, 0.35);
  background: transparent;
  color: #b91c1c;
}

body.dark .archive-map-layer-row .archive-map-layer-remove {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.4);
}

/* Sağ sidebar: harita modunda tam genişlik (420px) veya tamamen kapalı */
#archive-sidebar {
  position: relative;
  flex-shrink: 0;
}

body.archive-map-mode #archive-sidebar {
  width: 420px;
  min-width: 0;
  max-width: 420px;
  flex: 0 0 420px;
  transition: flex-basis 0.2s ease, width 0.2s ease, visibility 0.2s ease;
}

body.archive-map-mode.archive-map-sidebar-collapsed #archive-sidebar {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  flex: 0 0 0 !important;
  border-left: none !important;
  overflow: hidden !important;
  visibility: hidden !important;
  pointer-events: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Haritada panel kapalıyken önizleme sağ kenarında aç düğmesi */
.archive-map-sidebar-show {
  display: none;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1200;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid rgba(148, 163, 184, 0.5);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #334155;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.15);
}

body.dark .archive-map-sidebar-show {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
}

.archive-map-sidebar-show:hover {
  border-color: #2546a9;
  color: #1e3a8a;
}

body.dark .archive-map-sidebar-show:hover {
  border-color: #3b82f6;
  color: #93c5fd;
}

.archive-map-sidebar-show .material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 22px;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  -webkit-font-smoothing: antialiased;
}

body.archive-map-mode .archive-map-sidebar-show {
  display: inline-flex;
}

/* POI kompakt modal */
.archive-map-poi-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.archive-map-poi-modal {
  background: #fff;
  border-radius: 14px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

body.dark .archive-map-poi-modal {
  background: #111827;
  border: 1px solid #1f2937;
}

.archive-map-poi-head {
  padding: 14px 16px 10px;
  border-bottom: 1px solid #e2e8f0;
}

body.dark .archive-map-poi-head {
  border-bottom-color: #1f2937;
}

.archive-map-poi-head h3 {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px;
  line-height: 1.3;
}

body.dark .archive-map-poi-head h3 {
  color: #f1f5f9;
}

.archive-map-poi-meta {
  font-size: 11px;
  color: #64748b;
  line-height: 1.45;
}

body.dark .archive-map-poi-meta {
  color: #94a3b8;
}

.archive-map-poi-body {
  padding: 12px 16px 14px;
}

.archive-map-poi-assets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.archive-map-poi-asset {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
}

body.dark .archive-map-poi-asset {
  background: #1e293b;
  color: #94a3b8;
}

.archive-map-poi-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.archive-map-poi-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.archive-map-poi-actions button {
  flex: 1;
  min-width: 100px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
}

body.dark .archive-map-poi-actions button {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

.archive-map-poi-actions button.primary {
  background: linear-gradient(135deg, #2546a9, #1e3a8a);
  color: #fff;
  border: none;
}

.archive-map-poi-actions button.primary:hover {
  filter: brightness(1.05);
}

.archive-map-poi-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.06);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: #64748b;
}

body.dark .archive-map-poi-close {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.archive-map-poi-modal-wrap {
  position: relative;
}

/* Leaflet z-index under our modals */
#archive-map-root .leaflet-container {
  font-family: Inter, system-ui, sans-serif;
}

/* Köşe atıf çubuğu kapalı; metinler kredi modalında listelenir */
#archive-map-root .leaflet-control-attribution {
  display: none !important;
}

.archive-map-menu-section--basemap {
  border-bottom: none;
}
