/* ==========================================================================
   Ciao Italia! - Google Maps Directions Style (Spacious & Collapsible)
   ========================================================================== */

:root {
  /* Color Tokens - Authentic Google Maps Palette */
  --bg-primary: #f1f3f4;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f9fa;
  --bg-input: #f1f3f4;
  --bg-dropdown: #ffffff;

  --border-color: #dadce0;
  --border-color-hover: #bdc1c6;
  --border-focus: #1a73e8;

  /* Text Colors */
  --text-primary: #202124;
  --text-secondary: #3c4043;
  --text-muted: #5f6368;
  --text-light: #70757a;

  /* Google Accents */
  --accent-blue: #1a73e8;
  --accent-blue-hover: #1557b0;
  --accent-blue-light: #e8f0fe;

  --accent-green: #137333;
  --accent-green-bg: #e6f4ea;

  --accent-red: #d93025;
  --accent-red-hover: #b02017;
  --accent-red-bg: #fce8e6;

  --accent-gold: #f4b400;

  /* Italian Flag */
  --flag-green: #008C45;
  --flag-white: #ffffff;
  --flag-red: #CD212A;

  /* Drop Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 8px 24px rgba(60, 64, 67, 0.15), 0 2px 6px rgba(60, 64, 67, 0.1);

  /* Geometry */
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-full: 9999px;

  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

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

html,
body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

.w-full {
  width: 100%;
}

.flex-1 {
  flex: 1;
}

/* Main App Container */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  position: relative;
  background-color: #e5e3df;
}

/* ==========================================================================
   Home Board Dashboard overlay
   ========================================================================== */
.home-board {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #f8fafc;
  z-index: 2000;
  overflow-y: auto;
  padding: 60px 24px;
  display: flex;
  justify-content: center;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

/* Background lines & glowing blobs */
.bg-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.07;
  pointer-events: none;
  z-index: 1;
}

.bg-glow-1 {
  background: radial-gradient(circle, var(--accent-blue), #7c3aed);
  top: -150px;
  right: -100px;
}

.bg-glow-2 {
  background: radial-gradient(circle, #06b6d4, var(--accent-blue));
  bottom: -200px;
  left: -150px;
}

.bg-grid-lines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(to right, rgba(99, 102, 241, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(99, 102, 241, 0.035) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
  z-index: 1;
}

/* Toggle visibility via body class */
body.in-map-view .home-board {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Hard hide - completely removes from rendering when plan is active */
.home-board.board-hidden {
  display: none !important;
}

.home-container {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: relative;
  z-index: 2;
}

.home-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.home-header .logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-blue) 0%, #7c3aed 100%);
  color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.25);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.logo-badge svg {
  width: 20px;
  height: 20px;
}

.home-header .logo-container:hover .logo-badge {
  transform: rotate(-10deg) scale(1.1);
}

.home-header h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-blue) 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.home-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.home-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.plan-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(218, 220, 224, 0.5);
  border-radius: var(--radius-md);
  padding: 24px 20px 20px 20px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 190px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.02);
  overflow: hidden;
}

.plan-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--card-theme-color, var(--accent-blue));
  transition: height 0.25s ease;
}

.plan-card:hover::before {
  height: 6px;
}

.plan-card:hover {
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.05),
    0 0 0 1px var(--card-theme-color, var(--accent-blue)) inset;
  transform: translateY(-5px);
  border-color: transparent;
  background: rgba(255, 255, 255, 0.9);
}

.plan-card-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.plan-card-header-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.plan-card-icon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background-color: var(--card-theme-color-light, rgba(26, 115, 232, 0.1));
  color: var(--card-theme-color, var(--accent-blue));
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.plan-card:hover .plan-card-icon-badge {
  transform: scale(1.1);
}

.plan-card-icon-badge svg {
  width: 16px;
  height: 16px;
}

.plan-card-title {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  word-wrap: break-word;
  margin: 0;
  padding-right: 18px;
  /* space for delete btn */
}

.plan-card-route {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
  background-color: rgba(0, 0, 0, 0.03);
  padding: 6px 10px;
  border-radius: 6px;
  width: 100%;
  overflow: hidden;
}

.plan-card-route svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  color: var(--text-light);
}

.plan-card-route span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.plan-card-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.plan-card-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-full);
}

.plan-card-pill svg {
  width: 10px;
  height: 10px;
}

.plan-card-pill-days {
  background-color: #f1f3f4;
  color: var(--text-secondary);
}

/* Delete Plan Button inside card */
.plan-delete-btn {
  position: absolute;
  top: 16px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-light);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 10;
}

.plan-delete-btn:hover {
  background-color: var(--accent-red-bg);
  color: var(--accent-red);
}

.plan-delete-btn svg {
  width: 14px;
  height: 14px;
}

/* Create New Plan Card Tile */
.plan-card.create-card {
  border: 2px dashed rgba(26, 115, 232, 0.4);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 190px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.02);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border-radius: var(--radius-md);
}

.plan-card.create-card:hover {
  background: rgba(26, 115, 232, 0.04);
  border-color: var(--accent-blue);
  border-style: solid;
  box-shadow:
    0 12px 30px rgba(26, 115, 232, 0.08),
    0 0 0 1px var(--accent-blue) inset;
  transform: translateY(-5px);
}

.plan-card.create-card:hover .create-icon {
  transform: scale(1.1) rotate(90deg);
}

.create-icon {
  width: 36px;
  height: 36px;
  color: var(--accent-blue);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.create-text {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent-blue);
}

/* ==========================================================================
   Create Plan Dialog Modal
   ========================================================================== */
dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: none;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
  padding: 0;
  width: calc(100% - 32px);
  max-width: 420px;
  background: #ffffff;
  z-index: 2500;
  overflow: hidden;
  margin: 0;
}

