/* Tab styles */
.tab-container {
  margin-top: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border-radius: 0 0 12px 12px;
  /* "clip" (not "hidden") still clips to the rounded corners but does not
     make this a scroll container, so position:sticky headers inside the
     route tabs (.sticky-summary) stick to the window as you scroll. */
  overflow: clip;
}

.tab-buttons {
  display: flex;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0 20px;
  flex-wrap: wrap;
  gap: 2px;
}

.tab-button {
  background: transparent;
  border: none;
  padding: 16px 24px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  border-bottom: 3px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 120px;
  justify-content: center;
}

.tab-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 8px 8px 0 0;
}

.tab-button:hover {
  color: white;
  transform: translateY(-2px);
}

.tab-button:hover::before {
  opacity: 1;
}

.tab-button.active {
  color: white;
  border-bottom: 3px solid #00d4ff;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.tab-button.active::before {
  opacity: 1;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
}

.tab-button i {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.tab-button:hover i {
  transform: scale(1.1);
}

.tab-button.active i {
  transform: scale(1.1);
  color: #00d4ff;
}

.tab-content {
  display: none;
  padding: 5px;
  background: white;
  border-radius: 0 0 12px 12px;
  box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.05);
  animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
  display: block;
}

/* Reduced margins for Camino route tabs */
.tab-content[id^="camino-"] {
  padding: 5px;
}

.tab-content[id^="camino-"] .main {
  margin: 5px;
}

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

@media (max-width: 768px) {
  .tab-buttons {
    padding: 0 10px;
    flex-wrap: wrap;
  }
  
  .tab-button {
    padding: 12px 16px;
    font-size: 12px;
    min-width: 80px;
    gap: 4px;
  }
  
  .tab-content {
    padding: 5px;
  }
}

@media (max-width: 480px) {
  .tab-button {
    padding: 10px 12px;
    font-size: 11px;
    min-width: 70px;
  }
  
  .tab-button span {
    display: none;
  }
  
  .tab-button i {
    font-size: 14px;
  }
}

/* Checkbox styling for Camino selection */
.checkbox-group {
  display: flex;
  align-items: center;
  padding: 3px 4px;
  margin: 4px 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-radius: 8px;
  border-left: 4px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
}

.checkbox-group:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
  transform: translateX(5px);
}

/* Different colors for different Caminos - removed colored borders */

.checkbox-group input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #3498db;
  border-radius: 4px;
  outline: none;
  transition: all 0.2s ease;
  margin-right: 12px;
  cursor: pointer;
  position: relative;
}

.checkbox-group input[type="checkbox"]:checked {
  background-color: #3498db;
  border-color: #2980b9;
}

.checkbox-group input[type="checkbox"]:checked::before {
  content: '✓';
  position: absolute;
  color: white;
  font-size: 14px;
  font-weight: bold;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.checkbox-group:hover input[type="checkbox"] {
  border-color: #2980b9;
  transform: scale(1.05);
}

.checkbox-group label {
  color: #2c3e50;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  flex-grow: 1;
  transition: color 0.2s ease;
}

.checkbox-group:hover label {
  color: #2980b9;
}

.checkbox-group input[type="checkbox"]:checked + label {
  color: #2980b9;
  font-weight: 600;
}

/* Main content grid layout */
.main-content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.content-section {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.section-header {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(52, 152, 219, 0.3);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.camino-button {
  background: linear-gradient(145deg, #3498db, #2980b9);
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.camino-button:hover {
  background: linear-gradient(145deg, #2980b9, #3498db);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.camino-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tab-close-button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  margin-left: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.tab-close-button:hover {
  background: rgba(255, 255, 255, 0.3);
  color: white;
}

.links-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .main-content-grid {
    grid-template-columns: 1fr;
    padding: 10px;
    gap: 15px;
  }
  
  .checkbox-grid {
    grid-template-columns: 1fr;
  }
  
  .button-grid {
    grid-template-columns: 1fr;
  }
  
  .content-section {
    padding: 15px;
  }
}

/* Hero section */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.1));
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.hero-text h1 { margin: 0 0 6px 0; font-size: 22px; color: #1f2d3d; }
.hero-text p { margin: 0; color: #3a4a5a; font-size: 14px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-btn {
  background: #ffffff;
  color: #1f2d3d;
  border: 1px solid rgba(0,0,0,0.12);
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex; align-items: center; gap: 8px;
}
.hero-btn.primary { background: #00d4ff; color: #003344; border-color: #00b5da; }
.hero-btn:hover { filter: brightness(0.98); }

/* Main toolbar */
.main-toolbar { display: flex; gap: 8px; padding: 10px 20px; }
.toolbar-btn {
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.toolbar-btn:hover { background: #fff; }

/* Route tiles */
.route-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.route-tile {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.route-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,0.08); }
.route-title { font-weight: 600; color: #1f2d3d; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.route-sub { color: #4a5a6a; font-size: 12px; margin-bottom: 8px; }
.route-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.stat-pill { background: #f3f6f9; color: #2d3b47; border: 1px solid #e2e8f0; border-radius: 999px; padding: 4px 8px; font-size: 12px; }

@media (max-width: 768px) {
  .hero { flex-direction: column; align-items: flex-start; }
}
