/* ============================================================
   pre-trip.css — Countdown + checklist widget for chinatrip site
   Lives inside the "Today" tab, between hero and cards grid.
   Tones map to T-buckets (cool → amber → warm → hot → now)
   ============================================================ */

.pretrip-wrap {
  font-family: 'Cairo Play', 'Cairo', system-ui, sans-serif;
  margin: 1.5rem 0 2rem;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Hero countdown ───────────────────────────────────────────── */
.pretrip-hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  border-radius: 18px;
  background: linear-gradient(135deg, #ede4d0 0%, #f6f0e0 100%);
  box-shadow: 0 8px 28px rgba(0,0,0,.08), inset 0 0 0 1px rgba(0,0,0,.04);
  position: relative;
  overflow: hidden;
}
.pretrip-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,.5), transparent 60%);
  pointer-events: none;
}
.pretrip-tone-cool  { background: linear-gradient(135deg, #d8e8e3 0%, #ede4d0 100%); }
.pretrip-tone-amber { background: linear-gradient(135deg, #f5e3b8 0%, #ede4d0 100%); }
.pretrip-tone-warm  { background: linear-gradient(135deg, #f5cea0 0%, #ede4d0 100%); }
.pretrip-tone-hot   { background: linear-gradient(135deg, #f5b89a 0%, #ede4d0 100%); }
.pretrip-tone-now   { background: linear-gradient(135deg, #f59a7a 0%, #f5b89a 100%); color: #2b1a14; }

.pretrip-hero__icon {
  font-size: 2.6rem;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.15));
}
.pretrip-hero__body {
  flex: 1;
  position: relative;
  z-index: 1;
}
.pretrip-hero__kicker {
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(26, 24, 20, .55);
  margin-bottom: .25rem;
  font-weight: 600;
}
.pretrip-hero__count {
  display: flex;
  align-items: baseline;
  gap: .35rem;
  font-family: 'Cormorant Garamond', 'Cairo Play', serif;
}
.pretrip-hero__num {
  font-size: 3.4rem;
  font-weight: 700;
  color: #1a1814;
  line-height: 1;
  letter-spacing: -0.02em;
}
.pretrip-hero__unit {
  font-size: 1.1rem;
  color: #1a1814;
  font-weight: 600;
}
.pretrip-hero__hrs {
  font-size: .9rem;
  color: rgba(26, 24, 20, .55);
  margin-right: .5rem;
}
.pretrip-hero__phase {
  margin-top: .35rem;
  font-size: 1rem;
  color: #4a4540;
  font-weight: 600;
}

/* ── Urgent items strip ───────────────────────────────────────── */
.pretrip-urgent {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 200, 100, 0.08), rgba(255, 120, 80, 0.10));
  border: 1px solid rgba(255, 120, 80, 0.20);
}
.pretrip-urgent--clear {
  background: linear-gradient(135deg, rgba(180, 230, 200, 0.18), rgba(120, 180, 150, 0.10));
  border-color: rgba(120, 180, 150, 0.25);
}
.pretrip-urgent__head {
  font-weight: 700;
  color: #b14c2a;
  font-size: .98rem;
  margin-bottom: .6rem;
}
.pretrip-urgent--clear .pretrip-urgent__head {
  color: #2a7c5e;
  margin-bottom: 0;
}
.pretrip-urgent__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .4rem;
}
.pretrip-urgent__item label {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  padding: .55rem .75rem;
  background: rgba(255, 255, 255, .55);
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
  font-size: .92rem;
  color: #1a1814;
  line-height: 1.45;
}
.pretrip-urgent__item label:hover { background: rgba(255, 255, 255, .85); }
.pretrip-urgent__item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #b14c2a;
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
}

/* ── Buckets accordion ────────────────────────────────────────── */
.pretrip-buckets {
  margin-top: 1.25rem;
  display: grid;
  gap: .6rem;
}
.pretrip-bucket {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
  border: 1px solid rgba(0,0,0,.05);
  overflow: hidden;
  transition: box-shadow .18s;
}
.pretrip-bucket:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.pretrip-bucket.locked {
  opacity: .55;
  background: #faf8f4;
}
.pretrip-bucket.locked summary { cursor: not-allowed; }
.pretrip-bucket[open] {
  box-shadow: 0 6px 22px rgba(0,0,0,.10);
}

.pretrip-bucket__sum {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1.1rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  flex-wrap: wrap;
}
.pretrip-bucket__sum::-webkit-details-marker { display: none; }
.pretrip-bucket__icon {
  font-size: 1.4rem;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(245, 185, 74, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pretrip-tone-cool  .pretrip-bucket__icon { background: rgba(80, 160, 145, 0.15); }
.pretrip-tone-amber .pretrip-bucket__icon { background: rgba(245, 185, 74, 0.15); }
.pretrip-tone-warm  .pretrip-bucket__icon { background: rgba(245, 140, 90, 0.15); }
.pretrip-tone-hot   .pretrip-bucket__icon { background: rgba(245, 100, 70, 0.18); }
.pretrip-tone-now   .pretrip-bucket__icon { background: rgba(220, 60, 30, 0.22); }

.pretrip-bucket__label {
  font-weight: 700;
  color: #1a1814;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.pretrip-bucket__sub {
  font-size: .82rem;
  color: rgba(26, 24, 20, .55);
  flex: 1;
}
.pretrip-bucket__progress {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .8rem;
  color: rgba(26, 24, 20, .65);
  font-weight: 600;
  white-space: nowrap;
}
.pretrip-bucket__bar {
  width: 60px;
  height: 6px;
  background: rgba(0,0,0,.07);
  border-radius: 99px;
  overflow: hidden;
  display: inline-block;
}
.pretrip-bucket__bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #50a091, #c8a96e);
  transition: width .35s cubic-bezier(.16,1,.3,1);
}
.pretrip-tone-warm  .pretrip-bucket__bar i,
.pretrip-tone-hot   .pretrip-bucket__bar i,
.pretrip-tone-now   .pretrip-bucket__bar i { background: linear-gradient(90deg, #c8a96e, #c1543e); }
.pretrip-bucket__count { font-variant-numeric: tabular-nums; }
.pretrip-bucket__lock {
  flex-basis: 100%;
  font-size: .76rem;
  color: rgba(26, 24, 20, .45);
  font-style: italic;
}

.pretrip-bucket__list {
  list-style: none;
  padding: 0 1.1rem 1rem;
  margin: 0;
  display: grid;
  gap: .35rem;
  border-top: 1px solid rgba(0,0,0,.05);
  padding-top: .75rem;
}
.pretrip-bucket__item label {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .55rem .7rem;
  background: #fafaf7;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, opacity .15s;
  font-size: .9rem;
  color: #1a1814;
  line-height: 1.5;
}
.pretrip-bucket__item label:hover { background: #f4f1e9; }
.pretrip-bucket__item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #50a091;
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
}
.pretrip-bucket__item.critical input[type="checkbox"] { accent-color: #c1543e; }
.pretrip-bucket__item.done label {
  opacity: .55;
  text-decoration: line-through;
  text-decoration-color: rgba(0,0,0,.3);
}
.pretrip-bucket__text { flex: 1; }
.pretrip-bucket__tag {
  font-size: .65rem;
  padding: 1px 7px;
  background: rgba(193, 84, 62, 0.12);
  color: #c1543e;
  border-radius: 99px;
  font-weight: 700;
  letter-spacing: .04em;
  margin-top: 2px;
  flex-shrink: 0;
}

/* Mobile */
@media (max-width: 600px) {
  .pretrip-hero { padding: 1.15rem 1.25rem; gap: .9rem; }
  .pretrip-hero__icon { font-size: 2rem; }
  .pretrip-hero__num { font-size: 2.6rem; }
  .pretrip-bucket__sub { flex-basis: 100%; margin-top: 2px; }
  .pretrip-bucket__progress { margin-right: auto; }
}