/* Stop Details Modal — open state overrides the base dialog max-width */
dialog[open].stop-details-modal {
  max-width: 900px;
  width: calc(100% - 32px);
  height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

dialog::backdrop {
  background-color: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

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

.dialog-form h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.dialog-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dialog-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dialog-field input {
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
  background-color: #f8f9fa;
}

.dialog-field input:focus {
  border-color: var(--accent-blue);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px var(--accent-blue-light);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.dialog-actions .btn {
  height: 40px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* ==========================================================================
   Sidebar: Floating Panel Layout & Toggles
   ========================================================================== */
.sidebar {
  position: absolute;
  top: 24px;
  left: 24px;
  bottom: 24px;
  width: 420px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: var(--radius-lg);
  border: none;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.35s ease;
  opacity: 1;
}

/* Slide sidebar offscreen when collapsed */
body.sidebar-hidden .sidebar {
  transform: translateX(calc(-100% - 48px));
  opacity: 0;
  pointer-events: none;
}

/* App Header styling (added buttons) */
.app-header {
  padding: 16px 20px 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f3f4;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.home-btn {
  color: var(--text-light);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
  flex-shrink: 0;
}

.home-btn:hover {
  background-color: var(--accent-blue-light);
  color: var(--accent-blue);
}

.home-btn svg {
  width: 16px;
  height: 16px;
}

.app-header h1 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  max-width: 140px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

#plan-title[contenteditable="true"] {
  outline: none;
  cursor: text;
  border-radius: 6px;
  padding: 2px 6px;
  margin-left: -6px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

#plan-title[contenteditable="true"]:hover {
  background-color: #f1f3f4;
}

#plan-title[contenteditable="true"]:focus {
  background-color: #ffffff;
  box-shadow: 0 0 0 3px var(--accent-blue-light);
  border-color: var(--accent-blue);
  max-width: none;
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
}

.collapse-btn {
  color: var(--text-light);
  transition: background-color 0.15s ease;
}

.collapse-btn:hover {
  background-color: #f1f3f4;
  color: var(--text-primary);
}

.collapse-btn svg {
  width: 18px;
  height: 18px;
}

/* Search Bar (Identical to Google Maps Search Field) */
.search-section {
  padding: 12px 20px;
  border-bottom: 1px solid #f1f3f4;
}

.search-bar-wrapper {
  display: flex;
  position: relative;
}

.input-icon-group {
  position: relative;
  width: 100%;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.input-icon-group input {
  width: 100%;
  height: 42px;
  padding: 0 38px 0 42px;
  background-color: var(--bg-input);
  border: 1px solid transparent;
  border-radius: 20px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  transition: all 0.2s ease;
}

.input-icon-group input:focus {
  outline: none;
  border-color: var(--border-color);
  background-color: #ffffff;
  box-shadow: 0 2px 6px rgba(60, 64, 67, 0.15);
}

.clear-search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.clear-search-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

.clear-search-btn svg {
  width: 14px;
  height: 14px;
}

/* General Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 8px 16px;
}

.btn-primary {
  background-color: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
  border-radius: 20px;
  font-weight: 600;
}

.btn-primary:hover {
  background-color: var(--accent-blue-hover);
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3);
}

.btn-secondary {
  background-color: white;
  color: var(--accent-blue);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background-color: #f8f9fa;
  border-color: var(--border-color-hover);
}

.btn-danger {
  background-color: white;
  border-color: var(--border-color);
  color: var(--accent-red);
}

.btn-danger:hover {
  background-color: var(--accent-red-bg);
  border-color: rgba(217, 48, 37, 0.3);
}

.btn-circle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  padding: 0;
  box-shadow: var(--shadow-sm);
  background: white;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

/* Autocomplete suggestions */
.suggestions-box {
  position: absolute;
  top: calc(100% + 6px);
  left: 4px;
  right: 4px;
  background-color: var(--bg-dropdown);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  max-height: 250px;
  overflow-y: auto;
  z-index: 1100;
  box-shadow: var(--shadow-md);
}

.suggestion-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-bottom: 1px solid #f1f3f4;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.active {
  background-color: #f1f3f4;
}

.suggestion-item svg {
  width: 15px;
  height: 15px;
  color: var(--text-light);
  margin-top: 2px;
  flex-shrink: 0;
}

.suggestion-text {
  display: flex;
  flex-direction: column;
}

.suggestion-name {
  font-weight: 600;
  color: var(--text-primary);
}

.suggestion-address {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 1px;
}

.suggestion-empty {
  padding: 14px;
  color: var(--text-light);
  text-align: center;
  font-size: 12.5px;
}

/* ==========================================================================
   Transit Mode Selector
   ========================================================================== */


/* ==========================================================================
   Google Maps Layout Route Summary Banner
   ========================================================================== */
.stats-container {
  padding: 12px 20px;
  background-color: #ffffff;
  border-bottom: 1px solid #f1f3f4;
}

.stats-summary-card {
  background: #f8f9fa;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stats-summary-card.loading {
  opacity: 0.65;
  pointer-events: none;
}

.summary-primary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.summary-route-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.summary-time {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-green);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.summary-secondary-row {
  font-size: 11.5px;
  color: var(--text-light);
  font-weight: 500;
}

.summary-cost-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid #f1f3f4;
}

.summary-cost-row svg {
  width: 13px;
  height: 13px;
  color: var(--accent-green);
}

/* ==========================================================================
   Collapsible Options Panel (Fuel Settings + Tips)
   ========================================================================== */
.options-section {
  border-top: 1px solid #f1f3f4;
  background: #ffffff;
}

.collapsible-panel {
  width: 100%;
}

.panel-header {
  list-style: none;
  outline: none;
  cursor: pointer;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background-color: #ffffff;
  transition: background-color 0.15s ease;
}

.panel-header::-webkit-details-marker {
  display: none;
}

.panel-header:hover {
  background-color: #f8f9fa;
  color: var(--text-primary);
}

.panel-header svg:first-child {
  width: 15px;
  height: 15px;
  margin-right: 6px;
  color: var(--text-light);
}

.chevron-icon {
  width: 13px;
  height: 13px;
  color: var(--text-light);
  transition: transform 0.2s ease;
}

details[open] .chevron-icon {
  transform: rotate(180deg);
}

.panel-content {
  padding: 12px 20px 14px 20px;
  background-color: #f8f9fa;
  border-top: 1px solid #f1f3f4;
  font-size: 11.5px;
}

.options-subtitle {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-light);
  letter-spacing: 0.3px;
  margin-bottom: 8px;
}

/* Settings Grid */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.setting-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.setting-item label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
}

