/* ============================================
   TRAVEL FINDER - BEAUTIFIED STYLES
   Using original green & amber color palette
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=DM+Serif+Display&display=swap');

:root {
  /* Primary Colors - Forest Green */
  --primary-50: #ECFDF5;
  --primary-100: #D1FAE5;
  --primary-200: #A7F3D0;
  --primary-300: #6EE7B7;
  --primary-400: #34D399;
  --primary-500: #198754;
  --primary-600: #0F5132;
  --primary-700: #0B3D26;
  --primary-800: #082B1B;
  --primary-900: #051C12;

  /* Accent Colors - Warm Amber */
  --accent-400: #FBBF24;
  --accent-500: #D97706;
  --accent-600: #B45309;

  /* Neutrals */
  --gray-50: #F8F9FA;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  /* Semantic */
  --background: #F8F9FA;
  --surface: #FFFFFF;
  --text-primary: #111827;
  --text-secondary: #4B5563;
  --text-muted: #9CA3AF;
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  --error: #DC2626;
  --success: #22c55e;

  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: 'DM Serif Display', Georgia, serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Background Decorations */
.bg-gradient {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(209,231,221,0.5), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(254,243,199,0.3), transparent);
  pointer-events: none;
  z-index: -2;
  will-change: transform;
  transform: translateZ(0);
}

.bg-pattern {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%230F5132' fill-opacity='0.025'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: -1;
  will-change: transform;
  transform: translateZ(0);
}

/* App Container */
.app {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
}

.logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.1) inset;
  flex-shrink: 0;
}

.header-content h1 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.tagline {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-top: 2px;
  line-height: 1.5;
}

/* Main Content Layout */
.main-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  min-width: 0;
  overflow: hidden;
}


/* Filter Panel */
.filter-panel {
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.filter-form {
  display: flex;
  flex-direction: column;
  padding: 24px;
  gap: 24px;
}

/* Filter Section */
.filter-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.section-header svg {
  color: var(--primary-500);
  flex-shrink: 0;
}

.section-header h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  flex: 1;
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary-500);
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.btn-link:hover {
  background: var(--primary-50);
  color: var(--primary-600);
}

/* Filter Grid */
.filter-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 640px) {
  .filter-grid {
    grid-template-columns: 1fr;
  }
}

/* Filter Field */
.filter-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-field label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.required {
  color: var(--error);
}

.optional {
  font-weight: 400;
  color: var(--text-muted);
}

/* Inputs */
input[type="text"],
select {
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--surface);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  width: 100%;
}

input[type="text"]:focus,
select:focus {
  outline: none;
  border-color: var(--primary-400);
  box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.12);
}

input[type="text"]::placeholder {
  color: var(--text-muted);
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
  cursor: pointer;
}

select option {
  background: var(--surface);
  color: var(--text-primary);
}

/* Chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s var(--ease);
}

.chip:hover {
  border-color: var(--primary-400);
  background: var(--primary-50);
  color: var(--primary-600);
}

.chip:focus-visible {
  outline: 3px solid var(--primary-500);
  outline-offset: 2px;
}

.chip.active {
  background: var(--primary-500);
  border-color: var(--primary-500);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(15, 81, 50, 0.25);
}

/* Chip Tooltip */
.has-tooltip {
  position: relative;
}

.has-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--gray-800);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 400;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s var(--ease), transform 0.15s var(--ease);
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.has-tooltip::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  border: 5px solid transparent;
  border-top-color: var(--gray-800);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s var(--ease), transform 0.15s var(--ease);
  z-index: 100;
}

.has-tooltip:hover::after,
.has-tooltip:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.has-tooltip:hover::before,
.has-tooltip:focus-visible::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Activities */
.activities-container {
  max-height: min(280px, 50vh);
  overflow-y: auto;
  padding: 4px;
  margin: -4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  will-change: scroll-position;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  border: 1px solid var(--primary-100);
  background: var(--gray-50);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
}

.activities-container::-webkit-scrollbar {
  width: 6px;
}

.activities-container::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: 3px;
}

.activities-container::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 3px;
}

