/* styles.css */

/* =========================
   CSS Variables - Color Scheme
========================= */
:root {
  /* Nut Brown Colors */
  --color-primary: #5D382F;
  --color-primary-dark: #180404;
  --color-primary-light: #A86E58;         
  --color-primary-hover: rgba(93, 56, 47, 0.4);
  --color-primary-bg-light: rgba(93, 56, 47, 0.1);

  /* Candle Wax Red Colors */
  --color-secondary-light: #D72329;
  --color-secondary: #760F13;
  --color-earth-tone-light: #FF6B70;

  /* Neutral Colors */
  --color-gray: #95a5a6;
  --color-gray-dark: #7f8c8d;
  --color-text-dark: #2c3e50;
  --color-text-light: #7f8c8d;
  --color-border: #e0e0e0;
  --color-border-light: #f0f0f0;
  
  /* Status Colors */
  --color-warning-bg: #fff3cd;
  --color-warning-text: #856404;
  --color-warning-border: #ffeeba;
  --color-info-bg: #d1ecf1;
  --color-info-text: #0c5460;
  --color-info-border: #bee5eb;
  --color-success: #155724;
  
  /* Background Colors */
  --color-bg-light: #f4f4f4;
  --color-bg-section: #f8f9fa;
  --color-white: #ffffff;
  
  /* Spacing */
  --header-height: 70px;
  --drawer-peek-height: 80px;
}

/* =========================
   Reset & Base
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Rubik', sans-serif;
  background: var(--color-bg-light);
  color: #333;
  overflow: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =========================
   Splash Screen
========================= */
#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-light) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeOut 0.5s ease-in-out 1.5s forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

#splash-screen img {
  width: 180px;
  height: 180px;
  margin-bottom: 20px;
  animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

#splash-screen h1 {
  font-family: 'Righteous', cursive;
  color: var(--color-primary-dark);
  font-size: 2.5em;
  animation: slideUp 0.5s ease-out 0.2s both;
}

#splash-screen p {
  color: var(--color-primary-dark);
  font-size: 1.1em;
  animation: slideUp 0.5s ease-out 0.4s both;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* =========================
   Header Bar
========================= */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--color-secondary-light);
  border-bottom: 2px solid var(--color-secondary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 100;
  height: var(--header-height);
}

.header-left,
.header-right {
  flex: 0 0 auto;
  display: flex;
  min-width: 60px;
}

.header-left {
  justify-content: flex-start;
}

.header-right {
  justify-content: flex-end;
}

.header-center {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-width: 0;
}

.site-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.site-title {
  text-align: center;
}

.site-title h1 {
  font-family: 'Righteous', cursive;
  font-size: 1.8em;
  color: var(--color-primary-dark);
  margin: 0;
  line-height: 1;
}

.site-title p {
  font-size: 0.85em;
  color: var(--color-primary-dark);
  margin: 4px 0 0 0;
}

/* Menu Buttons */
.menu-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

.menu-button:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--color-primary-hover);
}

.menu-button.active {
  background: var(--color-primary-dark);
}

/* =========================
   Dropdown Menus
========================= */
.dropdown-menu {
  position: relative;
}

.menu-content {
  position: absolute;
  top: calc(100% + 12px);
  background: var(--color-white);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 200;
}

.dropdown-menu.open .menu-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Main Menu */
#main-menu .menu-content {
  left: 0;
  width: 340px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.menu-content-inner {
  padding: 24px;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text-dark);
  font-size: 0.95em;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  font-size: 15px;
  transition: border-color 0.3s;
  font-family: 'Rubik', sans-serif;
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* =========================
   Input with Button 
========================= */
.input-with-button {
  display: flex;
  gap: 8px;
  position: relative;
}

.input-with-button input {
  flex: 1;
}

.btn-find {
  padding: 12px 16px;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-find:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--color-primary-hover);
}

.btn-find:active {
  transform: translateY(0);
}

/* =========================
   Autocomplete Suggestions 
========================= */
.suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-top: 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  display: none;
}

.suggestions.active {
  display: block;
}

.suggestion-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--color-border-light);
  transition: background 0.2s;
  font-size: 14px;
  line-height: 1.4;
}

.suggestion-item:hover,
.suggestion-item.active {
  background: var(--color-primary-bg-light);
}

.suggestion-item:last-child {
  border-bottom: none;
}