.setting-input-wrapper {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  overflow: hidden;
  height: 28px;
}

.setting-input-wrapper input {
  width: 100%;
  border: none;
  text-align: right;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-primary);
  outline: none;
  padding-right: 4px;
}

.setting-input-wrapper .unit,
.setting-input-wrapper .currency {
  font-size: 10.5px;
  color: var(--text-light);
  font-weight: 500;
  white-space: nowrap;
}

/* Export/Import panel buttons */
.manage-buttons-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.manage-buttons-row .btn {
  padding: 6px 12px;
  height: 32px;
  font-size: 12px;
}

/* Tips inside Options */
.tips-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.35;
  color: var(--text-muted);
}

.tips-list li {
  position: relative;
  padding-left: 12px;
}

.tips-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-blue);
  font-weight: bold;
}

/* ==========================================================================
   Itinerary Section & Timeline Mechanics
   ========================================================================== */
.itinerary-section {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  background-color: #ffffff;
  position: relative;
}

.section-title {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Continuous Timeline Line */
.itinerary-list {
  display: flex;
  flex-direction: column;
  position: relative;
  flex: 1;
}

.itinerary-list::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 16px;
  bottom: 16px;
  width: 2px;
  background-color: #e8eaed;
  z-index: 1;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 10px;
  color: var(--text-light);
  margin-top: 20px;
  z-index: 2;
  position: relative;
}

.empty-icon-pulse {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f1f3f4;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: var(--text-light);
}

.empty-icon-pulse svg {
  width: 18px;
  height: 18px;
}

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

.empty-state p {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--text-light);
  max-width: 230px;
}

/* Timeline Nodes and Stop Rows */
.itinerary-item-container {
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

/* Clean, Spacious Stop Row */
.itinerary-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(218, 220, 224, 0.5);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.itinerary-item:hover,
.itinerary-item.active {
  background-color: #ffffff;
  border-color: var(--accent-blue);
  box-shadow: 0 4px 16px rgba(26, 115, 232, 0.12);
  transform: translateY(-2px);
}

/* Timeline Node Circle Badge */
.item-badge {
  position: absolute;
  left: 0;
  top: 8px;
  background-color: var(--accent-red);
  color: white;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  border: 3px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.itinerary-item.active .item-badge {
  background-color: var(--accent-blue);
  transform: scale(1.1);
  box-shadow: 0 2px 4px rgba(26, 115, 232, 0.3);
}

/* Header Stop Row */
.item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-left: 20px;
}

.item-title-group {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

.item-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.3;
}

/* stay pill */
.stay-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-blue);
  background-color: var(--accent-blue-light);
  padding: 1px 6px;
  border-radius: 10px;
  white-space: nowrap;
}

/* Drag/delete actions on hover */
.item-actions {
  display: flex;
  gap: 1px;
  opacity: 0.3;
  transition: opacity 0.15s ease;
}

.itinerary-item:hover .item-actions {
  opacity: 1;
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-light);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

.btn-icon.delete-btn:hover {
  background-color: var(--accent-red-bg);
  color: var(--accent-red);
}

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

.btn-icon svg {
  width: 12px;
  height: 12px;
}

/* Expandable Edit Row (Stay & Notes Details) */
.item-edit-drawer {
  display: none;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #e8eaed;
}

.itinerary-item.editing .item-edit-drawer {
  display: flex;
}

/* Stay edit inside drawer */
.drawer-stay-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.stepper {
  display: flex;
  align-items: center;
  background-color: #f1f3f4;
  border-radius: 12px;
  padding: 1px;
}

.stepper-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  width: 20px;
  height: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: bold;
}

.stepper-btn:hover {
  background-color: #dadce0;
}

.stepper-input {
  width: 24px;
  border: none;
  background: none;
  color: var(--text-primary);
  text-align: center;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  outline: none;
}

/* Textarea inside drawer */
.drawer-notes-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notes-textarea {
  width: 100%;
  min-height: 42px;
  max-height: 80px;
  padding: 6px 8px;
  background-color: #f1f3f4;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 11.5px;
  resize: vertical;
  line-height: 1.35;
  transition: all 0.15s ease;
}

.notes-textarea:focus {
  outline: none;
  border-color: var(--border-color);
  background-color: #ffffff;
}

/* Collapsed Notes Snippet */
.notes-snippet-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-light);
  max-width: 280px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.notes-snippet-row svg {
  width: 11px;
  height: 11px;
  color: var(--text-light);
  flex-shrink: 0;
}

.notes-snippet-row.empty-notes {
  color: var(--accent-blue);
  font-weight: 500;
}

.notes-snippet-row.empty-notes:hover {
  text-decoration: underline;
}

/* Leg Connectors (Between nodes on timeline) */
.route-connector {
  display: flex;
  align-items: center;
  padding: 4px 0 4px 36px;
  position: relative;
  height: 26px;
  z-index: 2;
}

.connector-info {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-light);
  padding: 1px 6px;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.connector-info svg {
  width: 10px;
  height: 10px;
  color: var(--text-light);
}

.connector-loading {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text-light);
  padding: 1px 6px;
}

.spinner {
  width: 8px;
  height: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--text-light);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ==========================================================================
   Map Interface Styling
   ========================================================================== */
.map-container {
  flex: 1;
  height: 100%;
  position: relative;
}

