/* ========================================
   Geotagging fadayadev — Soft Modern Theme
   ======================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  padding: 20px 16px;
  background: #f0f4f9;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Card Container
   ======================================== */
.card {
  background: #ffffff;
  max-width: 480px;
  margin: 0 auto 20px;
  padding: 20px 20px 24px;
  border-radius: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.05);
  border: 1px solid #eef3f8;
}

/* ========================================
   App Header
   ======================================== */
.app-header {
  text-align: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eef3f8;
}

.app-header h3 {
  margin: 0 0 2px;
  font-size: 19px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.4px;
}

.app-header p {
  margin: 0;
  font-size: 12px;
  color: #6b7a8f;
  font-weight: 500;
}

.app-header a {
  text-decoration: none;
  color: #4f7cff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* ========================================
   Map
   ======================================== */
#map {
  height: 180px;
  width: 100%;
  border-radius: 14px;
  margin-bottom: 16px;
  border: 2px solid #eef3f8;
  background: #e8edf3;
  overflow: hidden;
}

/* ========================================
   Canvas Preview
   ======================================== */
#canvas-container {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #e8edf3;
  display: none;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

#canvas {
  width: 100%;
  display: block;
}

.camera-panel {
  margin-bottom: 16px;
  padding: 12px;
  border: 1.5px solid #e0e9f5;
  border-radius: 14px;
  background: #f8faff;
}

.camera-panel label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#cameraPreview {
  width: 100%;
  max-height: 62vh;
  display: block;
  margin-top: 10px;
  border-radius: 12px;
  background: #0f172a;
  object-fit: contain;
}

.camera-actions {
  margin-top: 10px;
}

/* ========================================
   Form Elements
   ======================================== */
.form-group {
  margin-bottom: 14px;
  position: relative;
}

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #dce3ec;
  border-radius: 12px;
  font-size: 14px;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
  color: #1e293b;
}

.form-control:focus {
  outline: none;
  border-color: #4f7cff;
  box-shadow: 0 0 0 3px rgba(79,124,255,0.12);
}

.form-control[readonly] {
  background-color: #f8fafc;
  color: #6b7a8f;
  border-color: #e2eaf2;
}

/* ========================================
   Suggestion Box
   ======================================== */
.suggestion-box {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1.5px solid #dce3ec;
  border-top: none;
  border-radius: 0 0 12px 12px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 9999;
  display: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.suggestion-item {
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  transition: background 0.15s;
}

.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background-color: #f0f5ff; }
.suggestion-item:active { background-color: #e0ecff; }

.text-muted {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: block;
  width: 100%;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  color: white;
  transition: all 0.2s ease;
  font-family: inherit;
  letter-spacing: 0.2px;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.97); }
.btn:hover { filter: brightness(1.06); }

.btn-primary {
  background: linear-gradient(135deg, #4f7cff, #3461e6);
  margin-top: 14px;
  box-shadow: 0 4px 12px rgba(79,124,255,0.3);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  box-shadow: 0 4px 12px rgba(245,158,11,0.25);
}

.btn-info {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  box-shadow: 0 4px 12px rgba(14,165,233,0.25);
}

.btn-success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 4px 12px rgba(34,197,94,0.25);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  margin-top: 10px;
  box-shadow: 0 4px 12px rgba(239,68,68,0.25);
}

.btn:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
  color: #94a3b8;
  box-shadow: none;
  filter: none;
}

/* ========================================
   Status Bar
   ======================================== */
#status {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  padding: 10px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #eef3f8;
}

/* ========================================
   Checkbox Group
   ======================================== */
.checkbox-group {
  margin-top: 14px;
  margin-bottom: 6px;
  padding: 14px 16px;
  background: #f8faff;
  border: 1.5px solid #e0e9f5;
  border-radius: 14px;
}

.checkbox-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #4f7cff;
  margin-bottom: 10px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 10px;
  margin-bottom: 4px;
  cursor: pointer;
  color: #1e293b;
  border-radius: 8px;
  transition: background 0.15s;
}

.checkbox-group label:last-child { margin-bottom: 0; }
.checkbox-group label:hover { background: rgba(79,124,255,0.06); }

.checkbox-group input[type="checkbox"] {
  margin-right: 10px;
  width: 18px;
  height: 18px;
  accent-color: #4f7cff;
  cursor: pointer;
  flex-shrink: 0;
}

/* ========================================
   Button Group
   ======================================== */
.button-group {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  display: none;
}

.button-group .btn {
  margin-top: 0;
  flex: 1;
  padding: 14px 8px;
  font-size: 13px;
}

/* ========================================
   Queue Section
   ======================================== */
.queue-section {
  background: #ffffff;
  padding: 18px 20px;
  border-radius: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.05);
  border: 1px solid #eef3f8;
  max-width: 480px;
  margin: 0 auto;
}

.queue-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  border-bottom: 2px solid #eef3f8;
  padding-bottom: 12px;
  margin-top: 0;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.queue-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  max-height: 260px;
  overflow-y: auto;
}

.queue-item {
  width: calc(33.33% - 7px);
  aspect-ratio: 3/4;
  border-radius: 10px;
  overflow: hidden;
  background: #f1f5f9;
  border: none;
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition: transform 0.2s;
}

.queue-item:hover { transform: scale(1.03); }
.queue-item img { width: 100%; height: 100%; object-fit: cover; }

.queue-delete-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  padding: 5px 7px;
  border: none;
  border-radius: 999px;
  background: rgba(220,38,38,0.92);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.queue-delete-btn:active {
  transform: scale(0.95);
}

.queue-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  color: white;
  font-size: 10px;
  font-weight: 500;
  padding: 12px 6px 6px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#queueCount {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

/* ========================================
   Custom Scrollbar
   ======================================== */
.queue-grid::-webkit-scrollbar,
.suggestion-box::-webkit-scrollbar {
  width: 4px;
}

.queue-grid::-webkit-scrollbar-thumb,
.suggestion-box::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.queue-grid::-webkit-scrollbar-track,
.suggestion-box::-webkit-scrollbar-track {
  background: transparent;
}
