/* ═══════════════════════════════════════════════════════════════
   HawaiiGuide Trip Planner — Styles
   ═══════════════════════════════════════════════════════════════ */

/* ─── Sitewide utility bar ─────────────────────────────────── */
.hg-ubar {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1;
  z-index: 10000;
  position: relative;
}

.hg-ubar-left,
.hg-ubar-right {
  display: flex;
  align-items: center;
  gap: 2px;
}

.hg-ubar-link {
  color: rgba(255,255,255,0.9) !important;
  text-decoration: none;
  padding: 9px 14px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.hg-ubar-link i { margin-right: 5px; font-size: 13px; }
.hg-ubar-link:hover {
  background: rgba(255,255,255,0.12);
  color: #fff !important;
}

.hg-ubar-itin {
  background: rgba(46,134,222,0.25);
  border-radius: 4px;
  margin: 4px 0;
}
.hg-ubar-itin:hover {
  background: rgba(46,134,222,0.4) !important;
}
.hg-ubar-itin.has-items {
  color: #fff !important;
  font-weight: 700;
  background: rgba(46,134,222,0.35);
}

.hg-ubar-total-badge {
  display: inline-block;
  background: #e74c3c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9px;
  margin-left: 6px;
  min-width: 18px;
  text-align: center;
  vertical-align: middle;
}

@media (max-width: 600px) {
  .hg-ubar { padding: 0 8px; font-size: 13px; }
  .hg-ubar-link { padding: 9px 10px; }
  .hg-ubar-link span { display: none; }
  .hg-ubar-link i { margin-right: 0; font-size: 16px; }
  .hg-ubar-itin span { display: inline !important; }
  .hg-ubar-itin i { margin-right: 5px; }
}

/* ─── Save button (all page types) ────────────────────────── */
.hg-itinerary-btn-wrap {
  margin: 10px 0 15px;
}

.hg-itinerary-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: 2px solid #2e86de;
  background: #fff;
  color: #2e86de;
  font-size: 14px;
  font-weight: 600;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  line-height: 1.4;
}

.hg-itinerary-btn:hover {
  background: #2e86de;
  color: #fff;
}

.hg-itinerary-btn.is-added {
  background: #27ae60;
  border-color: #27ae60;
  color: #fff;
}

.hg-itinerary-btn.is-added:hover {
  background: #c0392b;
  border-color: #c0392b;
}

/* ─── Floating action button (bottom-right) ───────────────── */
.hg-fab {
  position: fixed;
  bottom: 110px;
  left: 24px;
  z-index: 9990;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 14px 22px;
  background: #2e86de;
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0,0,0,0.25);
  transition: background 0.2s, transform 0.2s, opacity 0.3s, box-shadow 0.2s;
  line-height: 1;
}