#map {
  width: 100%;
  height: 100%;
  filter: saturate(1.08) contrast(1.01);
}

/* Google-style Leaflet modifications */
.leaflet-bar {
  border: none !important;
  box-shadow: var(--shadow-sm) !important;
  border-radius: 4px !important;
  overflow: hidden;
}

.leaflet-bar a {
  background-color: #ffffff !important;
  color: #3c4043 !important;
  border: 1px solid #dadce0 !important;
  border-bottom: none !important;
}

.leaflet-bar a:last-child {
  border-bottom: 1px solid #dadce0 !important;
}

.leaflet-bar a:hover {
  background-color: #f8f9fa !important;
  color: #1a73e8 !important;
}

/* Shifting Leaflet Zoom Controls dynamically to accommodate sidebar */
.leaflet-left {
  margin-left: 410px;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.sidebar-hidden .leaflet-left {
  margin-left: 16px;
}

.leaflet-top {
  margin-top: 16px;
  transition: margin-top 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Custom Marker Styling (Google Maps Teardrop Shape) */
.custom-map-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px !important;
  height: 38px !important;
  margin-left: -14px !important;
  margin-top: -38px !important;
}

.google-pin-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.google-pin-body {
  width: 26px;
  height: 26px;
  border-radius: 50% 50% 50% 0;
  background-color: var(--accent-red);
  transform: rotate(-45deg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.15s ease;
}

.google-pin-inner {
  transform: rotate(45deg);
  width: 16px;
  height: 16px;
  background-color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-red);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
}

.google-pin-shadow {
  width: 8px;
  height: 3px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 50%;
  margin-top: -1px;
  filter: blur(0.5px);
}

.custom-map-marker.active .google-pin-body {
  background-color: var(--accent-blue);
  transform: rotate(-45deg) scale(1.15);
}

.custom-map-marker.active .google-pin-inner {
  color: var(--accent-blue);
}

.custom-map-marker.start-end .google-pin-body {
  background-color: var(--accent-blue);
}

.custom-map-marker.start-end .google-pin-inner {
  color: var(--accent-blue);
}

/* Day trip and Activity marker size overrides (to correct centering and visual scale) */
.custom-map-marker.day-trip-marker,
.custom-map-marker.activity-location-marker {
  width: 22px !important;
  height: 30px !important;
  margin-left: -11px !important;
  margin-top: -30px !important;
}

.custom-map-marker.day-trip-marker .google-pin-body,
.custom-map-marker.activity-location-marker .google-pin-body {
  width: 20px;
  height: 20px;
}

.custom-map-marker.day-trip-marker .google-pin-inner,
.custom-map-marker.activity-location-marker .google-pin-inner {
  width: 12px;
  height: 12px;
  font-size: 8px;
}

.custom-map-marker.day-trip-marker .google-pin-shadow,
.custom-map-marker.activity-location-marker .google-pin-shadow {
  width: 6px;
  height: 2px;
}

/* Sleek floating text label above the map marker */
.marker-label {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-dark);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border-color);
  pointer-events: none;
  opacity: 0.9;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

.custom-map-marker:hover .marker-label {
  opacity: 1;
  transform: translateX(-50%) scale(1.05);
  background: #ffffff;
  color: var(--accent-blue);
  border-color: var(--accent-blue);
  box-shadow: 0 6px 16px rgba(26, 115, 232, 0.25);
  z-index: 20;
}

.custom-map-marker.active .marker-label {
  opacity: 1;
  transform: translateX(-50%) scale(1.05);
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-blue);
  box-shadow: 0 6px 16px rgba(26, 115, 232, 0.35);
  z-index: 30;
}

/* Floating overlay tooltip instructions */
.map-overlay-tip {
  position: absolute;
  top: 16px;
  left: 480px;
  /* aligns right of the shifted zoom controls */
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-light);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  pointer-events: none;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.sidebar-hidden .map-overlay-tip {
  left: 80px;
  /* shifts left when sidebar collapsed */
}

/* Edit Mode Toggle */
.edit-mode-toggle-container.map-switch {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1010;
  display: none;
}

.edit-mode-toggle-container.sidebar-switch {
  display: flex;
}

body.sidebar-hidden .edit-mode-toggle-container.map-switch {
  display: flex;
}

body.sidebar-hidden .edit-mode-toggle-container.sidebar-switch {
  display: none;
}

.edit-mode-toggle-btn {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
}

.edit-mode-toggle-btn:hover {
  background-color: #f8f9fa;
  transform: scale(1.02);
}

.edit-mode-toggle-btn.edit-on {
  border-color: #34d399;
  background-color: rgba(52, 211, 153, 0.05);
}

.edit-mode-toggle-btn.edit-on:hover {
  background-color: rgba(52, 211, 153, 0.1);
}

.edit-mode-toggle-btn.edit-off {
  border-color: var(--border-color);
  opacity: 0.85;
}

.edit-mode-toggle-btn.edit-off .edit-mode-text {
  color: var(--text-muted);
}

.edit-mode-toggle-btn .edit-mode-emoji {
  font-size: 15px;
  line-height: 1;
}

/* Shift expand sidebar button to the right when sidebar hidden so they don't overlap */
body.sidebar-hidden .expand-sidebar-btn {
  left: 135px; /* width of edit-mode button + 16px gap */
}

/* Shift Leaflet zoom control down when sidebar is closed to avoid overlap with Edit Mode button */
body.sidebar-hidden .leaflet-top.leaflet-left {
  margin-top: 95px !important;
  transition: margin-top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Floating Expand sidebar button */
.expand-sidebar-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1010;
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  box-shadow: var(--shadow-md);
}

.expand-sidebar-btn:hover {
  background-color: #f8f9fa;
  color: var(--accent-blue);
}

.expand-sidebar-btn svg {
  width: 18px;
  height: 18px;
}

