/* ─── Hawaii Trip Cost Explorer  ─────────────────────────────── */
/* Version 1 — 2026-04-10                                        */

/* ─── Hero ─────────────────────────────────────────────────── */
.ce-hero {
  position: relative;
  min-height: 220px;
  border-radius: 80px 80px 80px 20px;
  background-size: cover;
  background-position: center 40%;
  overflow: hidden;
  margin-bottom: 24px;
}
.ce-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,40,60,0.72) 0%, rgba(0,20,40,0.45) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px 40px;
}
.ce-hero h1 {
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.2;
}
.ce-hero h1 i { margin-right: 8px; }
.ce-hero p {
  color: rgba(255,255,255,0.9);
  font-size: 16px;
  margin: 0;
  max-width: 560px;
  line-height: 1.5;
}

/* ─── Two-Column Layout ───────────────────────────────────── */
.ce-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}

/* ─── Controls Column ─────────────────────────────────────── */
.ce-controls { min-width: 0; }

/* ─── Panels ──────────────────────────────────────────────── */
.ce-panel {
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 20px;
}
.ce-panel-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ce-panel-title i {
  font-size: 18px;
  color: #1D9771;
}
.ce-label {
  font-size: 14px;
  font-weight: 600;
  color: #444;
  margin-bottom: 8px;
  display: block;
}

/* ─── Island Tabs ─────────────────────────────────────────── */
.ce-island-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.ce-island-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 6px;
  border: 2px solid #e2e2e2;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.ce-island-tab i { font-size: 22px; }
