/* Santa Tracker Specific Styles */

:root {
  --santa-red: #c41e3a;
  --santa-green: #0f7a3e;
  --santa-gold: #ffd700;
}

.santa-header {
  padding: 2rem;
  text-align: center;
  background: linear-gradient(
    135deg,
    rgba(196, 30, 58, 0.1) 0%,
    rgba(15, 122, 62, 0.1) 100%
  );
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.back-link {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
}

.back-link:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(-5px);
}

.santa-header h1 {
  margin: 0.5rem 0;
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--santa-red) 0%, var(--santa-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.santa-header p {
  color: var(--text-color);
  opacity: 0.8;
  margin: 0.5rem 0 0;
}

.tracker-container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.control-panel {
  padding: 1.5rem;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--santa-red) 0%, #d32f2f 100%);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 30, 58, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.speed-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 200px;
}

.speed-control label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-color);
  font-weight: 500;
  white-space: nowrap;
}

#speed-slider {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
}

#speed-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--santa-red);
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.3s ease;
}

#speed-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

#speed-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--santa-red);
  cursor: pointer;
  border-radius: 50%;
  border: none;
  transition: all 0.3s ease;
}

#speed-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
}

.map-info-container {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 1.5rem;
  min-height: 600px;
}

.map-container {
  height: 600px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.location-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-height: 600px;
  overflow-y: auto;
}

.location-info h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1.5rem;
  color: var(--primary-color);
}

#location-details {
  flex: 1;
}

.loading-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-color);
  opacity: 0.7;
}

.location-card {
  animation: slideIn 0.5s ease;
}

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

.location-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  color: var(--santa-red);
}

.location-subtitle {
  color: var(--text-color);
  opacity: 0.8;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fun-fact {
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--santa-gold);
  margin: 1rem 0;
  line-height: 1.6;
}

.delivery-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--santa-green);
  font-weight: 600;
  margin-top: 1rem;
}

.stats {
  display: grid;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

.stat-label {
  color: var(--text-color);
  opacity: 0.8;
  font-size: 0.9rem;
}

.stat-value {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 1.1rem;
}

.legend {
  padding: 1.5rem;
}

.legend h3 {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  color: var(--primary-color);
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-color);
}

.legend-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 1rem;
}

.legend-marker.current {
  font-size: 1.2rem;
}

.legend-marker.visited {
  color: var(--santa-green);
  font-weight: bold;
}

.legend-marker.upcoming {
  color: var(--text-color);
  opacity: 0.5;
}

.legend-line {
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--santa-red), var(--santa-gold));
  border-radius: 2px;
}

.santa-footer {
  text-align: center;
  padding: 2rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.santa-footer p {
  color: var(--text-color);
  margin: 0;
  line-height: 1.8;
}

.highlight {
  color: var(--primary-color);
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .map-info-container {
    grid-template-columns: 1fr;
  }

  .location-info {
    max-height: 400px;
  }
}

@media (max-width: 768px) {
  .santa-header h1 {
    font-size: 2rem;
  }

  .back-link {
    position: static;
    display: inline-flex;
    margin-bottom: 1rem;
  }

  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .speed-control {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .map-container {
    height: 400px;
  }

  .legend-items {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* Leaflet Popup Customization */
.leaflet-popup-content-wrapper {
  background: rgba(20, 20, 30, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text-color);
}

.leaflet-popup-content {
  margin: 1rem;
  font-family: 'Inter', sans-serif;
}

.leaflet-popup-tip {
  background: rgba(20, 20, 30, 0.95);
}

.popup-content h4 {
  margin: 0 0 0.5rem;
  color: var(--santa-red);
  font-size: 1.2rem;
}

.popup-content p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.popup-content .popup-time {
  color: var(--santa-gold);
  font-weight: 500;
}