.activity-category {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.activity-category:first-child {
  border-top: none;
  padding-top: 0;
}

.category-icon {
  font-size: 1rem;
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

@media (max-width: 480px) {
  .activity-grid {
    grid-template-columns: 1fr;
  }
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.2s var(--ease);
}

.activity-item:hover {
  background: var(--primary-50);
}

.activity-item:focus-within {
  background: var(--primary-50);
  outline: 2px solid var(--primary-300);
  outline-offset: -2px;
  border-radius: var(--radius-md);
}

.activity-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-500);
  cursor: pointer;
  flex-shrink: 0;
}

.activity-item span {
  font-size: 0.875rem;
  color: var(--text-primary);
  line-height: 1.3;
}

/* Date Picker */
.date-picker-wrapper {
  display: flex;
  gap: 8px;
}

.date-picker-btn {
  flex: 1;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.date-picker-btn:hover {
  border-color: var(--primary-400);
}

.date-picker-btn:focus {
  outline: none;
  border-color: var(--primary-400);
  box-shadow: 0 0 0 3px rgba(15, 81, 50, 0.1);
}

.date-picker-btn svg {
  color: var(--primary-500);
  flex-shrink: 0;
}

.date-picker-btn span {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  flex-shrink: 0;
}

.btn-icon:hover {
  background: var(--gray-50);
  color: var(--text-secondary);
  border-color: var(--gray-300);
}

.btn-icon:focus-visible {
  outline: 3px solid var(--primary-500);
  outline-offset: 2px;
}

/* Budget Slider */
/* ── Budget Slider ── */
.budget-slider {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 44px;
}

.budget-slider-track {
  position: relative;
  flex: 1;
  height: 20px;
  display: flex;
  align-items: center;
}

/* Gray base track */
.budget-slider-track::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  pointer-events: none;
  z-index: 0;
}

/* Green fill overlay */
.budget-slider-fill {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 6px;
  background: var(--primary-500);
  border-radius: 3px;
  pointer-events: none;
  z-index: 1;
}

.budget-slider-track input[type="range"] {
  position: relative;
  width: 100%;
  height: 20px;
  margin: 0;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

/* ── WebKit thumb (Chrome, Safari, Edge) ── */
.budget-slider-track input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: 0;
  background: var(--primary-500);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 81, 50, 0.35);
  transition: transform 0.2s var(--ease);
}

.budget-slider-track input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* ── WebKit track (must be declared or thumb won't centre) ── */
.budget-slider-track input[type="range"]::-webkit-slider-runnable-track {
  height: 20px;
  background: transparent;
}

/* ── Firefox thumb ── */
.budget-slider-track input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--primary-500);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 81, 50, 0.35);
}

/* ── Firefox track ── */
.budget-slider-track input[type="range"]::-moz-range-track {
  height: 6px;
  background: transparent;
}

.budget-value {
  min-width: 70px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--primary-600);
  text-align: right;
}

/* Buttons */
.action-buttons {
  display: flex;
  gap: 12px;
  padding-top: 8px;
  align-items: center;
}

.btn {
  height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s var(--ease);
  border: none;
}

.btn-sm {
  height: 40px;
  padding: 0 16px;
  font-size: 0.875rem;
}

.btn-primary {
  flex: 1;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(15, 81, 50, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  box-shadow: 0 6px 20px rgba(15, 81, 50, 0.4);
  transform: translateY(-1px);
}

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

.btn:focus-visible {
  outline: 3px solid var(--primary-500);
  outline-offset: 2px;
}

.btn-secondary:focus-visible {
  outline: 3px solid var(--gray-400);
  outline-offset: 2px;
}

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

.btn-secondary:hover {
  background: var(--gray-200);
  color: var(--text-primary);
}

/* Hints & Errors */
.hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.hint.center {
  text-align: center;
}

.error-message {
  font-size: 0.8125rem;
  color: var(--error);
  margin-top: 4px;
  font-weight: 500;
}

/* Results Section */
.results-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  overflow: hidden;
}

.results-header {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  min-width: 0;
}

.results-info {
  min-width: 0;
  flex: 1;
}

