/* ─────────────────────────────────────────────────────────────
   Hogan Platform Sync — Itinerary menu widget styles
   Compact mini-cart-style indicator for site headers. Scoped
   under .hh-tripmenu so it can't bleed into other Elementor
   widgets. Brand palette: deep navy icon, gold accent badge.
   ───────────────────────────────────────────────────────────── */

.hh-tripmenu {
  --hh-navy-900: #07172E;
  --hh-navy-800: #122E5A;
  --hh-gold-500: #C9A24B;
  --hh-gold-dark: #8a6e23;
  --hh-cream: #FBF8F2;
  --hh-line: #E8E5DE;
  --hh-line-soft: #F0EBE0;
  --hh-muted: #6b7280;

  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Trigger button — sits in the menu bar. Transparent by default so
   it inherits the host menu's background, with a subtle hover state
   for tactility. */
.hh-tripmenu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 8px 12px;
  cursor: pointer;
  position: relative;
  min-height: 44px;
  transition: color 0.15s;
}
.hh-tripmenu-trigger:hover { color: var(--hh-gold-dark); }
.hh-tripmenu.is-open .hh-tripmenu-trigger { color: var(--hh-gold-dark); }

.hh-tripmenu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.hh-tripmenu-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.hh-tripmenu-label {
  display: inline-block;
  white-space: nowrap;
}

/* Gold count badge — top-right of the icon, mirrors the WooCommerce
   cart-count pattern. Hidden when empty. */
.hh-tripmenu-badge {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(40%, -40%);
  background: var(--hh-gold-500);
  color: var(--hh-navy-900);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 999px;
  padding: 2px 6px;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(7,25,54,0.25);
  pointer-events: none;
}

/* Dropdown panel — appears below the trigger, anchored right so it
   doesn't overflow on the typical right-aligned menu placement. */
.hh-tripmenu-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(360px, 92vw);
  background: #fff;
  border: 1px solid var(--hh-line);
  border-radius: 6px;
  box-shadow: 0 18px 48px rgba(7,25,54,0.18);
  z-index: 100;
  overflow: hidden;
}
.hh-tripmenu-panel[hidden] { display: none; }

/* Tiny arrow connecting the panel to the trigger — purely decorative */
.hh-tripmenu-arrow {
  position: absolute;
  top: -6px;
  right: 18px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-top: 1px solid var(--hh-line);
  border-left: 1px solid var(--hh-line);
  transform: rotate(45deg);
}

.hh-tripmenu-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 18px 8px;
  border-bottom: 1px solid var(--hh-line-soft);
  gap: 12px;
}
.hh-tripmenu-head h4 {
  margin: 0;
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--hh-navy-900);
}
.hh-tripmenu-count {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hh-muted);
  font-weight: 600;
}

/* Empty state */
.hh-tripmenu-empty {
  padding: 16px 18px 18px;
}
.hh-tripmenu-empty p {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--hh-muted);
}

/* Populated state — list of stops */
.hh-tripmenu-populated { padding: 4px 0 0; }
.hh-tripmenu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 340px;
  overflow-y: auto;
}
.hh-tripmenu-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--hh-line-soft);
}
.hh-tripmenu-item:last-child { border-bottom: none; }
.hh-tripmenu-thumb {
  width: 52px;
  height: 40px;
  border-radius: 4px;
  background: var(--hh-cream) center/cover no-repeat;
  position: relative;
  flex-shrink: 0;
}
.hh-tripmenu-num {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--hh-navy-900);
  color: var(--hh-gold-500);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(7,25,54,0.25);
}
.hh-tripmenu-meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hh-tripmenu-name {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--hh-navy-900);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hh-tripmenu-loc {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hh-gold-dark);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Remove button — sized to be properly tappable + visible. Was 28px
   with a faint border that read as empty space against the white
   panel; bumped to 36px with a navy border so the visitor can see and
   tap it without squinting. */
.hh-tripmenu-remove {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--hh-navy-800);
  background: #fff;
  color: var(--hh-navy-900);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}
.hh-tripmenu-remove:hover {
  background: #c44; border-color: #c44; color: #fff;
}
.hh-tripmenu-remove:active { transform: scale(0.94); }
.hh-tripmenu-remove svg { display: block; width: 16px; height: 16px; }

/* CTAs — one for empty state (secondary, just text + arrow), one for
   populated state (filled gold, the headline action). */
.hh-tripmenu-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 18px 16px;
  padding: 12px 18px;
  background: var(--hh-gold-500);
  color: var(--hh-navy-900);
  text-decoration: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.15s;
}
.hh-tripmenu-cta:hover { background: var(--hh-gold-dark); color: #fff; }
.hh-tripmenu-cta svg { flex-shrink: 0; }
.hh-tripmenu-cta-secondary {
  background: transparent;
  color: var(--hh-navy-900);
  border: 1.5px solid var(--hh-navy-900);
  font-weight: 600;
}
.hh-tripmenu-cta-secondary:hover {
  background: var(--hh-navy-900); color: #fff;
}

/* Loading state */
.hh-tripmenu-loading {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 28px 18px; color: var(--hh-muted); font-size: 13px;
}
.hh-tripmenu-spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--hh-line);
  border-top-color: var(--hh-gold-500);
  animation: hh-tripmenu-spin 0.8s linear infinite;
}
@keyframes hh-tripmenu-spin { to { transform: rotate(360deg); } }

/* Mobile — make sure the panel doesn't overflow viewport on narrow
   screens. We anchor right by default but bump the right edge in. */
@media (max-width: 540px) {
  .hh-tripmenu-panel {
    right: 0;
    left: auto;
    width: min(340px, calc(100vw - 16px));
  }
  .hh-tripmenu-label { display: none; }
  .hh-tripmenu-trigger { padding: 8px 10px; }
}