/* Custom scrollbar for suggestions */
.suggestions::-webkit-scrollbar {
  width: 6px;
}

.suggestions::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

/* =========================
   Form Buttons
========================= */
.paw-icon {
  color: var(--color-white);
}

.btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Rubik', sans-serif;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  margin-bottom: 12px;
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--color-primary-hover);
}

.btn-secondary {
  background: var(--color-gray);
  color: var(--color-white);
}

.btn-secondary:not(:disabled) {
  background: var(--color-primary);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.help-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.9em;
  padding: 8px;
  border-radius: 6px;
  transition: background 0.3s;
}

.help-link:hover {
  background: var(--color-primary-bg-light);
}

/* Context Menu */
/* Context Menu - Enhanced for buttons and items */
#context-menu .menu-content {
  right: 0;
  width: 280px;
}

/* Main menu keeps full padding */
#main-menu .menu-content-inner {
  padding: 24px;
}

/* Context menu uses tighter padding */
#context-menu .menu-content-inner {
  padding: 12px 0;
}

/* Menu Items (clickable divs) */
.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-border-light);
  cursor: pointer;
  transition: background 0.2s;
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item:hover {
  background: var(--color-primary-bg-light);
}

.menu-item-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--color-text-dark);
  font-weight: 500;
}

.menu-item-icon {
  font-size: 1.1em;
  width: 20px;
  text-align: center;
}

/* Buttons in Context Menu */
.menu-content .btn {
  width: calc(100% - 24px); /* Account for horizontal padding */
  margin: 8px 12px;
  padding: 12px 16px;
  font-size: 14px;
  border-radius: 6px;
}

.menu-content .btn-secondary {
  margin-bottom: 6px;
}

.menu-content .btn:first-of-type {
  margin-top: 12px;
}

.menu-content .btn:last-of-type {
  margin-bottom: 12px;
}

/* Section dividers for better organization */
.menu-section {
  border-bottom: 1px solid var(--color-border-light);
  padding: 8px 0;
}

.menu-section:last-child {
  border-bottom: none;
}

/* Links in Context Menu (like Help) */
.menu-content .help-link,
.menu-content a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  margin: 0;
  color: var(--color-text-dark);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 0;
  transition: background 0.2s;
}

.menu-content .help-link:hover,
.menu-content a:hover {
  background: var(--color-primary-bg-light);
}

/* Toggle Switch - slightly smaller */
.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  background: #ccc;
  border-radius: 22px;
  transition: background 0.3s;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle-switch.active {
  background: var(--color-primary);
}

.toggle-switch::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--color-white);
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.3s;
}

.toggle-switch.active::before {
  transform: translateX(18px);
}

/* =========================
   Round Trip Form Styles
========================= */

/* Route type selector */
.route-type-label {
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
}

.route-type-options {
  display: flex;
  gap: 8px;
}

.route-type-radio {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 8px 12px;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  transition: all 0.3s;
  font-size: 0.9em;
  text-align: center;
}

.route-type-radio:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-bg-light);
}

.route-type-radio input[type="radio"] {
  cursor: pointer;
  accent-color: var(--color-primary);
}

.route-type-radio input[type="radio"]:checked + span {
  font-weight: 600;
  color: var(--color-primary);
}

/* Round trip fields container */
.round-trip-fields {
  display: none;
}

/* Range sliders */
.range-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--color-border);
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  transition: all 0.3s;
}

.range-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  border: none;
  transition: all 0.3s;
}

.range-slider::-webkit-slider-thumb:hover {
  background: var(--color-primary-dark);
  transform: scale(1.15);
}

.range-slider::-moz-range-thumb:hover {
  background: var(--color-primary-dark);
  transform: scale(1.15);
}

.range-value {
  font-weight: 700;
  color: var(--color-primary);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8em;
  color: var(--color-text-light);
  margin-top: 4px;
}

/* Checkbox styling */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  cursor: pointer;
  accent-color: var(--color-primary);
}

/* Seed input */
.seed-input {
  margin-top: 8px;
  width: 100%;
}

.input-hint {
  font-size: 0.8em;
  color: var(--color-text-light);
  margin-top: 4px;
  margin-bottom: 0;
}

/* Campground section */
.campground-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border-light);
}

.campground-section .btn {
  width: 100%;
}

