.main {
  overflow: hidden;
  background: var(--navy-deep);
  position: relative;
}

/* wrapper */
#map_wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* mapbox container */
#map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* sağ kontrol butonları */
.nb-controls {
  position: absolute;
  z-index: 5;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
  flex-direction: column;
}

.nb-btn {
  font: 12px/1.2 Arial;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: #111;
  color: #fff;
  cursor: pointer;
  opacity: 0.9;
  white-space: nowrap;
}
.nb-btn:hover     { opacity: 1; }
.nb-btn-primary   { background: #0099CC; }
.nb-btn-danger    { background: rgba(220,38,38,0.85); }
.nb-btn.draw-active { background: #0099CC; outline: 2px solid #fff; }

/* rota çizim araç çubuğu */
.route-bar {
  display: none;
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  align-items: center;
  gap: 6px;
  background: rgba(0,20,50,0.88);
  border-radius: 10px;
  padding: 8px 12px;
  z-index: 10;
  backdrop-filter: blur(4px);
}
.route-bar.active { display: flex; }

.route-name-input {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  color: #fff;
  padding: 5px 9px;
  font-size: 12px;
  width: 150px;
  outline: none;
}
.route-name-input::placeholder { color: rgba(255,255,255,0.4); }

.route-dist {
  color: rgba(255,255,255,0.75);
  font-size: 12px;
  min-width: 52px;
  text-align: center;
  font-family: monospace;
}
.route-fuel-label {
  color: rgba(255,200,100,0.9);
  min-width: 60px;
}

/* bilgi kartı */
.nb-card {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -240px;
  background: #fff;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  box-shadow: 0 -6px 24px rgba(0,0,0,0.18);
  z-index: 20;
  transition: bottom .25s ease;
  font: 14px/1.3 Arial;
}
.nb-card.active { bottom: 0; }

.nb-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #eee;
}
.nb-card-title  { font-weight: 700; }
.nb-card-close  {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 22px;
  cursor: pointer;
  padding: 2px 8px;
}
.nb-card-body {
  padding: 12px 14px 16px;
  max-height: 180px;
  overflow: auto;
}

/* accordion */
.map-section { border-bottom: 1px solid rgba(255,255,255,0.07); }
.map-section summary { list-style: none; }
.map-section summary::-webkit-details-marker { display: none; }

.map-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  user-select: none;
  transition: background .15s;
}
.map-section-head:hover { background: rgba(255,255,255,0.05); }
.map-section-arrow { margin-left: auto; opacity: .5; transition: transform .2s; flex-shrink: 0; }
.map-section[open] .map-section-arrow { transform: rotate(180deg); }

.map-section-body { padding: 2px 0 6px; }

.map-section-empty {
  padding: 8px 16px;
  font-size: 11px;
  color: rgba(255,255,255,0.3);
}

/* katman toggle */
.layer-toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  cursor: pointer;
  transition: background .15s;
}
.layer-toggle-item:hover { background: rgba(255,255,255,0.05); }
.layer-toggle-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
}
.layer-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.layer-chk {
  appearance: none;
  -webkit-appearance: none;
  width: 32px; height: 18px;
  background: rgba(255,255,255,0.15);
  border-radius: 9px;
  position: relative;
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
}
.layer-chk::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s;
}
.layer-chk:checked { background: #0099CC; }
.layer-chk:checked::after { transform: translateX(14px); }

/* sidebar rota listesi */

.route-list-item {
  cursor: pointer;
  justify-content: space-between;
}

.route-item-name {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
}
.route-item-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-item-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.route-item-meta small {
  opacity: .55;
  font-size: 10px;
}

.route-del-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.35);
  font-size: 15px;
  padding: 0 2px;
  line-height: 1;
  transition: color .15s;
}
.route-list-item:hover .route-del-btn { color: rgba(255,100,100,0.8); }

/* waypoint bar */
.waypoint-bar {
  display: none;
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  align-items: center;
  gap: 6px;
  background: rgba(140,20,20,0.90);
  border-radius: 10px;
  padding: 8px 12px;
  z-index: 10;
  backdrop-filter: blur(4px);
}
.waypoint-bar.active { display: flex; }

/* ── POI popup ─────────────────────────────────── */
.poi-popup { font-size: 13px; line-height: 1.6; }
.poi-popup-title { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.poi-popup div  { color: #333; }
.poi-popup b    { color: #111; }

/* ── Waypoint create/edit popup ───────────────── */
.wp-create-popup {
  position: relative;
  padding-top: 2px;
}
.wp-popup-x {
  position: absolute;
  top: -6px;
  right: -6px;
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #999;
  padding: 0 3px;
}
.wp-popup-x:hover { color: #333; }
.wp-popup-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 8px;
  padding: 5px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
}
.wp-popup-input:focus { border-color: #4a90e2; }
.wp-input-error       { border-color: #D63031 !important; }

/* ── Waypoint ikon picker ──────────────────────── */
.wp-picker-name {
  font: 600 13px/1 sans-serif;
  color: #333;
  margin-bottom: 8px;
  white-space: nowrap;
}
.wp-picker-grid {
  display: flex;
  gap: 5px;
}
.wp-icon-btn {
  background: #f0f0f0;
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.wp-icon-btn:hover  { background: #ddd; }
.wp-icon-btn.active { border-color: #D63031; background: #fff0f0; }
.wp-icon-btn img    { display: block; }

/* ── Derinlik crosshair ────────────────────────── */
.depth-xhair {
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}
.dxh-v {
  width: 2px;
  height: 22px;
  background: #111;
  box-shadow: 0 0 3px rgba(255,255,255,0.8);
}
.dxh-mid {
  display: flex;
  align-items: center;
  gap: 7px;
}
.dxh-h {
  width: 24px;
  height: 2px;
  background: #111;
  box-shadow: 0 0 3px rgba(255,255,255,0.8);
}
.dxh-mid span {
  font: 600 12px/1 sans-serif;
  color: #111;
  white-space: nowrap;
  text-shadow: 0 0 4px #fff, 0 0 4px #fff;
}

