/* Smart Road Trip Planner - Main Stylesheet */

/* Base styles */
:root {
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-light: rgba(59, 130, 246, 0.1);
  --secondary: #ec4899;
  --accent: #8b5cf6;
  --text-primary: #f9fafb;
  --text-secondary: #e5e7eb;
  --text-tertiary: #9ca3af;
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --bg-tertiary: #374151;
  --border-color: #4b5563;
  --card-bg: #1f2937;
  --shadow-color: rgba(0, 0, 0, 0.4);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
}

/* Light mode styles */
[data-theme="light"] {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: rgba(37, 99, 235, 0.1);
  --secondary: #db2777;
  --accent: #7c3aed;
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-tertiary: #6b7280;
  --bg-primary: #f9fafb;
  --bg-secondary: #f3f4f6;
  --bg-tertiary: #e5e7eb;
  --border-color: #d1d5db;
  --card-bg: #ffffff;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
}

body {
  transition: background-color 0.3s ease, color 0.3s ease;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.map-container {
  height: 500px;
  width: 100%;
  border-radius: 0.5rem;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 6px var(--shadow-color);
}

.animate-fadeIn {
  animation: fadeIn 0.5s ease-in-out;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pulse-slow {
  animation: pulse 3s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* Distance overlay */
.distance-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--card-bg);
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 8px;
  z-index: 1000;
  font-weight: bold;
  font-size: 16px;
  border: 1px solid var(--primary);
  box-shadow: 0 2px 4px var(--shadow-color);
  transform: scale(0);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.distance-overlay.active {
  transform: scale(1);
}

/* Image Gallery */
.image-gallery {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.image-gallery.active {
  display: flex;
  animation: fadeIn 0.3s ease-in-out;
}

.gallery-image {
  max-width: 90%;
  max-height: 70vh;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
}

.gallery-controls {
  display: flex;
  gap: 16px;
  margin-top: 20px;
}

.gallery-btn {
  background-color: var(--primary);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-weight: 500;
}

.gallery-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

.gallery-title {
  color: white;
  font-size: 22px;
  margin-bottom: 20px;
  font-weight: bold;
}

.gallery-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 28px;
  cursor: pointer;
  transition: transform 0.2s ease;
  background: rgba(0, 0, 0, 0.5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-close:hover {
  transform: scale(1.1);
  background: rgba(0, 0, 0, 0.7);
}

/* Animated markers */
.bounce-animation {
  animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-15px);
  }
}

/* POI Markers */
.marker-gas {
  background-color: #ff69b4;
  /* Pink */
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.marker-restaurant {
  background-color: #ffd700;
  /* Yellow */
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.marker-hotel {
  background-color: #800080;
  /* Purple */
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.marker-attraction {
  background-color: #0000ff;
  /* Blue */
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* Chatbot styles */
.chatbot-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.chatbot-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s, background-color 0.2s;
}

.chatbot-button:hover {
  transform: scale(1.05);
  background-color: var(--primary);
}

.chatbot-icon {
  font-size: 24px;
}

.chatbot-panel {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 350px;
  height: 450px;
  background-color: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s, opacity 0.3s;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
}

.chatbot-panel.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.chatbot-header {
  background-color: var(--primary);
  color: white;
  padding: 15px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-close {
  cursor: pointer;
  font-size: 20px;
  transition: transform 0.2s;
}

.chatbot-close:hover {
  transform: scale(1.2);
}

.chatbot-messages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chatbot-message {
  padding: 10px 15px;
  border-radius: 18px;
  max-width: 80%;
  word-break: break-word;
}

.bot-message {
  background-color: var(--primary);
  color: white;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.user-message {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chatbot-input-container {
  padding: 10px;
  display: flex;
  border-top: 1px solid var(--border-color);
}

.chatbot-input {
  flex: 1;
  padding: 10px 15px;
  border: none;
  border-radius: 20px;
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  outline: none;
}

.chatbot-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s;
}

.chatbot-send:hover {
  background-color: var(--primary-hover);
}

/* Cost summary styles */
.cost-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.cost-label {
  font-weight: 500;
}

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

.cost-note {
  font-size: 0.75rem;
  margin-top: 10px;
  color: var(--text-tertiary);
}

/* Media queries for responsiveness */
@media (max-width: 768px) {
  .chatbot-panel {
    width: 300px;
    height: 400px;
    right: 0;
  }

  .map-container {
    height: 400px;
  }
}

@media (max-width: 480px) {
  .chatbot-panel {
    width: calc(100vw - 40px);
    right: -20px;
  }

  .gallery-controls {
    flex-direction: column;
    gap: 10px;
  }
}