.hg-fab i { font-size: 16px; }
.hg-fab:hover {
  background: #1a6fbe;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}

.hg-fab.is-added {
  background: #27ae60;
}
.hg-fab.is-added:hover {
  background: #c0392b;
}

.hg-fab-pulse {
  animation: hg-fab-pop 0.4s ease;
}
@keyframes hg-fab-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* On mobile, icon-only FAB to save space */
@media (max-width: 600px) {
  .hg-fab {
    padding: 16px;
    border-radius: 50%;
    bottom: 100px;
    left: 16px;
    right: auto;
  }
  .hg-fab span { display: none; }
  .hg-fab i { font-size: 20px; margin: 0; }
}

/* ─── My Trip floating button ─────────────────────────────── */
.hg-trip-fab {
  position: fixed;
  bottom: 170px;
  left: 24px;
  z-index: 9990;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: rgba(255,255,255,0.9) !important;
  text-decoration: none !important;
  border: none;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0,0,0,0.3);
  transition: background 0.2s, transform 0.2s, opacity 0.3s, box-shadow 0.2s;
  line-height: 1;
}
.hg-trip-fab i { font-size: 15px; }
.hg-trip-fab:hover {
  color: #fff !important;
  background: linear-gradient(135deg, #222244 0%, #1e2d4f 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
}
.hg-trip-fab.has-items {
  background: linear-gradient(135deg, #1a6fbe 0%, #2e86de 100%);
  color: #fff !important;
}
.hg-trip-fab.has-items:hover {
  background: linear-gradient(135deg, #155da0 0%, #1a6fbe 100%);
}

.hg-trip-fab-badge {
  display: inline-block;
  background: #e74c3c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9px;
  min-width: 18px;
  text-align: center;
  line-height: 1.3;
}

@media (max-width: 600px) {
  .hg-trip-fab {
    bottom: 160px;
    left: 16px;
    padding: 14px;
    border-radius: 50%;
  }
  .hg-trip-fab span { display: none; }
  .hg-trip-fab i { font-size: 20px; margin: 0; }
  .hg-trip-fab.has-items {
    border-radius: 30px;
    padding: 14px 16px;
  }
  .hg-trip-fab.has-items .hg-trip-fab-badge { display: inline-block; }
  .hg-trip-fab.has-items span:first-of-type { display: none; }
}

/* ─── Toast notification ───────────────────────────────────── */
.hg-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1a1a2e;
  color: #fff;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  z-index: 99999;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  white-space: nowrap;
}

.hg-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hg-toast i {
  color: #27ae60;
  margin-right: 6px;
}

.hg-toast a {
  color: #7ec8e3 !important;
  text-decoration: none;
  margin-left: 10px;
  font-weight: 600;
}
.hg-toast a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════
   Summary page (/my-itinerary)
   ═══════════════════════════════════════════════════════════════ */

.itin-hero {
  text-align: center;
  padding: 30px 0 10px;
}

.itin-hero h1 {
  font-size: 2.8rem;
  margin-bottom: 5px;
}

.itin-hero p {
  color: #666;
  font-size: 1.5rem;
}

/* ─── Tabs ─────────────────────────────────────────────────── */
.itin-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e8e8e8;
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.itin-tab {
  flex: 1;
  padding: 12px 16px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 14px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
  font-family: inherit;
  text-align: center;
  margin-bottom: -2px;
}

.itin-tab i {
  margin-right: 5px;
  font-size: 13px;
}

.itin-tab:hover {
  color: #444;
}

.itin-tab.is-active {
  color: #2e86de;
  border-bottom-color: #2e86de;
}

.itin-tab-count {
  display: inline-block;
  background: #eee;
  color: #666;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9px;
  margin-left: 4px;
  vertical-align: middle;
  min-height: 14px;
}

.itin-tab-count:empty {
  display: none;
}

.itin-tab.is-active .itin-tab-count {
  background: #2e86de;
  color: #fff;
}

@media (max-width: 500px) {
  .itin-tab { font-size: 12px; padding: 10px 10px; }
  .itin-tab i { display: none; }
}

/* ─── Actions bar ──────────────────────────────────────────── */
.itin-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 0 0 25px;
  flex-wrap: wrap;
}

.itin-actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 25px;
  cursor: pointer;
  border: 2px solid #2e86de;
  font-family: inherit;
  transition: all 0.2s ease;
}

.itin-btn-print {
  background: #2e86de;
  color: #fff !important;
}
.itin-btn-print:hover { background: #1a6fbe; }

.itin-btn-clear {
  background: #fff;
  color: #c0392b !important;
  border-color: #c0392b !important;
}
.itin-btn-clear:hover {
  background: #c0392b;
  color: #fff !important;
}

/* ─── Empty state ──────────────────────────────────────────── */
.itin-empty {
  text-align: center;
  padding: 50px 20px;
}

.itin-empty > i {
  font-size: 4rem;
  color: #ccc;
  display: block;
  margin-bottom: 15px;
}

.itin-empty h2 {
  font-size: 2.2rem;
  color: #555;
  margin-bottom: 10px;
}

.itin-empty p {
  color: #888;
  font-size: 1.5rem;
  max-width: 460px;
  margin: 0 auto 25px;
}

.itin-empty a.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 25px;
  font-weight: 600;
  text-decoration: none;
}

/* ─── Island groups ────────────────────────────────────────── */
.itin-island-group {
  margin-bottom: 35px;
}

.itin-island-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid #eee;
}

.itin-island-header h2 {
  font-size: 2.2rem;
  margin: 0;
  color: #333;
}

.itin-island-count {
  background: #eee;
  color: #666;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.itin-island-map {
  width: 100%;
  height: 250px;
  border-radius: 10px;
  margin-bottom: 18px;
  background: #e8eee8;
  border: 1px solid #ddd;
}

/* ─── Item cards (shared) ──────────────────────────────────── */
.itin-item {
  display: flex;
  gap: 15px;
  padding: 15px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  transition: box-shadow 0.2s;
  align-items: flex-start;
}

.itin-item:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.itin-item-img {
  width: 110px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f0f0f0;
}

.itin-item-body {
  flex: 1;
  min-width: 0;
}

.itin-item-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.3;
}

