/* ==================== LANDING PAGE STYLES ==================== 
   (All color variables are defined in theme.css - load that first!)
*/

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* ==================== HEADER ==================== */
#top {
  padding: 20px 24px;
  background: linear-gradient(135deg, #f6fbf4, #f0f8ed);
  border-bottom: 1px solid #e0ede6;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

#top h1 {
  margin: 0;
  font-size: 24px;
  color: var(--color-primary);
  font-weight: 700;
  letter-spacing: -0.5px;
}

#top p {
  margin: 6px 0 0 0;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

#map-container {
  height: calc(100vh - 72px);
}

/* ==================== MAP STYLING ==================== */
.leaflet-container {
  border-radius: 10px;
  box-shadow: var(--shadow-xl);
  border: none;
  font-family: inherit;
}

/* ==================== REGION CHIPS (MAP SELECTION) ==================== */
.region-chip {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #ddecd8;
  background: linear-gradient(180deg, #fff, #fbfff0);
  color: var(--color-primary);
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.region-chip:hover {
  background: linear-gradient(180deg, #f9fff6, #f1faea);
  border-color: #ddecd8;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(30,70,20,0.08);
}

.region-chip:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.region-chip:active {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

/* ==================== MENU & NAVIGATION ==================== */
.maps-menu-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.maps-menu-section > div:first-child {
  font-size: 12px;
  color: var(--color-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.maps-menu-section a.region-chip {
  margin-top: 0;
}

/* ==================== HEADER CONTROLS ==================== */
.header-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.header-controls select {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-dark);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.header-controls select:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 115, 2, 0.05);
}

.header-controls select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 115, 2, 0.15);
}

/* ==================== JOBS PANEL ==================== */
.job-item {
  padding: 12px;
  border-bottom: 1px solid #eee;
  margin-bottom: 12px;
  background: #fff;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.job-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.job-item:last-child {
  margin-bottom: 0;
  border-bottom: none;
}

.job-item .job-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.job-status {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: inline-flex;
  align-items: center;
  border: 1px solid;
}

.job-status.pending {
  background: #fef3e8;
  color: #B6B944;
  border-color: #f0e4c3;
}

.job-status.running {
  background: #e8f4f8;
  color: #0101FF;
  border-color: #cce7f0;
  animation: pulse-status 2s ease-in-out infinite;
}

.job-status.done {
  background: #e8f5e9;
  color: #198225;
  border-color: #c8e6c9;
}

.job-status.failed {
  background: #ffebee;
  color: #FF3331;
  border-color: #ef9a9a;
}

@keyframes pulse-status {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.job-id {
  color: #999;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
  margin-left: 8px;
  font-size: 11px;
  font-weight: 500;
}

.job-empty {
  color: var(--text-muted);
  font-style: italic;
  font-size: 12px;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 820px) {
  #top {
    padding: 12px 16px;
    flex-direction: column;
    align-items: flex-start;
  }

  #top h1 {
    font-size: 20px;
  }

  #map-container {
    height: calc(100vh - 120px);
  }

  .header-controls {
    width: 100%;
  }

  .region-chip {
    padding: 6px 10px;
    font-size: 12px;
  }
}

@media (max-width: 600px) {
  #top {
    padding: 10px;
  }

  #top h1 {
    font-size: 18px;
  }

  #map-container {
    padding: 8px;
    height: calc(100vh - 80px);
  }
}

/* ==================== DONATE BUTTON ==================== */
.donate-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.donate-btn:hover {
  opacity: 0.8;
}

.donate-btn::before {
  content: "❤  ";
  color: #FF3331;
  font-size: 16px;
  display: inline-block;
  margin-right: 4px;
}

/* ==================== ACCESSIBILITY ==================== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