.results-info h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.results-info p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  overflow-wrap: break-word;
  word-break: break-word;
}

.results-badge {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: #FFFFFF;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  align-self: flex-start;
}

/* Results Grid */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 16px;
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius-xl);
}

.empty-icon {
  width: 80px;
  height: 80px;
  background: var(--primary-50);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-400);
  margin-bottom: 20px;
}

.empty-state h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  max-width: 320px;
}

/* Destination Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
  animation: fadeInUp 0.4s ease forwards;
  opacity: 0;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-100);
}

/* Budget tier glow , green (budget), amber (comfortable), purple (luxury) */
.card-tier-budget {
  border-color: #86efac;
  box-shadow: 0 0 0 2px #86efac, 0 0 16px 2px rgba(134, 239, 172, 0.35);
}
.card-tier-budget:hover {
  box-shadow: 0 0 0 2px #4ade80, 0 0 24px 4px rgba(74, 222, 128, 0.45);
  border-color: #4ade80;
}

.card-tier-comfortable {
  border-color: #fbbf24;
  box-shadow: 0 0 0 2px #fbbf24, 0 0 16px 2px rgba(251, 191, 36, 0.35);
}
.card-tier-comfortable:hover {
  box-shadow: 0 0 0 2px #f59e0b, 0 0 24px 4px rgba(245, 158, 11, 0.45);
  border-color: #f59e0b;
}

/* luxury tier , see enhanced block below */

.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.2s; }
.card:nth-child(5) { animation-delay: 0.25s; }
.card:nth-child(6) { animation-delay: 0.3s; }

/* Photo banner */
.card-img-wrap {
  position: relative;
  width: 100%;
  height: 140px;
  min-height: 140px;
  max-height: 140px;
  overflow: hidden;
  flex-shrink: 0;
  flex-grow: 0;
  background: #1a1a2e;
}

.card-img-gradient {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.card-img-initial {
  font-size: 3.5rem;
  font-weight: 800;
  color: rgba(255,255,255,0.15);
  font-family: var(--font-serif, Georgia, serif);
  user-select: none;
  line-height: 1;
}

.card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 2;
  display: block;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  flex: 1;
  min-width: 0;
}