.itin-item-title a {
  color: #222;
  text-decoration: none;
}
.itin-item-title a:hover { color: #2e86de; }

.itin-item-meta {
  font-size: 1.2rem;
  color: #888;
  margin-bottom: 4px;
}

.itin-item-desc {
  font-size: 1.3rem;
  color: #555;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.itin-item-remove {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #ccc;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.2s;
  align-self: center;
}

.itin-item-remove:hover { color: #c0392b; }

.itin-item-map-link {
  font-size: 1.2rem;
  color: #2e86de;
  text-decoration: none;
  margin-left: 8px;
}
.itin-item-map-link:hover { text-decoration: underline; }

/* ─── Type-specific card accents ───────────────────────────── */
.itin-item-hotel { border-left: 3px solid #2e86de; }
.itin-item-tour { border-left: 3px solid #f39c12; }
.itin-item-article { border-left: 3px solid #8e44ad; }

/* ─── Responsive cards ─────────────────────────────────────── */
@media (max-width: 600px) {
  .itin-item {
    flex-direction: column;
    gap: 10px;
  }
  .itin-item-img {
    width: 100%;
    height: 150px;
  }
  .itin-island-map {
    height: 200px;
  }
  .itin-item-remove {
    align-self: flex-end;
    margin-top: -30px;
  }
}

/* ─── Share button ─────────────────────────────────────────── */
.itin-btn-share {
  background: #fff;
  color: #2e86de !important;
}
.itin-btn-share:hover {
  background: #2e86de;
  color: #fff !important;
}

/* ─── Share modal ─────────────────────────────────────────── */
.itin-share-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 999999;
  align-items: center;
  justify-content: center;
  padding: 15px;
}
.itin-share-modal.is-active { display: flex; }
.itin-share-modal-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
}
.itin-share-modal-card {
  position: relative;
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  z-index: 1;
  animation: hgShareIn 0.25s ease-out;
}
@keyframes hgShareIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.itin-share-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #e8e8e8;
}
.itin-share-modal-header h4 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: #222;
}
.itin-share-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.itin-share-modal-close:hover { color: #333; }
.itin-share-modal-body {
  padding: 18px;
}
.itin-share-modal-body > p {
  font-size: 1.4rem;
  color: #555;
  margin: 0 0 14px;
  line-height: 1.5;
}
.itin-share-url-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.itin-share-url {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: #f8f8f8;
  color: #333;
  min-width: 0;
}
.itin-share-copy {
  padding: 10px 18px;
  background: #2e86de;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: background 0.2s;
}
.itin-share-copy:hover { background: #1a6fbe; }
.itin-share-note {
  font-size: 1.2rem !important;
  color: #999 !important;
  margin: 0 !important;
}

/* ─── Import banner ───────────────────────────────────────── */
.itin-import-banner {
  border-radius: 10px;
  margin-bottom: 20px;
  overflow: hidden;
}
.itin-import-banner-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}
.itin-import-banner-inner > i {
  font-size: 18px;
  flex-shrink: 0;
}
.itin-import-banner-inner > span { flex: 1; }
.itin-import-dismiss {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  opacity: 0.6;
}
.itin-import-dismiss:hover { opacity: 1; }
.itin-import-success {
  background: #d4edda;
  color: #155724;
}
.itin-import-success .itin-import-dismiss { color: #155724; }
.itin-import-info {
  background: #d1ecf1;
  color: #0c5460;
}
.itin-import-info .itin-import-dismiss { color: #0c5460; }
.itin-import-error {
  background: #f8d7da;
  color: #721c24;
}
.itin-import-error .itin-import-dismiss { color: #721c24; }

/* ═══════════════════════════════════════════════════════════════
   Print styles
   ═══════════════════════════════════════════════════════════════ */
@media print {
  .goUS-header, .social-bar, footer, .cd-overlay,
  .menu-bg, .progress-container, .noprint,
  .itin-actions, .itin-item-remove,
  .hg-itinerary-btn, .hg-fab, .hg-trip-fab,
  .hg-ubar, .hg-toast,
  .hgads, .adthr-content,
  aside, .aside, .sidebar,
  .modals, #modal,
  .itin-share-modal, .itin-import-banner { display: none !important; }

  body { background: #fff !important; }
  section.content { max-width: 100% !important; margin: 0 !important; padding: 0 !important; }

  .itin-hero h1 { font-size: 22pt; }
  .itin-hero p { font-size: 11pt; color: #555; }

  /* Show all tabs' content when printing */
  .itin-tabs { border-bottom: 1px solid #ccc; }
  .itin-tab { font-size: 10pt; }

  .itin-item {
    break-inside: avoid;
    page-break-inside: avoid;
    border: 1px solid #ccc;
    margin-bottom: 8px;
    padding: 10px;
  }

  .itin-item-img {
    width: 80px;
    height: 60px;
    border-radius: 4px;
  }

  .itin-item-desc { -webkit-line-clamp: unset; }

  .itin-island-map {
    height: 200px;
    border: 1px solid #ccc;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .itin-island-group {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .itin-item-title a::after {
    content: " (" attr(href) ")";
    font-weight: 400;
    font-size: 9pt;
    color: #888;
  }
}