.campground-hint {
  font-size: 0.85em;
  color: var(--color-text-light);
  margin-top: 8px;
  text-align: center;
  margin-bottom: 0;
}

/* =========================
   Tooltip/Hint Popover
========================= */
.hint-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  font-size: 14px;
  max-width: 280px;
  z-index: 300;
  animation: hintFadeIn 0.4s ease-out 2s both;
  pointer-events: none;
}

.hint-popover::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 20px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid var(--color-primary);
}

.hint-popover.fade-out {
  animation: hintFadeOut 0.3s ease-out forwards;
}

@keyframes hintFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hintFadeOut {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  padding: 16px 20px;
  z-index: 10000;
  transform: translateX(400px);
  transition: transform 0.3s ease;
  max-width: 350px;
}

.toast.show {
  transform: translateX(0);
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.toast-message {
  color: #333;
  font-size: 14px;
  line-height: 1.4;
}

.toast-error {
  border-left: 4px solid #d32f2f;
}

.toast-success {
  border-left: 4px solid #388e3c;
}

.toast-info {
  border-left: 4px solid #1976d2;
}

/* ===== INLINE ERROR MESSAGES ===== */
.error-message {
  color: #d32f2f;
  font-size: 13px;
  margin-top: 4px;
  display: none;
  animation: slideDown 0.2s ease;
}

.error-message.show {
  display: block;
}

.input-error {
  border-color: #d32f2f !important;
  background-color: #fff5f5 !important;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   Map Container
========================= */
#map {
  flex: 1;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* =========================
   Bottom Drawer
========================= */
#drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-white);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
  z-index: 150;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: calc(100vh - var(--header-height));
  display: flex;
  flex-direction: column;
}

#drawer.collapsed {
  transform: translateY(calc(100% - var(--drawer-peek-height)));
}

#drawer.half-open {
  transform: translateY(calc(100% - 45vh));
}

#drawer.full-open {
  transform: translateY(0);
  height: calc(100vh - var(--header-height));
}

.drawer-handle {
  width: 100%;
  padding: 16px;
  text-align: center;
  cursor: grab;
  position: relative;
}

.drawer-handle:active {
  cursor: grabbing;
}

.drawer-handle-bar {
  width: 40px;
  height: 4px;
  background: #ccc;
  border-radius: 2px;
  margin: 0 auto 12px;
}

.drawer-peek {
  padding: 0 20px 16px;
  border-bottom: 1px solid #eee;
}

.drawer-peek h3 {
  font-size: 1.2em;
  color: var(--color-text-dark);
  margin-bottom: 8px;
}

.route-summary {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.summary-item {
  flex: 1;
  min-width: 120px;
}

.summary-item .label {
  font-size: 0.85em;
  color: var(--color-text-light);
  margin-bottom: 4px;
}

.summary-item .value {
  font-size: 1.3em;
  font-weight: 700;
  color: var(--color-text-dark);
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  padding-bottom: 60px; 
}

.drawer-section {
  margin-bottom: 32px;
}

.drawer-section h3 {
  font-size: 1.1em;
  color: var(--color-text-dark);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.drawer-section p {
  margin: 8px 0;
  line-height: 1.6;
}

.drawer-minimize {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.drawer-minimize:hover {
  background: var(--color-primary-dark);
  transform: translateY(-50%) scale(1.1);
}

.drawer-minimize:active {
  transform: translateY(-50%) scale(0.95);
}

/* Rotate arrow based on drawer state */
#drawer.collapsed .drawer-minimize {
  transform: translateY(-50%) rotate(180deg);
}

#drawer.collapsed .drawer-minimize:hover {
  transform: translateY(-50%) rotate(180deg) scale(1.1);
}

.warning-box {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
  border: 1px solid var(--color-warning-border);
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 0.9em;
  line-height: 1.6;
}

.info-box {
  background: var(--color-info-bg);
  color: var(--color-info-text);
  border: 1px solid var(--color-info-border);
  padding: 16px;
  border-radius: 8px;
  margin-top: 24px;
  font-size: 0.9em;
}

#elevation-container {
  background: var(--color-bg-section);
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  height: 250px;
}

#elevationChart {
  width: 100%;
  height: 100%;
}

#road-summary,
#campsite-summary,
#weather-conditions {
  color: #555;
  line-height: 1.6;
}