.card-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.card-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-location {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Badge strip , wrap to allow all badges */
.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.card-actions .btn {
  flex: 1;
  height: 40px;
}

/* Calendar Popover */
.calendar-popover {
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  width: 320px;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.calendar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.calendar-nav {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.calendar-nav:hover {
  background: var(--gray-100);
  color: var(--text-primary);
}

.calendar-nav:focus-visible {
  outline: 3px solid var(--primary-500);
  outline-offset: 2px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.weekday {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.calendar-day {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  border-radius: var(--radius-sm);
  border: none;
  background: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}

.calendar-day:hover:not(.disabled):not(.outside) {
  background: var(--primary-50);
  color: var(--primary-600);
}

.calendar-day:focus-visible {
  outline: 3px solid var(--primary-500);
  outline-offset: -1px;
  z-index: 1;
  position: relative;
}

.calendar-day.outside {
  color: var(--text-muted);
  opacity: 0.5;
}

.calendar-day.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* FIX 5: past dates , distinct from trailing-month greys, not just dimmed */
.calendar-day.past {
  color: var(--gray-300) !important;
  text-decoration: line-through;
  cursor: not-allowed !important;
  background: none !important;
  opacity: 1 !important;   /* override .disabled opacity: 0.3 */
  pointer-events: none;
}

/* FIX 5: prev-month button disabled when already at current month */
.calendar-nav:disabled,
.calendar-nav[aria-disabled="true"] {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

.calendar-day.selected {
  background: var(--primary-500);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(15, 81, 50, 0.25);
}

.calendar-day.in-range {
  background: var(--primary-100);
  color: var(--primary-700);
  border-radius: 0;
}

.calendar-day.start {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.calendar-day.end {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.calendar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;      /* FIX 4: was 16px , more breathing room from the grid */
  padding-top: 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;       /* graceful wrap on narrow screens */
}

/* FIX 4: hint text receives dynamic color/weight from JS based on selection state */
.calendar-footer .hint {
  flex: 1;
  min-width: 100px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-muted);
  transition: color 0.2s, font-weight 0.2s;
}

.calendar-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
  .app {
    padding: 16px;
  }

  .header {
    flex-direction: column;
    text-align: center;
  }

  .logo {
    width: 48px;
    height: 48px;
  }

  .header-content h1 {
    font-size: 1.5rem;
  }

  .filter-form {
    padding: 20px;
  }

  .filter-grid {
    grid-template-columns: 1fr;
  }

  .results-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }

  .results-badge {
    align-self: flex-start;
    max-width: 100%;
  }

  .results-section {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  .results-grid {
    grid-template-columns: 1fr;
    min-width: 0;
    max-width: 100%;
  }

  .pagination {
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 0 8px;
  }

  .pagination-btn {
    padding: 0 14px;
    font-size: 0.8125rem;
    flex-shrink: 0;
  }

  .pagination-info {
    font-size: 0.75rem;
    flex-shrink: 1;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .calendar-popover {
    width: calc(100vw - 32px);
    max-width: 340px;
    border-radius: var(--radius-xl);
  }

  .action-buttons {
    flex-direction: row;
  }

  .action-buttons .btn-primary {
    flex: 1;
  }

  .action-buttons .btn-secondary {
    flex-shrink: 0;
    width: auto;
    padding: 0 16px;
  }

  .activity-grid {
    grid-template-columns: 1fr;
  }

  .date-picker-wrapper {
    flex-direction: row;
  }

  .btn-icon:not(.date-picker-clear) {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .app {
    padding: 12px;
  }

  .logo {
    width: 44px;
    height: 44px;
  }

  .header-content h1 {
    font-size: 1.375rem;
  }

  .tagline {
    font-size: 0.875rem;
  }

  .filter-form {
    padding: 16px;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 16px 0 8px;
  grid-column: 1 / -1;
}

.pagination-info {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-page-input {
  width: 48px;
  height: 28px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-family: inherit;
  font-weight: 600;
  text-align: center;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  /* Hide browser number spinners */
  -moz-appearance: textfield;
}
.pagination-page-input::-webkit-outer-spin-button,
.pagination-page-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.pagination-page-input:hover {
  border-color: var(--primary-400);
}
.pagination-page-input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(var(--primary-500-rgb, 15,81,50), 0.15);
  outline: none;
}

.pagination-btn {
  height: 40px;
  padding: 0 20px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  color: #fff;
  box-shadow: 0 2px 8px rgba(15, 81, 50, 0.25);
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}

.pagination-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  box-shadow: 0 4px 14px rgba(15, 81, 50, 0.35);
  transform: translateY(-1px);
}

.pagination-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(15, 81, 50, 0.2);
}

.pagination-btn:disabled {
  background: var(--gray-200);
  color: var(--gray-400);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.pagination-btn:focus-visible {
  outline: 3px solid var(--primary-500);
  outline-offset: 2px;
}

/* ============================================
   Active Filter Badge , dot indicator
   ============================================ */
.active-filters-badge {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(34,197,94,0.25);
  transition: opacity 0.2s var(--ease);
}

/* Retry button (shown after API error) */
.retry-btn {
  margin-top: 12px;
  height: 40px;
  padding: 0 20px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 2px solid var(--primary-500);
  background: transparent;
  color: var(--primary-500);
  transition: all 0.2s var(--ease);
}

.retry-btn:hover {
  background: var(--primary-500);
  color: #fff;
}

.retry-btn:focus-visible {
  outline: 3px solid var(--primary-500);
  outline-offset: 2px;
}

/* Spin animation (used by loading states) */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ============================================
   Accessibility: Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* ── Site Footer ── */
.site-footer {
  background: var(--gray-900, #111827);
  color: var(--gray-400, #9ca3af);
  padding: 40px 24px 24px;
  margin-top: 60px;
  font-size: 0.875rem;
}
.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.site-footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
@media (max-width: 640px) {
  .site-footer-grid { grid-template-columns: 1fr; gap: 20px; }
}
.site-footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 8px;
}
.site-footer-tagline { font-size: 0.8125rem; line-height: 1.5; }
.site-footer-heading {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.site-footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.site-footer-links a {
  color: var(--gray-400, #9ca3af);
  text-decoration: none;
  transition: color 0.2s;
}
.site-footer-links a:hover { color: #fff; }
.site-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
}
.site-footer-bottom a { color: var(--gray-400,#9ca3af); text-decoration: none; }
.site-footer-bottom a:hover { color: #fff; }
/* ── Enhanced luxury glow ── */
.card-tier-luxury {
  border-color: #a855f7 !important;
  box-shadow: 0 0 0 2px #a855f7, 0 0 20px 4px rgba(168, 85, 247, 0.5), 0 0 40px 8px rgba(168, 85, 247, 0.2) !important;
  background: linear-gradient(135deg, var(--surface) 85%, rgba(168, 85, 247, 0.06) 100%) !important;
}
.card-tier-luxury:hover {
  box-shadow: 0 0 0 3px #9333ea, 0 0 32px 8px rgba(147, 51, 234, 0.6), 0 0 60px 16px rgba(147, 51, 234, 0.25) !important;
  border-color: #9333ea !important;
  transform: translateY(-6px) !important;
}

/* Luxury pill on card image */
.card-tier-luxury .card-img-wrap {
  position: relative;
}
.card-tier-luxury .card-img-wrap::after {
  content: '✦ LUXURY';
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #7e22ce, #a855f7);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(126, 34, 206, 0.55);
  pointer-events: none;
  z-index: 2;
}

/* ── Tier quick-filter bar ── */
.tier-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 0 4px;
}

.tier-filter-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 2px;
}

.tier-btn {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.tier-btn:hover {
  border-color: var(--primary-300);
  color: var(--text-primary);
}
.tier-btn-all.active {
  background: var(--primary-500);
  border-color: var(--primary-500);
  color: #fff;
}
.tier-btn-luxury.active {
  background: linear-gradient(135deg, #7e22ce, #a855f7);
  border-color: #a855f7;
  color: #fff;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.45);
}
.tier-btn-comfortable.active {
  background: #f59e0b;
  border-color: #d97706;
  color: #fff;
}
.tier-btn-budget.active {
  background: #22c55e;
  border-color: #16a34a;
  color: #fff;
}

/* ── Budget glow legend ── */
.budget-legend {
  display: flex;
  align-items: center;
  gap: 6px 16px;
  flex-wrap: wrap;
  padding: 4px 0 0;
}

.budget-legend-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 2px;
  white-space: nowrap;
}

.budget-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  max-width: 100%;
}

/* Empty square , mirrors the card glow frame shape */
.budget-legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  flex-shrink: 0;
  background: transparent;
  border: 3px solid transparent;
}

.budget-legend-budget      .budget-legend-dot { border-color: #4ade80; box-shadow: 0 0 5px rgba(74,222,128,0.7); }
.budget-legend-comfortable .budget-legend-dot { border-color: #fbbf24; box-shadow: 0 0 5px rgba(251,191,36,0.7); }
.budget-legend-luxury      .budget-legend-dot { border-color: #c084fc; box-shadow: 0 0 5px rgba(168,85,247,0.7); }

.budget-legend-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}
/* ── Travel Details standalone card ───────────────────────────
   Sits above the filter panel as its own rounded card,
   matching the plan-trip page section style.
   ────────────────────────────────────────────────────────────── */

.travel-details-card {
  background: var(--surface);
  border: 1px solid var(--primary-200, #bbf7d0);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 0 0 1px var(--primary-100, #dcfce7);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

.travel-details-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-300, #86efac);
}

.travel-details-header {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-500);
}

.travel-details-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

.travel-details-header h3::after {
  content: "required";
  display: inline-block;
  margin-left: 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary-500);
  opacity: 0.75;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* Once filled, return to normal */
.travel-details-card.is-filled {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.travel-details-card.is-filled .travel-details-header h3::after {
  display: none;
}