﻿.itinerary-notes {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f6f9fc;
}

.itinerary-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.itinerary-card {
  position: relative;
  /* leave room for the side controls */
  padding: 12px 12px 12px 56px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* Common base for both side buttons */
.itinerary-card .drag-handle,
.itinerary-card .zoom-to-cluster {
  position: absolute;
  left: 10px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;          /* ensure exact 32x32 */
  border: 0;
  border-radius: 6px;
  padding: 0;
  background: linear-gradient(45deg, #3498db, #2980b9); /* same bg for both */
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: none;
  line-height: 1;
  cursor: pointer;
}

/* Individual placements + colors */
.itinerary-card .drag-handle {
  top: 18px;
  cursor: grab;
  color: #FFFFFF;                  /* app white for ⇅ glyph */
  font-size: 18px;                 /* ⇅ size */
}
.itinerary-card .zoom-to-cluster {
  top: 54px;                       /* just below the handle */
  color: #fff;                     /* white map/emoji icon */
  font-size: 18px;                 /* 🗺️ size */
}

/* Unified hover/active/focus for both */
.itinerary-card .drag-handle:hover,
.itinerary-card .zoom-to-cluster:hover {
  filter: brightness(1.05);
}
.itinerary-card .drag-handle:active,
.itinerary-card .zoom-to-cluster:active {
  filter: brightness(0.95);
}
.itinerary-card .drag-handle:focus-visible,
.itinerary-card .zoom-to-cluster:focus-visible {
  outline: 2px solid #3498db;
  outline-offset: 2px;
}

/* Sortable ghost */
.drag-ghost { opacity: 0.6; }

/* Thin per-card stay range (slider) */
.itinerary-stay {
  margin: 8px 0 14px 44px;  /* was: 6px 0 2px 44px; give breathing room below to avoid title overlap */
  max-width: 420px;
}
.itinerary-stay .stay-slider { margin: 2px 0; }

/* Compact track */
.itinerary-stay .noUi-target {
  height: 4px !important;
  border: none !important;
  background: #e9ecef !important;
  box-shadow: none !important;
  border-radius: 2px !important;
}
.itinerary-stay .noUi-connect {
  background: linear-gradient(90deg, #3498db, #2980b9) !important;
}

/* Handles big enough to show YYYY-MM-DD inside */
.itinerary-stay .noUi-horizontal .noUi-handle {
  height: 20px !important;
  width: 88px !important;       /* fits the date */
  right: -44px !important;      /* center handle on value */
  top: -8px !important;         /* center over 4px track */
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2) !important;
  border: 2px solid #3498db !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.itinerary-stay .noUi-handle:before,
.itinerary-stay .noUi-handle:after { display: none !important; }

/* Tooltips centered INSIDE the handles */
.itinerary-stay .noUi-tooltip {
  bottom: auto !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  background: transparent !important;
  color: #2c3e50 !important;
  border: none !important;
  padding: 0 !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  pointer-events: none !important;
  box-shadow: none !important;
  white-space: nowrap !important;
  text-align: center !important;
}