.source-attribution {
  font-size: 0.85em;
  color: var(--color-text-light);
  margin-top: 8px;
  font-style: italic;
}

footer {
  text-align: center;
  padding: 16px;
  font-size: 0.85em;
  color: var(--color-text-light);
}

/* =========================
   Progress Pane
========================= */
.progress-pane {
  padding: 8px 12px;
  background: var(--color-info-bg);
  border-radius: 8px;
  font-size: 0.85em;
  text-align: center;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-pane h3 {
  font-size: 1em;
  margin-bottom: 12px;
  color: var(--color-text-dark);
}

.progress-pane p {
  padding: 4px 0;
  margin: 0;
}

.progress-pane p.done {
  color: var(--color-success);
}

.progress-pane p.pending {
  color: var(--color-warning-text);
}

/* =========================
   Help Overlay
========================= */
.help-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-overlay[hidden] {
  display: none;
}

.help-panel {
  position: relative;
  background: #ffffff;
  color: #222;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 14px;
  padding: 1.5rem 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.help-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-primary-dark);
}

.help-close:hover {
  color: var(--color-secondary);
}

.help-panel h2 {
  font-family: 'Righteous', cursive;
  font-size: 1.6em;
  color: var(--color-primary-dark);
  margin-bottom: 1rem;
}

.help-panel h3 {
  font-size: 1.1em;
  color: var(--color-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.help-panel p {
  line-height: 1.6;
  margin-bottom: 0.75rem;
  color: var(--color-text-dark);
}

.help-panel ol, ul {
  margin: 0.5rem 0 1rem 1.2rem;
}

.help-panel li {
  margin-bottom: 0.4rem;
}

.help-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border-light);
}

.help-section:last-child {
  border-bottom: none;
}


/* Hide scrollbar but keep functionality */
.menu-content::-webkit-scrollbar,
.drawer-content::-webkit-scrollbar {
  width: 6px;
}

.menu-content::-webkit-scrollbar-thumb,
.drawer-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}


/* =========================
   Responsive
========================= */
@media (max-width: 768px) {
  .site-title p {
    display: none;
  }
  
  .site-logo {
    width: 36px;
    height: 36px;
  }
  
  .header-center {
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .site-title h1 {
    font-size: 1.5em;
  }
  
  .site-logo {
    width: 32px;
    height: 32px;
  }
  
  .header-center {
    gap: 8px;
  }
  
  .btn-find {
    padding: 12px;
    font-size: 14px;
  }
}

@media (max-width: 360px) {
  .site-title h1 {
    font-size: 1.3em;
  }
  
  .site-logo {
    width: 28px;
    height: 28px;
  }
  
  .header-center {
    gap: 6px;
  }
}

/* =========================
   GPX Layer Control Styles
========================= */

.gpx-layers-container {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.gpx-layers-container.has-layers {
  max-height: 400px;
  overflow-y: auto;
}

.gpx-layers-list {
  padding: 0 12px;
}

.no-layers-message {
  padding: 16px 8px;
  text-align: center;
  color: var(--color-text-light);
  font-size: 0.85em;
  font-style: italic;
}

.gpx-layer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--color-border-light);
  transition: background 0.2s;
}

.gpx-layer-item:last-child {
  border-bottom: none;
}

.gpx-layer-item:hover {
  background: var(--color-bg-section);
}

.layer-color-indicator {
  width: 4px;
  height: 36px;
  border-radius: 2px;
  flex-shrink: 0;
}

.layer-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.layer-name {
  font-size: 0.9em;
  font-weight: 600;
  color: var(--color-text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.layer-details {
  font-size: 0.75em;
  color: var(--color-text-light);
}

.layer-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.layer-action-btn {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
  padding: 0;
}

.layer-action-btn:hover {
  background: var(--color-primary-bg-light);
  border-color: var(--color-primary);
  transform: scale(1.05);
}

.layer-action-btn.toggle-btn {
  opacity: 0.5;
}

.layer-action-btn.toggle-btn.active {
  opacity: 1;
  background: var(--color-primary-bg-light);
}

.layer-action-btn.remove-btn:hover {
  background: #ffebee;
  border-color: #ef5350;
  color: #d32f2f;
}

/* Scrollbar for layers list */
.gpx-layers-container::-webkit-scrollbar {
  width: 6px;
}

.gpx-layers-container::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.gpx-layers-container::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* End of styles.css */