/* ═══════════════════════════════════════════════════════════════
   Hawaii Itinerary Generator — Styles v1
   ═══════════════════════════════════════════════════════════════ */

/* ─── Wizard overrides (extends guide-match.css gm-* classes) ─ */
.ig-wizard {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 16px 40px;
}
.ig-wizard .gm-progress-bar {
  background: linear-gradient(90deg, #059669, #34d399);
}
.ig-wizard .gm-step h2 {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 6px;
  line-height: 1.3;
}
.ig-wizard .gm-step .ig-hint {
  font-size: 15px;
  color: #666;
  margin: 0 0 20px;
}

/* ─── Step banners (edit-mode hint, cross-island carryover) ──── */
.ig-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin: 0 0 16px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
}
.ig-banner i.fa {
  flex: 0 0 auto;
  font-size: 18px;
  margin-top: 2px;
}
.ig-banner-edit {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  color: #78350f;
}
.ig-banner-edit i.fa { color: #b45309; }
.ig-banner-carryover {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}
.ig-banner-carryover i.fa { color: #059669; }
.ig-banner-link {
  color: inherit;
  text-decoration: underline;
  font-weight: 600;
}
.ig-banner-link:hover { text-decoration: none; }

/* ─── Island selector cards ──────────────────────────────────── */
.ig-island-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.ig-island-card {
  flex: 1 1 calc(50% - 6px);
  min-width: 140px;
  border: 3px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  background: #fff;
  position: relative;
}
.ig-island-card:hover {
  border-color: #bbb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.ig-island-card.is-selected {
  border-width: 3px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}
.ig-island-card.is-selected::after {
  content: '\f00c';
  font-family: 'gous';
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 14px;
  color: #fff;
  background: currentColor;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ig-island-card i {
  font-size: 32px;
  display: block;
  margin-bottom: 6px;
}
.ig-island-card .ig-island-name {
  font-size: 17px;
  font-weight: 700;
  display: block;
}
.ig-island-card .ig-island-tag {
  font-size: 13px;
  color: #888;
  display: block;
  margin-top: 2px;
}

/* Island brand colors for selected state */
.ig-island-card[data-island="oahu"].is-selected { border-color: #F27A24; color: #F27A24; }
.ig-island-card[data-island="maui"].is-selected { border-color: #1866B4; color: #1866B4; }
.ig-island-card[data-island="big-island"].is-selected { border-color: #c3232f; color: #c3232f; }
.ig-island-card[data-island="kauai"].is-selected { border-color: #1D9771; color: #1D9771; }

/* ─── Multi-select interest grid ─────────────────────────────── */
.ig-interest-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.ig-interest-chip {
  flex: 0 0 auto;
  padding: 10px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 30px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
  white-space: nowrap;
}
.ig-interest-chip:hover {
  border-color: #059669;
  background: #f0fdf4;
}
.ig-interest-chip.is-selected {
  border-color: #059669;
  background: #059669;
  color: #fff;
}
.ig-interest-chip i {
  margin-right: 4px;
}

/* ─── Date picker / month selector ───────────────────────────── */
.ig-date-row {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}
.ig-date-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}
.ig-date-label {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.ig-date-label .fa {
  color: #059669;
  margin-right: 4px;
}
.ig-date-row input[type="date"] {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 17px;
  background: #fff;
  color: #111827;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  min-height: 52px;
}
.ig-date-row input[type="date"]:focus {
  border-color: #059669;
  outline: none;
}
.ig-date-row input[type="date"]:invalid {
  color: #9ca3af;
}
/* Arrival/departure time-of-day row */
.ig-time-row {
  display: flex;
  gap: 12px;
  margin: 16px 0 8px;
}
.ig-time-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ig-time-field select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 16px;
  background: #fff;
  color: #111827;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' fill='none' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  min-height: 48px;
}
.ig-time-field select:focus {
  border-color: #059669;
  outline: none;
}
.ig-date-count {
  color: #059669;
  font-weight: 700;
  margin: 8px 0 0;
  font-size: 16px;
}
.ig-date-warning {
  color: #b91c1c;
  background: #fef2f2;
  border-left: 4px solid #b91c1c;
  padding: 10px 14px;
  border-radius: 8px;
  margin: 12px 0 0;
  font-size: 15px;
  font-weight: 600;
}
.ig-month-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.ig-month-btn {
  flex: 1 1 calc(25% - 6px);
  min-width: 70px;
  padding: 10px 6px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
}
.ig-month-btn:hover { border-color: #059669; background: #f0fdf4; }
.ig-month-btn.is-selected { border-color: #059669; background: #059669; color: #fff; }

/* ─── Option cards (traveler type, pace, budget, car) ────────── */
.ig-opt-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.ig-opt-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
}
.ig-opt-card:hover { border-color: #059669; background: #f0fdf4; }
.ig-opt-card.is-selected { border-color: #059669; background: #ecfdf5; }
.ig-opt-card .ig-opt-icon {
  font-size: 24px;
  width: 40px;
  text-align: center;
  flex-shrink: 0;
}
.ig-opt-card .ig-opt-label {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
}
.ig-opt-card .ig-opt-sub {
  font-size: 13px;
  color: #888;
  margin-top: 2px;
}

/* ─── Zone selector with mini-map ────────────────────────────── */
.ig-zone-section {
  margin-bottom: 20px;
}
.ig-zone-island-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.ig-zone-island-label {
  font-size: 16px;
  font-weight: 700;
  padding-left: 4px;
}
/* Day stepper for multi-island allocation */
.ig-day-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}
.ig-stepper-btn {
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  font-size: 20px;
  font-weight: 700;
  color: #059669;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  -webkit-appearance: none;
}
.ig-stepper-btn:hover:not(:disabled) { background: #ecfdf5; }
.ig-stepper-btn:disabled { color: #d1d5db; cursor: not-allowed; }
.ig-stepper-val {
  min-width: 64px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  padding: 0 4px;
  white-space: nowrap;
}
.ig-zone-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.ig-zone-btn {
  padding: 10px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
}
.ig-zone-btn:hover { border-color: #059669; background: #f0fdf4; }
.ig-zone-btn.is-selected { border-color: #059669; background: #059669; color: #fff; }

/* ─── Must-do checklist ──────────────────────────────────────── */
.ig-mustdo-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 16px;
}
.ig-mustdo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}
.ig-mustdo-item:hover { background: #f9fafb; }
.ig-mustdo-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #059669;
  flex-shrink: 0;
}
.ig-mustdo-item label {
  font-size: 15px;
  cursor: pointer;
}
.ig-mustdo-search {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 15px;
  margin-bottom: 10px;
}
.ig-mustdo-search:focus { border-color: #059669; outline: none; }

/* ─── Wizard navigation ──────────────────────────────────────── */
.ig-nav {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.ig-btn {
  padding: 14px 28px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ig-btn-back {
  background: #f3f4f6;
  color: #555;
}
.ig-btn-back:hover { background: #e5e7eb; }
.ig-btn-next {
  background: #059669;
  color: #fff;
  flex: 1;
}
.ig-btn-next:hover { background: #047857; }
.ig-btn-next:disabled { background: #d1d5db; cursor: not-allowed; }
.ig-btn-generate {
  background: linear-gradient(135deg, #059669, #047857);
  color: #fff;
  flex: 1;
  font-size: 18px;
  padding: 16px 28px;
}
.ig-btn-generate:hover { background: linear-gradient(135deg, #047857, #065f46); }

/* Smart Generate (AI) button — sits next to the rule-based one */
.ig-btn-smart {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  color: #fff;
  flex: 1;
  font-size: 18px;
  padding: 16px 28px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s;
}
.ig-btn-smart:hover { background: linear-gradient(135deg, #6d28d9, #4c1d95); }
.ig-btn-smart:disabled { background: #9ca3af; cursor: wait; }
.ig-btn-sparkle {
  flex-shrink: 0;
  animation: ig-sparkle-pulse 2.4s ease-in-out infinite;
}
@keyframes ig-sparkle-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .ig-btn-sparkle { animation: none; }
}
.ig-smart-tag {
  display: inline-block;
  background: rgba(255,255,255,0.22);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 4px;
}
/* Full-viewport overlay shown while the AI worker is generating or
   regenerating an itinerary. Without it, the regenerate button on the
   results page produced 5-15s of network silence with zero feedback —
   users would click again, which (since the worker has a 24h cache for
   plain runs) often returned the same plan and felt broken. */
.ig-regen-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99998;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.ig-regen-overlay.is-visible { display: flex; }
.ig-regen-overlay-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px 36px;
  text-align: center;
  max-width: 360px;
  width: calc(100% - 40px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.ig-regen-overlay-spinner {
  font-size: 32px;
  color: #7c3aed;
  margin-bottom: 14px;
}
.ig-regen-overlay-label {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 6px;
}
.ig-regen-overlay-sub {
  font-size: 14px;
  color: #6b7280;
}

/* Rationale callout shown at the top of smart-generated results */
.ig-smart-rationale {
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  border-left: 4px solid #7c3aed;
  border-radius: 8px;
  padding: 14px 18px;
  margin: 16px 0 4px;
  font-size: 15px;
  line-height: 1.55;
  color: #4c1d95;
}
.ig-smart-badge {
  display: inline-block;
  background: #7c3aed;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: 10px;
  margin-right: 8px;
  vertical-align: middle;
}

/* ═══════════════════════════════════════════════════════════════
   ITINERARY DISPLAY
   ═══════════════════════════════════════════════════════════════ */

.ig-results {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

/* ─── Results header ─────────────────────────────────────────── */
.ig-results-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 24px 20px 28px;
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border-radius: 16px;
}

/* Top bar: back link + icon buttons */
.ig-results-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.ig-back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 600;
  color: #059669;
  text-decoration: none;
  transition: color 0.15s;
}
.ig-back-link:hover {
  color: #047857;
  text-decoration: none;
}

/* Secondary icon buttons (edit, regenerate, print) */
.ig-results-secondary {
  display: flex;
  gap: 4px;
}
.ig-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #666;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.15s;
}
.ig-btn-icon:hover {
  background: #f3f4f6;
  color: #374151;
  border-color: #bbb;
}

.ig-results-header h2 {
  font-size: 26px;
  font-weight: 800;
  color: #1a1a2e;
  margin: 0 0 6px;
}
.ig-results-header p {
  font-size: 15px;
  color: #555;
  margin: 0 0 18px;
}

/* Primary action buttons */
.ig-results-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.ig-results-actions .ig-btn {
  font-size: 14px;
  padding: 10px 20px;
}
.ig-btn-save-all {
  background: #059669;
  color: #fff;
}
.ig-btn-save-all:hover { background: #047857; }
.ig-btn-save-itin {
  background: #fff;
  color: #374151;
  border: 1px solid #d1d5db;
}
.ig-btn-save-itin:hover { background: #f3f4f6; }
.ig-btn-save-itin.is-saved {
  background: #059669;
  color: #fff;
  border-color: #059669;
  cursor: default;
}

/* ─── Day card ───────────────────────────────────────────────── */
.ig-day {
  margin-bottom: 32px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.ig-day-header {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f0f0f0;
}
.ig-day-header h3 {
  font-size: 19px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
}
.ig-day-header .ig-day-date {
  font-size: 14px;
  color: #888;
}
.ig-day-header .ig-day-theme {
  font-size: 14px;
  color: #059669;
  font-weight: 600;
}
.ig-day-body {
  padding: 20px;
}

/* ─── Activity block ─────────────────────────────────────────── */
.ig-activity {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f5f5f5;
  position: relative;
  transition: box-shadow 0.12s ease, opacity 0.15s ease;
}
.ig-activity:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Drag handle in the top-right of each activity card. The whole card
   is `draggable`, but the handle gives users a visible grip and signals
   that the row is reorderable within the day. Cross-day drops are
   refused at the JS layer (zone clustering breaks otherwise). */
.ig-activity-drag {
  position: absolute;
  top: 4px;
  right: 6px;
  /* Explicit sizing so the button never gets flex-stretched into a
     tall pill if `position: absolute` is ever overridden or cached
     stale (it's a flex child of `.ig-activity`, which would otherwise
     align-items:stretch it to full row height). */
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #cbd5e0;
  cursor: grab;
  padding: 0;
  font-size: 13px;
  line-height: 1;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  z-index: 2;
}
.ig-activity-drag:hover {
  color: #6b7280;
  background: #f3f4f6;
}
.ig-activity-drag:active { cursor: grabbing; }
.ig-activity-dragging { opacity: 0.4; }
.ig-activity-drop-above {
  box-shadow: 0 -3px 0 -1px #2e86de inset, 0 1px 4px rgba(0,0,0,0.05);
}
.ig-activity-drop-below {
  box-shadow: 0 3px 0 -1px #2e86de inset, 0 1px 4px rgba(0,0,0,0.05);
}
@media print {
  .ig-activity-drag { display: none; }
}
.ig-activity-time {
  flex-shrink: 0;
  width: 70px;
  text-align: center;
}
.ig-activity-time .ig-time-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #059669;
  letter-spacing: 0.5px;
}
.ig-activity-time .ig-time-icon {
  font-size: 20px;
  color: #ccc;
  margin-top: 4px;
}
.ig-activity-content {
  flex: 1;
  min-width: 0;
}
.ig-activity-img-link {
  display: block;
  margin-bottom: 10px;
  border-radius: 10px;
  overflow: hidden;
  transition: opacity 0.15s;
}
.ig-activity-img-link:hover {
  opacity: 0.88;
}
.ig-activity-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
.ig-activity-name {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 4px;
}
.ig-activity-name a {
  color: #1a1a2e;
  text-decoration: none;
}
.ig-activity-name a:hover {
  color: #059669;
}
.ig-restaurant-link {
  cursor: pointer;
  border-bottom: 1px dashed #ccc;
}
.ig-restaurant-link:hover {
  border-bottom-color: #059669;
}
.ig-activity-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.ig-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.ig-badge-duration { background: #eff6ff; color: #1d4ed8; }
.ig-badge-cost { background: #f0fdf4; color: #059669; }
.ig-badge-reservation { background: #fef3c7; color: #d97706; }
.ig-activity-desc {
  font-size: 15px;
  color: #555;
  line-height: 1.5;
  margin: 6px 0;
}

/* ─── Insider tip callout ────────────────────────────────────── */
.ig-tip {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  margin: 8px 0;
  font-size: 14px;
  color: #92400e;
  line-height: 1.5;
}
.ig-tip::before {
  content: '\f0eb';
  font-family: 'gous';
  margin-right: 6px;
  color: #f59e0b;
}

/* ─── Drive time connector ───────────────────────────────────── */
.ig-drive {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 8px 30px;
  font-size: 13px;
  color: #888;
}
.ig-drive i { color: #bbb; }

/* ─── My Trip button on activities ───────────────────────────── */
.ig-add-trip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 2px solid #059669;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #059669;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}
.ig-add-trip:hover { background: #059669; color: #fff; }
.ig-add-trip.is-saved { background: #059669; color: #fff; border-color: #059669; cursor: default; }

/* ─── Day map container ──────────────────────────────────────── */
.ig-day-map {
  height: 260px;
  border-radius: 12px;
  overflow: hidden;
  margin: 16px 0 0;
  border: 1px solid #e5e7eb;
}
.ig-day-summary {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 0 0;
  font-size: 14px;
  color: #666;
}
.ig-day-summary i { margin-right: 4px; color: #999; }

/* ─── AI suggestions ─────────────────────────────────────────── */
.ig-ai-suggest-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 2px dashed #d1d5db;
  border-radius: 10px;
  font-size: 14px;
  color: #888;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 10px;
}
.ig-ai-suggest-btn:hover { border-color: #8b5cf6; color: #8b5cf6; background: #f5f3ff; }
.ig-ai-suggest-btn i { color: #8b5cf6; }
.ig-ai-suggestions {
  margin-top: 12px;
  padding: 14px;
  background: #f5f3ff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}
.ig-ai-suggestions h4 {
  font-size: 14px;
  font-weight: 700;
  color: #6d28d9;
  margin: 0 0 10px;
}
.ig-suggestion-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: #fff;
  border-radius: 10px;
  margin-bottom: 8px;
  border: 1px solid #e5e7eb;
}
.ig-suggestion-card:last-child { margin-bottom: 0; }
.ig-suggestion-info { flex: 1; }
.ig-suggestion-info .ig-suggestion-name {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
}
.ig-suggestion-info .ig-suggestion-desc {
  font-size: 13px;
  color: #666;
  margin-top: 2px;
}
.ig-btn-swap {
  padding: 6px 14px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  background: #8b5cf6;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}
.ig-btn-swap:hover { background: #7c3aed; }
.ig-ai-loading {
  text-align: center;
  padding: 12px;
  font-size: 14px;
  color: #888;
}
.ig-ai-loading .ig-dots span {
  animation: igDotPulse 1.4s infinite;
  display: inline-block;
}
.ig-ai-loading .ig-dots span:nth-child(2) { animation-delay: 0.2s; }
.ig-ai-loading .ig-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes igDotPulse { 0%, 80%, 100% { opacity: 0.3; } 40% { opacity: 1; } }

/* ─── AI Chat panel ──────────────────────────────────────────── */
.ig-chat {
  max-width: 860px;
  margin: 32px auto 0;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}
.ig-chat-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ig-chat-header i { font-size: 20px; color: #8b5cf6; }
.ig-chat-header h3 { font-size: 17px; font-weight: 700; color: #1a1a2e; margin: 0; }
.ig-chat-messages {
  max-height: 360px;
  overflow-y: auto;
  padding: 16px 20px;
}
.ig-chat-msg {
  margin-bottom: 14px;
  display: flex;
  gap: 10px;
}
.ig-chat-msg-user { justify-content: flex-end; }
.ig-chat-msg-user .ig-chat-bubble {
  background: #059669;
  color: #fff;
  border-radius: 16px 16px 4px 16px;
}
.ig-chat-msg-ai .ig-chat-bubble {
  background: #f3f4f6;
  color: #333;
  border-radius: 16px 16px 16px 4px;
}
.ig-chat-bubble {
  padding: 10px 16px;
  max-width: 80%;
  font-size: 15px;
  line-height: 1.5;
}
.ig-chat-bubble a { color: #059669; text-decoration: underline; }
.ig-chat-msg-user .ig-chat-bubble a { color: #bbf7d0; }
.ig-chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #e5e7eb;
  background: #fafafa;
}
.ig-chat-input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 15px;
}
.ig-chat-input:focus { border-color: #8b5cf6; outline: none; }
.ig-chat-send {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  background: #8b5cf6;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.ig-chat-send:hover { background: #7c3aed; }
.ig-chat-send:disabled { background: #d1d5db; cursor: not-allowed; }
.ig-chat-recs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.ig-chat-rec {
  display: inline-block;
  padding: 6px 12px;
  background: #ede9fe;
  border-radius: 8px;
  font-size: 13px;
  color: #6d28d9;
  text-decoration: none;
}
.ig-chat-rec:hover { background: #ddd6fe; }
.ig-chat-suggested {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 20px 16px;
}
.ig-chat-suggested button {
  padding: 8px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  font-size: 13px;
  color: #555;
  background: #fff;
  cursor: pointer;
}
.ig-chat-suggested button:hover { border-color: #8b5cf6; color: #8b5cf6; }

/* ─── Premium upsell card ────────────────────────────────────── */
.ig-upsell {
  max-width: 860px;
  margin: 32px auto 0;
  border: 2px solid #f59e0b;
  border-radius: 16px;
  padding: 28px 24px;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  text-align: center;
}
.ig-upsell h3 {
  font-size: 20px;
  font-weight: 800;
  color: #92400e;
  margin: 0 0 8px;
}
.ig-upsell p {
  font-size: 15px;
  color: #78350f;
  margin: 0 0 16px;
  line-height: 1.5;
}
.ig-btn-premium {
  display: inline-block;
  padding: 14px 32px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.ig-btn-premium:hover { background: linear-gradient(135deg, #d97706, #b45309); }
.ig-guidebook-upsell {
  margin-top: 16px;
  font-size: 14px;
  color: #92400e;
}
.ig-guidebook-upsell a { color: #d97706; font-weight: 600; }

/* ─── Packing list ───────────────────────────────────────────── */
.ig-packing {
  max-width: 860px;
  margin: 24px auto 0;
  padding: 20px 24px;
  background: #f9fafb;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
}
.ig-packing h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 12px;
}
.ig-packing-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ig-packing-item {
  padding: 6px 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  color: #555;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .ig-island-card { flex: 1 1 100%; }
  .ig-activity { flex-direction: column; }
  .ig-activity-time {
    width: auto;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .ig-activity-img { height: 160px; }
  .ig-chat-bubble { max-width: 90%; }
  .ig-results-header h2 { font-size: 22px; }
  .ig-btn-icon { width: 34px; height: 34px; font-size: 14px; }
  .ig-day-header h3 { font-size: 17px; }
  .ig-date-row { flex-direction: column; }
  .ig-month-btn { flex: 1 1 calc(33.33% - 6px); }
}

/* ─── Print-only branded header (hidden on screen) ──────────── */
.ig-print-header { display: none; }

/* ─── Print styles ───────────────────────────────────────────── */
@media print {
  .ig-wizard, .ig-chat, .ig-upsell, .ig-ai-suggest-btn,
  .ig-ai-suggestions, .ig-add-trip, .ig-results-actions,
  .ig-nav, .ig-chat-input-row, .ig-results-topbar { display: none !important; }
  .ig-day { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
  .ig-day-map { display: none; }
  .ig-activity-img-link { opacity: 1 !important; }

  /* Hide the on-screen results header (h2 + meta line) since the
     branded print header replaces it on paper. */
  .ig-results-header > h2,
  .ig-results-header > p,
  .ig-smart-rationale { display: none !important; }

  /* Branded letterhead at the very top of page 1 — logo + trip
     summary + URL. Sits above every day card. */
  .ig-print-header {
    display: flex !important;
    align-items: center;
    gap: 22px;
    padding: 16px 0 18px;
    margin: 0 0 24px;
    border-bottom: 3px solid #1D9771;
    page-break-after: avoid;
  }
  .ig-print-header img {
    width: 90px;
    height: auto;
    flex-shrink: 0;
  }
  .ig-print-meta {
    flex: 1;
    min-width: 0;
  }
  .ig-print-meta h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
  }
  .ig-print-meta p {
    margin: 6px 0 0;
    font-size: 13px;
    color: #555;
    line-height: 1.4;
  }
  .ig-print-url {
    color: #1D9771 !important;
    font-weight: 600;
  }

  /* Tighten margins so more fits on the first page after the header. */
  @page {
    margin: 0.55in 0.5in 0.65in;
  }
}