.map-quick-controls {
  position: absolute;
  bottom: 32px;
  right: 32px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.map-quick-controls .btn-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.map-quick-controls .btn-circle:hover {
  transform: translateY(-4px) scale(1.05);
  background: #ffffff;
  color: var(--accent-blue);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.map-quick-controls .btn-circle svg {
  width: 16px;
  height: 16px;
}

/* Popups */
.leaflet-popup-content-wrapper {
  background: #ffffff !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-md) !important;
  padding: 0px !important;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 0 !important;
}

.leaflet-popup-tip {
  background: #ffffff !important;
}

.popup-details {
  padding: 10px 12px;
  min-width: 160px;
}

.popup-details h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.popup-details p {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.35;
}

.popup-btn {
  margin-top: 8px;
  background-color: var(--accent-blue-light);
  border: 1px solid rgba(26, 115, 232, 0.12);
  color: var(--accent-blue);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}

.popup-btn:hover {
  background-color: #d2e3fc;
}

/* Map recolor filter */
.leaflet-tile-pane {
  filter: hue-rotate(-22deg) saturate(1.3) brightness(0.98);
}

/* Animations */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.itinerary-item-container.entering {
  animation: fade-up 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

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

/* Scrollbars */
.itinerary-section::-webkit-scrollbar,
.suggestions-box::-webkit-scrollbar {
  width: 4px;
}

.itinerary-section::-webkit-scrollbar-track,
.suggestions-box::-webkit-scrollbar-track {
  background: transparent;
}

.itinerary-section::-webkit-scrollbar-thumb,
.suggestions-box::-webkit-scrollbar-thumb {
  background: #dadce0;
  border-radius: var(--radius-full);
}

.itinerary-section::-webkit-scrollbar-thumb:hover,
.suggestions-box::-webkit-scrollbar-thumb:hover {
  background: #bdc1c6;
}

/* Responsive */
@media (max-width: 900px) {
  .app-container {
    flex-direction: column;
    height: 100dvh;
    width: 100%;
    overflow: hidden;
  }

  .map-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100% !important;
    width: 100% !important;
    z-index: 1;
  }

  .sidebar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100dvh;
    border-radius: 0;
    border: none;
    box-shadow: none;
    z-index: 1000;
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }

  .app-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
  }

  body.sidebar-hidden .sidebar {
    transform: translateY(calc(100% - 80px - env(safe-area-inset-bottom, 0px)));
    pointer-events: auto;
    overflow: hidden;
  }

  .expand-sidebar-btn {
    display: none !important;
  }

  .map-quick-controls {
    bottom: auto !important;
    top: 16px !important;
    right: 16px !important;
    z-index: 1002;
  }

  .collapse-btn svg {
    transform: rotate(-90deg);
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  }
  
  body.sidebar-hidden .collapse-btn svg {
    transform: rotate(90deg);
  }

  .leaflet-left {
    margin-left: 16px;
  }

  .map-overlay-tip {
    top: 16px;
    left: 16px;
    font-size: 11px;
    padding: 6px 12px;
    z-index: 1002;
  }

  /* Make whole page content flow naturally under the scrollable sidebar container */
  .stats-container,
  .itinerary-section,
  .options-section,
  .collapsible-panel,
  .panel-header {
    background: transparent !important;
  }

  .options-section {
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .itinerary-section {
    overflow-y: visible !important;
    height: auto !important;
    flex: none !important;
  }
}

/* Print Styling */
@media print {

  body,
  html {
    background: #ffffff !important;
    color: #000000 !important;
    overflow: visible !important;
    height: auto !important;
  }

  .stats-container {
    page-break-inside: avoid !important;
  }

  .app-container {
    display: block !important;
  }

  .sidebar {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    box-shadow: none !important;
    border: none !important;
    overflow: visible !important;
    display: block !important;
  }

  .map-container,
  .search-section,
  .transit-section,
  .options-section,
  .item-actions,
  .stepper-btn,
  .notes-header svg,
  .home-board,
  dialog {
    display: none !important;
  }

  .itinerary-section {
    padding: 0 !important;
    overflow: visible !important;
  }

  .itinerary-list::before {
    background-color: #000000 !important;
  }

  .item-badge {
    border-color: #000000 !important;
    background-color: #000000 !important;
  }

  .notes-textarea {
    border: none !important;
    background: transparent !important;
    resize: none !important;
    height: auto !important;
    min-height: unset !important;
    padding: 0 !important;
    color: #000000 !important;
  }

  .connector-info {
    border: 1px solid #000000 !important;
    background: transparent !important;
    color: #000000 !important;
  }
}

/* ==========================================================================
   Route Animation
   ========================================================================== */

.animated-car-marker {
  transition: transform 0.1s linear;
}

.car-icon-wrapper {
  background-color: #ffffff;
  border: 2px solid var(--accent-red);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.car-icon-wrapper svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent-red);
  fill: none;
}

.btn-circle.playing {
  background-color: var(--accent-blue);
  color: white;
  animation: pulse-ring 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(26, 115, 232, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(26, 115, 232, 0); }
  100% { box-shadow: 0 0 0 0 rgba(26, 115, 232, 0); }
}

/* Drag and Drop Timeline Reordering */
.drag-handle {
  cursor: grab;
  color: var(--text-light);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, transform 0.15s ease;
}

.drag-handle:hover {
  color: var(--accent-blue);
}

.drag-handle:active {
  cursor: grabbing;
  transform: scale(0.95);
}

.itinerary-item-container.dragging {
  opacity: 0.4;
  border: 1px dashed var(--accent-blue);
  border-radius: var(--radius-sm);
}

.itinerary-item-container.drag-over-above::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 4px;
  background-color: var(--accent-blue);
  z-index: 10;
  border-radius: var(--radius-full);
  box-shadow: 0 0 8px rgba(26, 115, 232, 0.4);
}

.itinerary-item-container.drag-over-below::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 4px;
  background-color: var(--accent-blue);
  z-index: 10;
  border-radius: var(--radius-full);
  box-shadow: 0 0 8px rgba(26, 115, 232, 0.4);
}

