/* ============================================================
   Trip Builder — Premium Concierge Styles
   Refined: compact horizontal cards · sophisticated emerald
   dark-scheme date inputs · 1px selected borders
   ============================================================ */

.trip-builder-section {
  position: relative;
  background: url('/images/tayrona_hero.webp') center/cover no-repeat fixed;
  padding: 80px 0;
  margin-top: 40px;
}

.trip-builder-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10, 25, 18, 0.6), rgba(10, 25, 18, 0.4));
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ── Trip Builder Accent Tokens (scoped overrides) ─────── */
#trip-builder-container {
  --tb-accent:        #1a9e6a;         /* deep emerald — replaces neon green  */
  --tb-accent-dim:    rgba(26,158,106,0.10);
  --tb-accent-glow:   rgba(26,158,106,0.22);
  --tb-accent-str:    rgba(26,158,106,0.45);
  --tb-card-sel-bg:   rgba(255,255,255,0.055); /* lifted card bg when selected */

  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
  padding: 0 20px;
}

#trip-builder {
  background: rgba(10, 25, 18, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-xl);
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* ── Step Indicator ─────────────────────────────────────── */
.tb-step-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 40px;
  gap: 15px;
}

.tb-step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-muted);
  font-weight: 600;
  font-size: 14px;
  transition: var(--t-base);
}

.tb-step-dot.active {
  background: var(--tb-accent-dim);
  border-color: var(--tb-accent);
  color: var(--tb-accent);
  box-shadow: 0 0 0 3px var(--tb-accent-glow);
}

.tb-step-dot.completed {
  background: var(--tb-accent);
  color: #fff;
  border-color: var(--tb-accent);
}

.tb-step-line {
  height: 1px;
  width: 40px;
  background: var(--c-border);
  transition: var(--t-base);
}

.tb-step-line.active {
  background: var(--tb-accent);
}

/* ── Step Content ───────────────────────────────────────── */
.tb-step-content {
  display: none;
  animation: tb-fade-in 0.4s ease;
}

.tb-step-content.active {
  display: block;
}

@keyframes tb-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tb-step-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
  text-align: center;
}

.tb-step-subtitle {
  color: var(--c-text-muted);
  text-align: center;
  margin-bottom: 30px;
}

/* ── Form Groups ────────────────────────────────────────── */
.tb-form-group {
  margin-bottom: 24px;
}

.tb-label {
  display: block;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--c-text);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Option Cards — Horizontal (icon left · text right) ── */
.tb-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.tb-option-card {
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 14px 18px;          /* 40% less vertical than original 20px */
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  user-select: none;
  text-align: left;
}

.tb-option-card:hover {
  background: var(--c-bg-card-h);
  border-color: var(--c-border-h);
}

.tb-option-card.selected {
  background: var(--tb-card-sel-bg);
  border-color: var(--tb-accent);
  box-shadow: none;            /* no neon glow — just the clean border */
}

/* ── Option Icon — thin-line SVG wrapper ────────────────── */
.tb-option-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.45);
  transition: color 0.2s ease, background 0.2s ease;
}

.tb-option-card.selected .tb-option-icon {
  color: var(--tb-accent);
  background: var(--tb-accent-dim);
}

.tb-option-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Option Text block ──────────────────────────────────── */
.tb-option-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tb-option-text {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  color: var(--c-text);
}

.tb-option-sub {
  font-size: 12px;
  color: var(--c-text-muted);
  line-height: 1.3;
}

/* ── Tour Cards (Step 2) ────────────────────────────────── */
.tb-tour-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 10px;
}

.tb-tour-grid::-webkit-scrollbar {
  width: 6px;
}
.tb-tour-grid::-webkit-scrollbar-thumb {
  background: var(--c-border-h);
  border-radius: 4px;
}

.tb-tour-card {
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.tb-tour-card:hover {
  transform: translateY(-3px);
  border-color: var(--c-border-h);
  box-shadow: var(--sh-md);
}

.tb-tour-card.selected {
  border-color: var(--tb-accent);
  box-shadow: none;
}

.tb-tour-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-bottom: 1px solid var(--c-border);
}

.tb-tour-info {
  padding: 16px;
  flex: 1;
}

.tb-tour-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tb-tour-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--c-border-h);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.tb-tour-card.selected .tb-tour-check {
  background: var(--tb-accent);
  border-color: var(--tb-accent);
  color: #fff;
}

.tb-tour-desc {
  font-size: 14px;
  color: var(--c-text-muted);
  line-height: 1.5;
}

/* ── Date / Number Inputs ───────────────────────────────── */
.tb-input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.tb-input {
  width: 100%;
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-family: var(--f-sans);
  font-size: 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
  /* Force browser to render the calendar/spinner in light color
     so it is visible on the dark background                      */
  color-scheme: dark;
}

.tb-input:focus {
  outline: none;
  border-color: var(--tb-accent);
  box-shadow: 0 0 0 3px var(--tb-accent-dim);
}

/* Force calendar icon to white — brightness(0) kills the original colour,
   invert(1) flips it to white. Works regardless of color-scheme or OS theme. */
.tb-input[type="date"]::-webkit-calendar-picker-indicator {
  filter: brightness(0) invert(1);
  opacity: 0.65;
  cursor: pointer;
}

/* ── Navigation ─────────────────────────────────────────── */
.tb-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--c-border);
}

.tb-btn {
  padding: 12px 28px;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, color 0.15s;
  border: none;
  font-family: var(--f-sans);
  letter-spacing: 0.02em;
}

.tb-btn-back {
  background: transparent;
  color: var(--c-text-muted);
}
.tb-btn-back:hover {
  color: var(--c-text);
}

.tb-btn-next,
.tb-btn-submit {
  background: var(--tb-accent);
  color: #fff;
  box-shadow: 0 4px 14px var(--tb-accent-glow);
}

.tb-btn-next:hover,
.tb-btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--tb-accent-str);
}

.tb-btn-next:disabled {
  background: var(--c-bg-card);
  color: var(--c-text-muted);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* ── Summary / Resume Box ───────────────────────────────── */
.tb-resume-box {
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 24px;
  margin-bottom: 30px;
}

.tb-resume-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed var(--c-border);
}
.tb-resume-item:last-child {
  border-bottom: none;
}

.tb-resume-label {
  color: var(--c-text-muted);
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.tb-resume-value {
  font-weight: 600;
  text-align: right;
  max-width: 60%;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  #trip-builder {
    padding: 24px 16px;
  }
  .tb-input-grid {
    grid-template-columns: 1fr;
  }
  .tb-tour-grid {
    grid-template-columns: 1fr;
  }
  .tb-options-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Success Modal ───────────────────────────────────────── */
.tb-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: tb-fade-in 0.3s ease;
  padding: 20px;
}

.tb-modal-content {
  background: var(--c-bg-mid, #1a1a1a);
  border: 1px solid var(--c-border, #333);
  border-radius: var(--r-xl, 16px);
  padding: 40px;
  max-width: 500px;
  width: 100%;
  position: relative;
  box-shadow: var(--sh-card, 0 10px 30px rgba(0,0,0,0.5));
}

.tb-modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 28px;
  color: var(--c-text-muted, #a1a1aa);
  cursor: pointer;
  transition: color 0.2s;
  padding: 0;
  line-height: 1;
}

.tb-modal-close:hover {
  color: var(--c-text, #fff);
}
