.tour-booking-form,
.tour-booking-page {
  --tb-brand: var(--color-brand, #d0252e);
  --tb-blue: var(--color-blue, #002b4f);
  --tb-gold: var(--color-yellow, #d1a54b);
  --tb-bg: var(--color-background, #f8f9fa);
  --tb-border: var(--color-border, #dee2e6);
  --tb-muted: var(--color-text-gray, #6c757d);
  --tb-text: var(--color-text, #212529);
  max-width: 1080px;
  margin: 0 auto 3rem;
  padding: 0 16px;
  color: var(--tb-text);
}

.tb-head { text-align: center; margin: 1.5rem 0; }
.tb-tour-title { color: var(--tb-blue); font-size: clamp(1.4rem, 3vw, 2rem); margin: 1.25rem 0 .5rem; }
.tb-intro { color: var(--tb-muted); max-width: 720px; margin: 0 auto; }

.tb-steps { display: flex; gap: 12px; list-style: none; margin: 1rem auto; padding: 0; max-width: 900px; }
.tb-steps__item { flex: 1; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--tb-bg); border: 1px solid var(--tb-border); text-align: left; font-size: .9rem; color: var(--tb-muted); margin: 0; }
.tb-steps__number { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: #fff; border: 2px solid var(--tb-border); color: var(--tb-muted); }
.tb-steps__item.is-active { border-color: var(--tb-brand); color: var(--tb-blue); font-weight: 600; background: #fff; }
.tb-steps__item.is-active .tb-steps__number { background: var(--tb-brand); border-color: var(--tb-brand); color: #fff; }
.tb-steps__item.is-done .tb-steps__number { background: var(--tb-blue); border-color: var(--tb-blue); color: #fff; }

.tb-card { background: #fff; border: 1px solid var(--tb-border, #dee2e6); border-radius: 14px; padding: 20px 24px 24px; margin: 0 0 20px; box-shadow: 0 2px 10px rgba(0, 43, 79, .05); }
.tb-card__head { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--tb-border); }
.tb-card__icon { flex: none; width: 42px; height: 42px; border-radius: 50%; background-color: var(--tb-brand); background-position: center; background-size: 20px; background-repeat: no-repeat; }
.tb-card--calendar .tb-card__icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E"); }
.tb-card--users .tb-card__icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E"); }
.tb-card--info .tb-card__icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E"); }
.tb-card--receipt .tb-card__icon,
.tb-pay .tb-card__icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2'%3E%3Crect x='1' y='4' width='22' height='16' rx='2'/%3E%3Cpath d='M1 10h22'/%3E%3C/svg%3E"); }
.tb-card__title { margin: 0; font-size: 1.1rem; color: var(--tb-blue, #002b4f); }
.tb-card__subtitle { margin: 2px 0 0; font-size: .88rem; color: var(--tb-muted); }

.tb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 18px; }
.tb-passenger { border: 1px solid var(--tb-border); border-radius: 10px; padding: 12px 16px 16px; margin: 0 0 16px; background: var(--tb-bg); min-width: 0; }
.tb-passenger > legend { font-weight: 700; color: var(--tb-blue); padding: 0 8px; font-size: .95rem; }
.tb-passenger > .fieldset-wrapper,
.tb-passenger > .fieldset__wrapper { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 18px; }
.tb-full { grid-column: 1 / -1; }

.tour-booking-form .form-item { margin: 8px 0; }
.tour-booking-form label,
.tour-booking-form legend .fieldset-legend { font-weight: 600; font-size: .85rem; color: var(--tb-blue); }
.tour-booking-form .form-item > label { display: block; margin-bottom: 4px; }
.tour-booking-form input[type="text"],
.tour-booking-form input[type="email"],
.tour-booking-form input[type="tel"],
.tour-booking-form input[type="date"],
.tour-booking-form select,
.tour-booking-form textarea { width: 100%; box-sizing: border-box; padding: 9px 12px; border: 1px solid var(--tb-border); border-radius: 8px; background: #fff; font: inherit; font-size: .95rem; color: var(--tb-text); }
.tour-booking-form input:focus,
.tour-booking-form select:focus,
.tour-booking-form textarea:focus { outline: 2px solid rgba(208, 37, 46, .3); border-color: var(--tb-brand); }
.tour-booking-form .description { font-size: .78rem; color: var(--tb-muted); margin-top: 3px; }
.tb-passenger fieldset { border: 0; padding: 0; margin: 8px 0; min-width: 0; }
.tb-passenger fieldset legend { padding: 0; margin-bottom: 4px; }
.tour-booking-form .tb-inline-radios { display: flex; gap: 16px; }
.tour-booking-form .tb-inline-radios .form-item { margin: 4px 0; display: flex; align-items: center; gap: 6px; }
.tour-booking-form .tb-inline-radios label { display: inline; font-weight: 400; margin: 0; }
.tour-booking-form .form-item--error-message { color: var(--tb-brand); font-size: .8rem; }
.tour-booking-form .error { border-color: var(--tb-brand); }

/* Summary: trip table on the left, what is charged now on the right. */
.tb-price { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); gap: 24px; align-items: start; margin-top: 20px; }
.tour-booking-form .tb-price__table { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; border: 1px solid var(--tb-border); border-radius: 10px; overflow: hidden; text-align: center; font-size: .95rem; }
.tour-booking-form .tb-price__table th,
.tour-booking-form .tb-price__table td { border: 0; }
.tour-booking-form .tb-price__table th { background: var(--tb-blue); color: #fff; padding: 11px 12px; font-size: .8rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; text-align: center; }
.tour-booking-form .tb-price__table td { padding: 14px 12px; background: #fff; color: var(--tb-text); }
.tour-booking-form .tb-price__table td + td,
.tour-booking-form .tb-price__table th + th { border-left: 1px solid var(--tb-border); }
.tour-booking-form .tb-price__table th + th { border-left-color: rgba(255, 255, 255, .15); }
.tour-booking-form .tb-price__table td:last-child { color: var(--tb-blue); }
.tb-price__due { margin: 0; padding: 14px 18px; background: var(--tb-bg); border: 1px solid var(--tb-border); border-radius: 10px; }
.tb-price__row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 6px 0; font-size: .92rem; }
.tb-price__row[hidden] { display: none; }
.tb-price__row dt { color: var(--tb-muted); }
.tb-price__row dd { margin: 0; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tb-price__row--now { border-top: 2px solid var(--tb-blue); margin-top: 6px; padding-top: 10px; font-size: 1.1rem; }
.tb-price__row--now dt,
.tb-price__row--now dd { color: var(--tb-brand); font-weight: 800; }

/* Terms: checkbox and its label on one line. */
.tour-booking-form .form-type-checkbox { display: flex; align-items: center; gap: 10px; margin: 20px 0 0; }
.tour-booking-form .form-type-checkbox input[type="checkbox"] { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--tb-brand); }
.tour-booking-form .form-type-checkbox > label { display: inline; margin: 0; font-weight: 400; font-size: .92rem; color: var(--tb-text); }
.tour-booking-form .form-type-checkbox > label a { color: var(--tb-brand); text-decoration: underline; }
.tour-booking-form .form-type-checkbox .form-item--error-message { flex-basis: 100%; }

.tour-booking-form .form-actions { text-align: center; margin: 24px 0; }
.tour-booking-form .tb-submit { background: var(--tb-brand); color: #fff; border: 0; border-radius: 8px; padding: 14px 48px; font-weight: 700; font-size: 1rem; text-transform: uppercase; letter-spacing: .02em; cursor: pointer; }
.tour-booking-form .tb-submit:hover,
.tour-booking-form .tb-submit:focus { background: var(--tb-blue); }

.tour-booking-page .tb-steps { margin-top: 2rem; margin-bottom: 1.5rem; }
.tb-pay { max-width: 560px; margin: 0 auto 20px; }
.tb-pay__amount { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 18px; }
.tb-pay__amount span { color: var(--tb-muted); font-size: .9rem; }
.tb-pay__amount strong { font-size: 2rem; color: var(--tb-blue); }
.tb-pay__amount small { color: var(--tb-muted); }
.tb-pay__form { display: flex; justify-content: center; }
.tb-pay__form .kr-embedded { margin: 0 auto !important; }
.tb-pay__form .kr-embedded .kr-payment-button { background-color: var(--tb-brand) !important; border-radius: 8px !important; font-weight: 700 !important; }
.tb-pay__secure { font-size: .8rem; color: var(--tb-muted); text-align: center; margin-top: 14px; }
.tb-pay__notice { background: var(--tb-bg); border-left: 4px solid var(--tb-gold); padding: 12px 16px; border-radius: 6px; }
.tb-pay__notice--error { border-left-color: var(--tb-brand); }

.tb-confirm { text-align: center; max-width: 720px; margin: 0 auto 20px; }
.tb-confirm__icon { width: 64px; height: 64px; margin: 4px auto 8px; border-radius: 50%; background-color: var(--tb-gold); background-position: center; background-size: 32px; background-repeat: no-repeat; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.tb-confirm.is-paid .tb-confirm__icon { background-color: #1e8e4e; }
.tb-confirm__title { color: var(--tb-blue); margin: .25rem 0 .5rem; }
.tb-confirm__code { font-size: 1.1rem; }

.tb-details { max-width: 900px; margin: 0 auto; }
.tb-details__list { margin: 12px 0 0; }
.tb-details__row { display: grid; grid-template-columns: minmax(140px, 35%) 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px dashed #dee2e6; }
.tb-details__row dt { color: #6c757d; }
.tb-details__row dd { margin: 0; font-weight: 600; }
.tb-details__list--stacked .tb-details__row { grid-template-columns: 1fr; gap: 2px; }
.tb-table-wrap { overflow-x: auto; margin-top: 12px; }
.tb-details__table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tb-details__table th { background: var(--tb-blue, #002b4f); color: #fff; padding: 8px; text-align: left; white-space: nowrap; }
.tb-details__table td { padding: 8px; border-bottom: 1px solid #dee2e6; }

@media (max-width: 640px) {
  .tb-steps { flex-direction: column; gap: 6px; }
  .tb-price { grid-template-columns: 1fr; gap: 16px; }
  .tb-card { padding: 16px; }
  .tb-price__table th,
  .tb-price__table td { padding: 8px 4px; font-size: .82rem; }
  .tb-details__row { grid-template-columns: 1fr; gap: 2px; }
}
