/* Drone aerial-photo layer — launcher, panel, list and EXIF lightbox.
   Self-contained dark-glass styling that matches the GIS viewers. */

#drone-launch {
  position: fixed;
  left: 14px;
  bottom: 112px;
  z-index: 1400;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: rgba(22, 32, 45, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 10px;
  color: #fde68a;
  font: 700 12px/1 var(--font, Charter, Georgia, serif);
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}
#drone-launch:hover { border-color: rgba(245, 158, 11, 0.8); }
#drone-launch.is-active { background: rgba(245, 158, 11, 0.18); color: #fff; }
.drone-launch-ico { font-size: 15px; line-height: 1; }

#drone-panel {
  position: fixed;
  left: 14px;
  bottom: 158px;
  z-index: 1401;
  width: 290px;
  max-height: 62vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-2, #16202d);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  color: #e2e8f0;
  font-family: var(--font, Charter, Georgia, serif);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}
#drone-panel.is-open { opacity: 1; transform: none; pointer-events: auto; }

.drone-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.drone-panel-title { font-size: 12.5px; font-weight: 800; letter-spacing: 0.02em; color: #f1f5f9; }
.drone-x { background: none; border: none; color: #64748b; font-size: 19px; line-height: 1; cursor: pointer; padding: 0 2px; }
.drone-x:hover { color: #e2e8f0; }

.drone-panel-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; font-size: 11.5px; color: #cbd5e1;
}
.drone-toggle { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.drone-count { color: #94a3b8; font-variant-numeric: tabular-nums; }

.drone-upload-wrap { padding: 0 12px 8px; }
.drone-upload-btn {
  width: 100%; padding: 8px; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(245, 158, 11, 0.5); background: rgba(245, 158, 11, 0.12);
  color: #fcd34d; font-size: 11.5px; font-weight: 700;
}
.drone-upload-btn:hover { background: rgba(245, 158, 11, 0.22); }
.drone-upload-status { font-size: 10.5px; color: #94a3b8; margin-top: 6px; min-height: 13px; }

.drone-list { overflow-y: auto; padding: 4px 6px 6px; }
.drone-empty { color: #64748b; font-size: 11px; text-align: center; padding: 18px 8px; }
.drone-li {
  display: flex; align-items: center; gap: 9px; padding: 6px;
  border-radius: 8px; cursor: pointer;
}
.drone-li:hover { background: rgba(201, 169, 98, 0.08); }
.drone-li-thumb { width: 46px; height: 46px; object-fit: cover; border-radius: 6px; flex: none; background: #0f172a; }
.drone-li-body { min-width: 0; }
.drone-li-title { font-size: 11.5px; font-weight: 600; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drone-li-sub { font-size: 10px; color: #94a3b8; }
.drone-nogps { color: #f59e0b; }

.drone-hint { font-size: 9.5px; color: #64748b; padding: 6px 12px 11px; line-height: 1.35; border-top: 1px solid rgba(255, 255, 255, 0.06); }

/* Lightbox */
#drone-lightbox { position: fixed; inset: 0; z-index: 9500; display: none; }
#drone-lightbox.is-open { display: block; }
.drone-lb-backdrop { position: absolute; inset: 0; background: rgba(2, 6, 12, 0.86); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.drone-lb-card {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(1040px, 94vw); max-height: 92vh; display: flex; flex-direction: column;
  background: var(--bg-2, #16202d); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7); overflow: hidden; color: #e2e8f0;
  font-family: var(--font, Charter, Georgia, serif);
}
@media (min-width: 820px) { .drone-lb-card { flex-direction: row; } }
.drone-lb-close { position: absolute; top: 8px; right: 10px; z-index: 2; font-size: 24px; color: #cbd5e1; }
.drone-lb-img-wrap { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; background: #0b1119; min-height: 240px; }
.drone-lb-img-wrap img { max-width: 100%; max-height: 92vh; object-fit: contain; display: block; }
.drone-lb-meta { flex: 0 0 320px; padding: 16px 16px 14px; overflow-y: auto; }
.drone-lb-grid { display: grid; grid-template-columns: 116px 1fr; gap: 6px 10px; font-size: 12px; }
.drone-lb-k { color: #94a3b8; }
.drone-lb-v { color: #f1f5f9; font-weight: 600; word-break: break-word; }
.drone-lb-actions { display: flex; gap: 10px; align-items: center; margin-top: 16px; }
.drone-lb-link { color: var(--brand, #c9a962); font-size: 12px; font-weight: 700; text-decoration: none; }
.drone-lb-link:hover { text-decoration: underline; }
.drone-lb-del { margin-left: auto; padding: 6px 12px; border-radius: 8px; cursor: pointer; border: 1px solid rgba(248, 113, 113, 0.5); background: rgba(248, 113, 113, 0.12); color: #fca5a5; font-size: 11px; font-weight: 700; }
.drone-lb-del:hover { background: rgba(248, 113, 113, 0.22); }

@media (prefers-reduced-motion: reduce) { #drone-panel { transition: none; } }
@media (max-width: 620px) {
  #drone-panel { left: 10px; right: 10px; width: auto; bottom: 150px; }
  .drone-lb-meta { flex-basis: auto; }
}