/* ==========================================================================
   Stop Details Modal — Premium Design
   ========================================================================== */

.stop-details-modal {
  width: calc(100% - 32px);
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 32px 80px rgba(15, 23, 42, 0.28), 0 4px 16px rgba(15, 23, 42, 0.1);
  overflow: hidden;
  /* Note: display is controlled by dialog[open].stop-details-modal — never set display here */
}

.modal-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* === Modal Header === */
.stop-details-modal .modal-header {
  padding: 22px 28px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.stop-details-modal .modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stop-details-modal .modal-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(99, 179, 237, 0.15);
  border: 1px solid rgba(99, 179, 237, 0.25);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #90cdf4;
  margin-bottom: 4px;
}

.stop-details-modal .modal-header-badge svg {
  width: 10px;
  height: 10px;
}

.stop-details-modal .modal-title-group h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: -0.5px;
  margin: 0;
}

.stop-details-modal .modal-stop-coords {
  font-size: 11px;
  color: #64748b;
  font-family: monospace;
  letter-spacing: 0.3px;
}

.stop-details-modal .modal-header .close-btn {
  color: #94a3b8;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-top: 2px;
}

.stop-details-modal .modal-header .close-btn:hover {
  background: rgba(255,255,255,0.15);
  color: #f1f5f9;
}

/* === Modal Body === */
.stop-details-modal .modal-body {
  padding: 0;
  display: flex;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.stop-details-modal .modal-column {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* Left — Itinerary Tree Column */
.stop-details-modal .itinerary-tree-col {
  flex: 1.3;
  padding: 24px 28px;
  background: #fafbfc;
  border-right: 1px solid #e8ecf0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.tree-header-wrapper {
  margin-bottom: 16px;
}

.tree-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tree-header-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-blue), #1557b0);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tree-header-icon svg {
  width: 16px;
  height: 16px;
  color: #fff;
}

.tree-header-text h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.tree-header-text p {
  font-size: 11px;
  color: var(--text-light);
  margin: 0;
  margin-top: 1px;
}

.itinerary-tree-container {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

/* Daytrip Card inside Tree */
.tree-daytrip-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-green);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.tree-daytrip-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: var(--border-color-hover);
}

.tree-daytrip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.tree-daytrip-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tree-daytrip-title-group svg {
  width: 16px;
  height: 16px;
  color: var(--accent-green);
  flex-shrink: 0;
}

.tree-daytrip-name {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--accent-green);
}

/* Small delete button for tree items */
.tree-item-delete {
  background: transparent;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.tree-item-delete:hover {
  background: var(--accent-red-bg);
  color: var(--accent-red);
}

.tree-item-delete svg {
  width: 14px;
  height: 14px;
}

/* Notes textareas inside Tree */
.tree-item-notes-textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-family: inherit;
  color: var(--text-secondary);
  background-color: #fafafa;
  outline: none;
  transition: all 0.2s;
  box-sizing: border-box;
  margin-top: 6.5px;
  resize: vertical;
  min-height: 48px;
  line-height: 1.45;
}

.tree-item-notes-textarea:focus {
  border-color: var(--accent-blue);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.08);
}

.tree-item-notes-textarea::placeholder {
  color: var(--text-light);
  font-style: italic;
}

.tree-activity-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tree-activity-assign {
  display: flex;
  align-items: center;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 2px 6px;
  transition: all 0.2s;
}

.tree-activity-assign:hover {
  border-color: var(--accent-blue);
  background-color: #f8f9fa;
}

.tree-item-assign-select {
  border: none;
  background: none;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  outline: none;
  cursor: pointer;
  padding-right: 4px;
}


/* Nested Activities List inside Daytrip Card */
.tree-daytrip-activities {
  margin-top: 10px;
  border-top: 1px solid #f1f5f9;
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Activity item in Tree */
.tree-activity-item {
  background: #f8f9fa;
  border: 1px solid #eef0f2;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s ease;
}

.tree-activity-item.completed {
  opacity: 0.75;
  background: #f1f3f4;
}

.tree-activity-item.completed .tree-activity-text {
  text-decoration: line-through;
  color: var(--text-light);
}

.tree-activity-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tree-activity-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.tree-activity-left input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

.tree-activity-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* General Activities section */
.tree-general-section {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-blue);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.tree-general-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.tree-general-header svg {
  width: 16px;
  height: 16px;
  color: var(--accent-blue);
}

.tree-general-title {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--accent-blue);
}

.tree-general-activities-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Right — Details Column */
.stop-details-modal .more-info-col {
  flex: 0.85;
  padding: 24px 24px;
  background: #ffffff;
  overflow-y: auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Form groups */
.stop-details-modal .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid #f1f5f9;
}

.stop-details-modal .form-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.stop-details-modal .form-group label {
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stop-details-modal .form-group label svg {
  width: 13px;
  height: 13px;
  color: #3b82f6;
}

.stop-details-modal input[type="text"],
.stop-details-modal input[type="url"],
.stop-details-modal input[type="number"] {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  background-color: #f8fafc;
  color: #334155;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.stop-details-modal input[type="text"]:focus,
.stop-details-modal input[type="url"]:focus,
.stop-details-modal input[type="number"]:focus {
  background-color: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

.stop-details-modal textarea {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  background-color: #f8fafc;
  color: #334155;
  transition: all 0.2s ease;
  box-sizing: border-box;
  resize: vertical;
  min-height: 80px;
}

.stop-details-modal textarea:focus {
  background-color: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

.bullet-notes-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
}

.bullet-notes-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  transition: all 0.15s ease;
}

.bullet-notes-item:hover {
  background: var(--bg-card);
  border-color: var(--border-color-hover);
}

.bullet-notes-item .bullet-dot {
  color: var(--accent-blue);
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
}

.bullet-notes-item .note-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.bullet-notes-item .note-delete-btn {
  border: none;
  background: transparent;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.bullet-notes-item .note-delete-btn:hover {
  background: var(--accent-red-bg);
  color: var(--accent-red);
}

.links-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
}

.link-preview-card {
  display: flex;
  position: relative;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  padding: 10px;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  overflow: hidden;
  align-items: flex-start;
}

.link-preview-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.link-preview-card .link-preview-image-container {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.05);
}

.link-preview-card .link-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.link-preview-card .link-preview-placeholder-icon {
  color: var(--text-light);
  width: 24px;
  height: 24px;
}

.link-preview-card .link-preview-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
  padding-right: 24px; /* space for delete button */
}

