/* =====================================================================
   css/photo-batch.css
   Styles for the multi-photo batch upload panel (map-view).
   Used by js/map-view/drawing/photo-batch-upload.js and
   the dropzone in js/map-view/drawing/photo-upload.js.
   ===================================================================== */

/* ── Full-screen overlay ──────────────────────────────────────────── */

.photo-batch-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 5vh;
  overflow-y: auto;
}

/* When placing a photo on the map: hide the panel, let clicks reach the map */
.photo-batch-overlay.placing {
  background: transparent;
  pointer-events: none;
}

.photo-batch-overlay.placing .photo-batch-panel {
  display: none;
}

/* ── Panel card ───────────────────────────────────────────────────── */

.photo-batch-panel {
  width: 480px;
  max-width: 95vw;
  max-height: 85vh;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Header ───────────────────────────────────────────────────────── */

.photo-batch-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 16px;
  border-bottom: 1px solid #e9ecef;
  background: #fff;
  flex-shrink: 0;
}

/* ── Scrollable entries list ──────────────────────────────────────── */

.photo-batch-list {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

/* ── Per-photo entry ──────────────────────────────────────────────── */

.photo-batch-entry {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.photo-batch-entry:last-child {
  border-bottom: none;
}

.photo-batch-entry-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

/* ── Thumbnail ────────────────────────────────────────────────────── */

.photo-batch-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1px solid #dee2e6;
}

/* ── Entry info column ────────────────────────────────────────────── */

.photo-batch-entry-info {
  flex: 1;
  min-width: 0;
}

.photo-batch-filename {
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── GPS status badge ─────────────────────────────────────────────── */

.photo-batch-gps {
  margin-top: 2px;
}

/* ── Status indicator (spinner/check/error) ───────────────────────── */

.photo-batch-status {
  display: inline-block;
  margin-top: 2px;
}

/* ── Collapsible survey section ───────────────────────────────────── */

.photo-batch-survey {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.photo-batch-survey.open {
  max-height: 2000px;
}

.photo-batch-survey-inner {
  padding-bottom: 8px;
}

/* Chevron rotation for survey toggle */
.photo-batch-chevron {
  display: inline-block;
  transition: transform 0.2s ease;
  font-size: 11px;
}

/* ── Sticky footer ────────────────────────────────────────────────── */

.photo-batch-footer {
  padding: 12px 16px;
  border-top: 1px solid #e9ecef;
  background: #fff;
  flex-shrink: 0;
}

.photo-batch-progress {
  margin-bottom: 8px;
}

/* ── "Place on Map" top bar ───────────────────────────────────────── */

.photo-batch-place-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: rgba(33, 37, 41, 0.92);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  pointer-events: auto;  /* stays clickable when overlay is click-through */
}

/* ── Drag-and-drop zone (in the single-photo upload dialog) ───────── */

.photo-batch-dropzone {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.photo-batch-dropzone:hover {
  border-color: #999;
  background-color: #fafafa;
}

.photo-batch-dropzone.active {
  border-color: #0d6efd;
  background-color: #e8f0fe;
}

/* ── Mobile: full-screen panel ────────────────────────────────────── */

@media (max-width: 576px) {
  .photo-batch-overlay {
    padding-top: 0;
    align-items: stretch;
  }

  .photo-batch-panel {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .photo-batch-thumb {
    width: 56px;
    height: 56px;
  }
}
