/* ==========================================================================
   Reiseplan Dashboard - Stylesheet
   Design: Modern, Romantic, Responsive, Elevated Cards & Glassmorphism
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Light Theme (Default) */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --border-subtle: #edf2f7;
  
  --accent-heart: #ec4899;
  --accent-heart-light: #fdf2f8;
  --accent-primary: #6366f1;
  --accent-primary-light: #eef2ff;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.04);
  
  --stage-1: #ec4899;
  --stage-2: #10b981;
  --stage-3: #f59e0b;
  --stage-4: #8b5cf6;
  --stage-5: #3b82f6;
  --stage-6: #f43f5e;
}

/* Dark Theme */
[data-theme="dark"] {
  --bg-primary: #0b0f17;
  --bg-secondary: #131b2e;
  --bg-card: #182238;
  --bg-card-subtle: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --border-color: #2a3754;
  --border-subtle: #1e293b;
  
  --accent-heart-light: rgba(236, 72, 153, 0.15);
  --accent-primary-light: rgba(99, 102, 241, 0.15);

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.35);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.45);
}

/* Sunset Theme */
[data-theme="sunset"] {
  --bg-primary: #fff7ed;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-subtle: #ffedd5;
  --text-primary: #431407;
  --text-secondary: #7c2d12;
  --text-muted: #9a3412;
  --border-color: #fed7aa;
  --border-subtle: #ffedd5;
  
  --accent-heart: #ea580c;
  --accent-heart-light: #fff7ed;
  --accent-primary: #f97316;
  --accent-primary-light: #ffedd5;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
}

/* Glassmorphism & Surface utilities */
.glass-nav {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .glass-nav {
  background: rgba(19, 27, 46, 0.82);
}

[data-theme="sunset"] .glass-nav {
  background: rgba(255, 255, 255, 0.88);
}

.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 102, 241, 0.3);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Category Badges */
.badge-category {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.cat-activity { background: #dbeafe; color: #1d4ed8; }
.cat-sleep { background: #ede9fe; color: #6d28d9; }
.cat-transport { background: #e0e7ff; color: #4338ca; }
.cat-sport { background: #ccfbf1; color: #0f766e; }
.cat-relax { background: #fce7f3; color: #be185d; }
.cat-sightseeing { background: #fef3c7; color: #b45309; }

[data-theme="dark"] .cat-activity { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
[data-theme="dark"] .cat-sleep { background: rgba(139, 92, 246, 0.2); color: #c4b5fd; }
[data-theme="dark"] .cat-transport { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; }
[data-theme="dark"] .cat-sport { background: rgba(20, 184, 166, 0.2); color: #5eead4; }
[data-theme="dark"] .cat-relax { background: rgba(236, 72, 153, 0.2); color: #f9a8d4; }
[data-theme="dark"] .cat-sightseeing { background: rgba(245, 158, 11, 0.2); color: #fde68a; }

/* Stage Indicator Pill */
.stage-pill {
  position: relative;
  overflow: hidden;
}
.stage-pill::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}
.stage-pill.stage-1::before { background-color: var(--stage-1); }
.stage-pill.stage-2::before { background-color: var(--stage-2); }
.stage-pill.stage-3::before { background-color: var(--stage-3); }
.stage-pill.stage-4::before { background-color: var(--stage-4); }
.stage-pill.stage-5::before { background-color: var(--stage-5); }
.stage-pill.stage-6::before { background-color: var(--stage-6); }

/* Day Card Hover & Active effects */
.day-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.day-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pulseSubtle {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.85; }
}

.pulse-heart {
  animation: pulseSubtle 2.5s infinite ease-in-out;
  display: inline-block;
}

/* Leaflet Map Customizations */
.leaflet-popup-content-wrapper {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border-radius: 1rem !important;
  box-shadow: var(--shadow-xl) !important;
  border: 1px solid var(--border-color) !important;
  padding: 0 !important;
  overflow: hidden;
}
.leaflet-popup-content {
  margin: 0 !important;
  line-height: 1.4 !important;
}
.leaflet-popup-tip {
  background: var(--bg-card) !important;
}

.map-custom-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  border: 2px solid #ffffff;
  color: #ffffff;
  font-size: 16px;
  transition: transform 0.2s ease;
}
.map-custom-marker:hover {
  transform: scale(1.2);
}

/* Print Optimization */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .no-print, header nav, .action-buttons, #themeToggle, .view-switcher, .filter-bar, .modal-backdrop {
    display: none !important;
  }
  .glass-card {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 1rem !important;
  }
  .timeline-container {
    display: block !important;
  }
  .day-card {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 1.5rem !important;
  }
  a {
    text-decoration: none !important;
    color: #000000 !important;
  }
}