.link-preview-card .link-preview-site-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-light);
}

.link-preview-card .link-preview-favicon {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  object-fit: contain;
}

.link-preview-card .link-preview-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-preview-card .link-preview-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-preview-card .link-delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: transparent;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 2;
}

.link-preview-card .link-delete-btn:hover {
  background: var(--accent-red-bg);
  color: var(--accent-red);
}

/* Skeleton Loading State */
.link-preview-card.loading {
  cursor: default;
  pointer-events: none;
}

.link-preview-card.loading .skeleton-text {
  height: 12px;
  background: linear-gradient(90deg, #f1f3f4 25%, #e8eaed 50%, #f1f3f4 75%);
  background-size: 200% 100%;
  animation: loading-skeleton 1.5s infinite;
  border-radius: 4px;
}

.link-preview-card.loading .skeleton-text.title {
  width: 60%;
  height: 14px;
}

.link-preview-card.loading .skeleton-text.desc {
  width: 85%;
  margin-top: 4px;
}

.link-preview-card.loading .skeleton-text.desc-short {
  width: 45%;
  margin-top: 4px;
}

.link-preview-card.loading .link-preview-image-container {
  background: linear-gradient(90deg, #f1f3f4 25%, #e8eaed 50%, #f1f3f4 75%);
  background-size: 200% 100%;
  animation: loading-skeleton 1.5s infinite;
}

@keyframes loading-skeleton {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Activity Checklist */
.checklist-add-row {
  display: flex;
  gap: 8px;
}

.checklist-add-row input {
  flex: 1;
}

.activities-list-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
  padding: 6px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #f1f5f9;
  gap: 8px;
  transition: box-shadow 0.15s;
}

.activity-item:hover {
  box-shadow: 0 1px 4px rgba(15,23,42,0.08);
}

.activity-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.activity-item-left input[type="checkbox"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: #3b82f6;
}

.activity-item-text {
  font-size: 12.5px;
  color: #334155;
}

.activity-item.completed .activity-item-text {
  text-decoration: line-through;
  color: #94a3b8;
}

.activity-item-delete {
  background: none;
  border: none;
  color: #cbd5e1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  border-radius: 5px;
  transition: all 0.15s;
  flex-shrink: 0;
}

.activity-item-delete:hover {
  color: #ef4444;
  background-color: #fef2f2;
}

/* Stepper in modal */
.stop-details-modal .stepper {
  display: flex;
  align-items: center;
  gap: 0;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  width: fit-content;
}

.stop-details-modal .stepper-btn {
  background: transparent;
  border: none;
  padding: 8px 14px;
  font-size: 18px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
  transition: all 0.15s;
}

.stop-details-modal .stepper-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.stop-details-modal .stepper input {
  border: none !important;
  border-left: 1.5px solid #e2e8f0 !important;
  border-right: 1.5px solid #e2e8f0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: center;
  width: 52px !important;
  padding: 8px 4px !important;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}

.stop-details-modal .stepper input:focus {
  outline: none;
  box-shadow: none !important;
  border-color: #e2e8f0 !important;
}

/* === Modal Footer === */
.stop-details-modal .modal-footer {
  padding: 16px 28px;
  border-top: 1px solid #e8ecf0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  flex-shrink: 0;
}

.stop-details-modal .modal-footer-hint {
  font-size: 11px;
  color: #94a3b8;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stop-details-modal .modal-footer-hint svg {
  width: 12px;
  height: 12px;
}

/* Open Details button on sidebar cards */
.open-details-btn {
  font-size: 11.5px;
  font-weight: 600;
  color: #3b82f6;
  background-color: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 7px;
  padding: 5px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  margin-top: 6px;
  width: fit-content;
}

.open-details-btn:hover {
  background-color: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
}

.open-details-btn svg {
  width: 12px;
  height: 12px;
}

/* Responsive adjustment for modal columns */
@media (max-width: 768px) {
  dialog[open].stop-details-modal {
    height: 92vh;
    height: 92dvh;
    width: calc(100% - 24px);
    border-radius: 20px;
  }

  .stop-details-modal .modal-body {
    flex-direction: column;
    overflow-y: auto;
  }

  .stop-details-modal .itinerary-tree-col {
    border-right: none;
    border-bottom: 1px solid #e8ecf0;
    padding: 20px;
    flex: none;
    height: auto;
    overflow: visible;
  }

  .stop-details-modal .more-info-col {
    padding: 20px;
    overflow: visible;
  }
}

/* Day Trips Timeline Nesting inside Sidebar Card */
.day-trips-timeline-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding-left: 10px;
  border-left: 2px solid var(--accent-green);
  margin-bottom: 2px;
}

.day-trip-timeline-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--accent-green);
  font-weight: 600;
}

.day-trip-timeline-row svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.day-trip-assigned-day-badge {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--accent-green);
  background-color: rgba(19, 115, 51, 0.08);
  border: 1px solid rgba(19, 115, 51, 0.15);
  padding: 1px 4px;
  border-radius: 4px;
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
}

/* Extra badge updates for Day Trips */
.card-extra-badges-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.card-extra-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  background-color: #f1f3f4;
  padding: 2px 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-extra-badge svg {
  width: 11px;
  height: 11px;
  color: var(--text-light);
}