.ce-island-tab:hover { border-color: #bbb; }
.ce-island-tab.is-active { color: #fff; border-color: transparent; }
.ce-island-tab[data-island="oahu"].is-active { background: #F27A24; }
.ce-island-tab[data-island="maui"].is-active { background: #1866B4; }
.ce-island-tab[data-island="big-island"].is-active { background: #c3232f; }
.ce-island-tab[data-island="kauai"].is-active { background: #1D9771; }

/* ─── Month Grid ──────────────────────────────────────────── */
.ce-month-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.ce-month {
  padding: 8px 4px;
  border: 2px solid #e2e2e2;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  line-height: 1.3;
}
.ce-month-tag {
  display: block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}
.ce-month .ce-month-tag.tag-peak { color: #c3232f; }
.ce-month .ce-month-tag.tag-low { color: #1D9771; }
.ce-month .ce-month-tag.tag-shoulder { color: #F27A24; }
.ce-month:hover { border-color: #aaa; }
.ce-month.is-active {
  background: #2c3e50;
  border-color: #2c3e50;
  color: #fff;
}
.ce-month.is-active .ce-month-tag { color: rgba(255,255,255,0.8); }

/* ─── Sliders ─────────────────────────────────────────────── */
.ce-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.ce-slider-row:last-child { margin-bottom: 0; }
.ce-slider-label {
  flex: 0 0 90px;
  font-size: 14px;
  font-weight: 600;
  color: #444;
}
.ce-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: #ddd;
  outline: none;
}
.ce-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2c3e50;
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.ce-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2c3e50;
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.ce-slider-val {
  flex: 0 0 60px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  background: #f4f6f8;
  padding: 4px 8px;
  border-radius: 8px;
}

/* ─── Option Cards (Accommodation, Dining) ────────────────── */
.ce-card-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.ce-card {
  padding: 14px 12px;
  border: 2px solid #e2e2e2;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.ce-card:hover { border-color: #aaa; }
.ce-card.is-active {
  border-color: #2c3e50;
  background: #f0f4f8;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.ce-card-icon {
  font-size: 24px;
  color: #2c3e50;
  margin-bottom: 6px;
}
.ce-card-name {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 2px;
}
.ce-card-price {
  font-size: 12px;
  color: #777;
}

/* ─── Toggle Switch ───────────────────────────────────────── */
.ce-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}
.ce-toggle-info {
  display: flex;
  flex-direction: column;
}
.ce-toggle-name {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
}
.ce-toggle-sub {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}
.ce-switch {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}
.ce-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.ce-switch-track {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 13px;
  cursor: pointer;
  transition: background 0.25s;
}
.ce-switch-track::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.ce-switch input:checked + .ce-switch-track {
  background: #1D9771;
}
.ce-switch input:checked + .ce-switch-track::after {
  transform: translateX(22px);
}

/* ─── Flight Origin Selector ──────────────────────────────── */
.ce-origin-select {
  margin-top: 12px;
  display: none;
}
.ce-origin-select.is-visible { display: block; }
.ce-origin-select select {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #e2e2e2;
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  color: #333;
  cursor: pointer;
}

/* ─── Activity Checkboxes ─────────────────────────────────── */
.ce-activity-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.ce-activity {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 2px solid #e2e2e2;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: #fff;
}
.ce-activity:hover { border-color: #aaa; }
.ce-activity.is-checked {
  border-color: #1D9771;
  background: #f0faf6;
}
.ce-activity-check {
  width: 20px;
  height: 20px;
  border: 2px solid #ccc;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  color: transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.ce-activity.is-checked .ce-activity-check {
  background: #1D9771;
  border-color: #1D9771;
  color: #fff;
}
.ce-activity-details { flex: 1; min-width: 0; }
.ce-activity-name {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
}
.ce-activity-cost {
  font-size: 11px;
  color: #888;
  margin-top: 1px;
}

/* ─── Results Panel ───────────────────────────────────────── */
.ce-results {
  position: sticky;
  top: 20px;
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.ce-results-header {
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
  margin-bottom: 16px;
}
.ce-results-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888;
  margin-bottom: 4px;
}
.ce-total-cost {
  font-size: 42px;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1.1;
}
.ce-daily-cost {
  font-size: 14px;
  color: #666;
  margin-top: 4px;
}
.ce-daily-cost strong { color: #1a1a1a; }

/* ─── Breakdown Bars ──────────────────────────────────────── */
.ce-breakdown { margin-bottom: 16px; }
.ce-bar-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}
.ce-bar-row:last-child { margin-bottom: 0; }
.ce-bar-label {
  flex: 0 0 100px;
  font-size: 12px;
  font-weight: 600;
  color: #555;
}
.ce-bar-track {
  flex: 1;
  height: 12px;
  background: #f0f0f0;
  border-radius: 6px;
  overflow: hidden;
  margin: 0 10px;
}
.ce-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.4s ease;
  min-width: 2px;
}
.ce-bar-fill.bar-accommodation { background: #1866B4; }
.ce-bar-fill.bar-dining { background: #F27A24; }
.ce-bar-fill.bar-transport { background: #1D9771; }
.ce-bar-fill.bar-activities { background: #9b59b6; }
.ce-bar-fill.bar-flights { background: #c3232f; }
.ce-bar-fill.bar-taxes { background: #95a5a6; }
.ce-bar-amount {
  flex: 0 0 64px;
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  color: #333;
}

/* ─── Donut Chart ─────────────────────────────────────────── */
.ce-donut-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.ce-donut {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  position: relative;
}
.ce-donut-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 80px; height: 80px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ce-donut-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: #999;
}
.ce-donut-pct {
  font-size: 18px;
  font-weight: 800;
  color: #1a1a1a;
}

/* ─── Legend ───────────────────────────────────────────────── */
.ce-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 16px;
}
.ce-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #555;
}
.ce-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ─── Contextual Tip ──────────────────────────────────────── */
.ce-tip {
  background: #f0faf6;
  border-left: 3px solid #1D9771;
  border-radius: 0 10px 10px 0;
  padding: 12px 14px;
  margin-top: 16px;
}
.ce-tip-title {
  font-size: 12px;
  font-weight: 700;
  color: #1D9771;
  margin-bottom: 4px;
}
.ce-tip-text {
  font-size: 13px;
  color: #444;
  line-height: 1.45;
}
.ce-tip-text a {
  color: #1D9771;
  font-weight: 600;
  text-decoration: underline;
}

/* ─── Related Links ───────────────────────────────────────── */
.ce-related {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}
.ce-related a {
  display: block;
  padding: 6px 0;
  font-size: 13px;
  color: #1866B4;
  font-weight: 600;
  text-decoration: none;
}
.ce-related a:hover { text-decoration: underline; }
.ce-related a i { margin-right: 6px; }

/* ─── Mobile Sticky Bar ───────────────────────────────────── */
.ce-mobile-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #ddd;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.1);
  padding: 12px 20px;
  z-index: 9998;
  align-items: center;
  justify-content: space-between;
}
.ce-mobile-total {
  font-size: 13px;
  color: #666;
}
.ce-mobile-total strong {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1.1;
}
.ce-mobile-btn {
  padding: 10px 18px;
  background: #2c3e50;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* ─── Season Badge in Results ─────────────────────────────── */
.ce-season-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 6px;
}
.ce-season-badge.season-peak { background: #fde8e8; color: #c3232f; }
.ce-season-badge.season-shoulder { background: #fef3e2; color: #d4770b; }
.ce-season-badge.season-low { background: #e6f7f1; color: #1D9771; }

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .ce-layout {
    grid-template-columns: 1fr;
  }
  .ce-results {
    position: static;
    display: none;
  }
  .ce-results.is-expanded {
    display: block;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 999999;
    border-radius: 0;
    overflow-y: auto;
    padding: 24px 20px 80px;
  }
  .ce-mobile-bar { display: flex; }
  .ce-hero { min-height: 180px; border-radius: 20px; }
  .ce-hero h1 { font-size: 24px; }
  .ce-hero p { font-size: 14px; }
  .ce-hero-overlay { padding: 24px 20px; }
  .ce-close-results {
    display: block;
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #333;
    cursor: pointer;
    line-height: 1;
  }
}
@media (min-width: 901px) {
  .ce-close-results { display: none; }
  .ce-results { display: block !important; }
}
@media (max-width: 600px) {
  .ce-month-grid { grid-template-columns: repeat(4, 1fr); }
  .ce-card-options { grid-template-columns: 1fr; }
  .ce-activity-grid { grid-template-columns: 1fr; }
  .ce-island-tabs { grid-template-columns: repeat(2, 1fr); }
  .ce-slider-label { flex: 0 0 70px; font-size: 13px; }
  .ce-slider-val { flex: 0 0 50px; font-size: 16px; }
  .ce-panel { padding: 16px; }
  .ce-bar-label { flex: 0 0 80px; font-size: 11px; }
  .ce-bar-amount { flex: 0 0 55px; font-size: 12px; }
}

/* ─── Print Styles ────────────────────────────────────────── */
@media print {
  .ce-mobile-bar,
  .ce-close-results,
  .ce-hero { display: none; }
  .ce-results { position: static !important; display: block !important; box-shadow: none; }
  .ce-layout { display: block; }
}