/* Designation Pill Toggle */
.point-type-toggle {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.point-type-toggle.hidden-toggle {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.pill-btn {
  color: var(--text-light);
  font-weight: 500;
  outline: none;
}

.pill-btn[data-point-type="stopover"].active {
  background-color: #64748b !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(100, 116, 139, 0.25);
}

.pill-btn[data-point-type="start"].active {
  background-color: #10b981 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.25);
}

.pill-btn[data-point-type="end"].active {
  background-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.25);
}

/* Drag handle styling for routing */
.route-drag-handle-marker {
  cursor: grab;
  z-index: 1000 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.route-drag-handle-marker:active {
  cursor: grabbing;
}

.drag-handle-dot {
  width: 12px;
  height: 12px;
  background-color: #ffffff;
  border: 3px solid var(--accent-blue);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.route-drag-handle-marker:hover .drag-handle-dot {
  transform: scale(1.3);
  background-color: var(--accent-blue-light);
}

/* Start Date Picker styling */
.date-picker-box {
  background: #f8f9fa;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.date-picker-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.date-picker-input-group svg,
.date-picker-input-group i {
  width: 16px;
  height: 16px;
  color: var(--accent-blue);
  flex-shrink: 0;
}

.date-picker-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-right: auto;
  user-select: none;
}

.start-date-input {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-primary);
  background-color: #ffffff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.start-date-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px var(--accent-blue-light);
}

.item-date {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
  display: block;
}

/* Plan Emoji Selector */
.plan-emoji-selector {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.plan-emoji-btn {
  font-size: 20px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light, #f1f3f4);
  border: 1px solid var(--border-color, #dadce0);
  border-radius: var(--radius-full, 50%);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  user-select: none;
}

.plan-emoji-btn:hover {
  background: var(--bg-primary, #ffffff);
  border-color: var(--accent-blue, #1a73e8);
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.plan-emoji-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color, #dadce0);
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  z-index: 1505;
  width: 236px;
  max-height: 280px;
  overflow-y: auto;
  transition: opacity 0.15s ease, transform 0.15s ease;
  transform-origin: top left;
}

.plan-emoji-dropdown.hidden-dropdown {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.95) translateY(-5px);
}

.plan-emoji-item {
  font-size: 20px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  user-select: none;
}

.plan-emoji-item:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: scale(1.15);
}

/* Update Plan Card Emoji styling on dashboard */
.plan-card-emoji {
  font-size: 22px;
  line-height: 1;
  user-select: none;
}

/* --- Accommodations Styling --- */
.accommodations-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 4px;
}

.accommodation-item-card {
  display: flex;
  position: relative;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  padding: 10px;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  align-items: flex-start;
}

.accommodation-item-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-hover);
  transform: translateY(-1px);
}

.accommodation-item-card.selected {
  border-color: var(--accent-blue);
  background-color: rgba(26, 115, 232, 0.03);
}

.accommodation-select-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  margin-top: 2px;
}

.accommodation-select-indicator .custom-radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.accommodation-item-card.selected .accommodation-select-indicator .custom-radio {
  border-color: var(--accent-blue);
  background-color: var(--accent-blue);
}

.accommodation-item-card.selected .accommodation-select-indicator .custom-radio::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
}

.accommodation-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
  padding-right: 20px;
}

.accommodation-card-main-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.accommodation-card-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

.accommodation-card-stars {
  display: flex;
  gap: 2px;
}

.accommodation-card-stars button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #cbd5e1;
  transition: color 0.15s ease;
}

.accommodation-card-stars button.active {
  color: #f59e0b;
}

.accommodation-delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: transparent;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.15s ease;
}

.accommodation-delete-btn:hover {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Star selector animations */
.stars-container button:hover ~ button {
  color: #cbd5e1 !important;
}
.stars-container:hover button {
  color: #f59e0b;
}

/* Collapsible accommodation list styling on timeline stop card */
.timeline-accommodation-container {
  display: flex;
  flex-direction: column;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background-color: #f8fafc;
  overflow: hidden;
  margin-top: 4px;
  transition: all 0.2s ease;
}

.timeline-accommodation-container:hover {
  border-color: rgba(0, 0, 0, 0.12);
  background-color: #f1f5f9;
}

.accommodation-bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  cursor: pointer;
  user-select: none;
  gap: 8px;
}

.accommodation-bar-header .header-left {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 0;
  flex: 1;
}

.accommodation-bar-header .header-left svg {
  width: 12px;
  height: 12px;
  color: var(--accent-blue);
  flex-shrink: 0;
}

.accommodation-bar-header .selected-hotel-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.accommodation-bar-header .selected-hotel-stars {
  color: #f59e0b;
  font-size: 10px;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.accommodation-bar-header .toggle-icon {
  width: 12px;
  height: 12px;
  color: var(--text-light);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.timeline-accommodation-container.expanded .toggle-icon {
  transform: rotate(180deg);
}

.accommodation-bar-content {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background-color: #ffffff;
  max-height: 200px;
  overflow-y: auto;
}

.accommodation-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  font-size: 11px;
  color: var(--text-secondary);
  border-bottom: 1px dashed rgba(0, 0, 0, 0.04);
  cursor: pointer;
  gap: 8px;
  transition: background-color 0.15s ease;
}

.accommodation-item-row:last-child {
  border-bottom: none;
}

.accommodation-item-row:hover {
  background-color: var(--bg-light);
}

.accommodation-item-row.active {
  background-color: rgba(26, 115, 232, 0.04);
  font-weight: 600;
  color: var(--accent-blue);
}

.accommodation-item-row .row-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.accommodation-item-row .row-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.accommodation-item-row .row-stars {
  color: #f59e0b;
  font-size: 9px;
  white-space: nowrap;
}

.accommodation-item-row .row-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  color: var(--text-light);
  transition: all 0.15s ease;
}

.accommodation-item-row .row-link-btn:hover {
  background-color: var(--bg-light);
  color: var(--accent-blue);
}