/* Travelking – checkout
   Tokens taken from the Figma file "Checkout-Test" (Feedback/09/2026). */
:root {
  --green: #0caea1;            /* Primary/Travelking New Green */
  --green-10: rgba(12, 174, 161, 0.1);
  --red: #ff0000;              /* Secondary/Circus Red */
  --black: #000;
  --ink: #28293f;
  --grey: #7f7f7f;             /* Greyscale/Grey Secondary */
  --grey-light: #e9e9e9;       /* Greyscale/Grey Light */
  --grey-superlight: #f9f9fa;  /* Greyscale/Grey SuperLight */
  --modal-border: #e3e3e6;
  --white: #fff;
  --warn-bg: #fff5e6;
  --warn-border: #ffc56b;
  --radius: 6px;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  --font: "Trenda", "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 24px;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; }
[hidden] { display: none !important; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }

/* Typography (Trenda/H2 … Subtitle 2) */
.h2 { font-size: 30px; line-height: 40px; font-weight: 600; }
.h3 { font-size: 24px; line-height: 30px; font-weight: 600; }
.h4 { font-size: 20px; line-height: 30px; font-weight: 600; }
.h5 { font-size: 18px; line-height: 24px; font-weight: 600; }
.h6 { font-size: 16px; line-height: 24px; font-weight: 600; }
.text-sm { font-size: 14px; line-height: 18px; }
.text-xs { font-size: 12px; line-height: 16px; }
.semibold { font-weight: 600; }
.muted { color: var(--grey); }
.link {
  color: var(--green);
  text-decoration: underline;
  text-underline-position: from-font;
  background: none; border: 0; padding: 0;
  font-size: inherit; line-height: inherit;
}
.link:hover { text-decoration-thickness: 2px; }

.stack-12 > * + * { margin-top: 12px; }
.stack-24 > * + * { margin-top: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ───────── Navbar ───────── */
.navbar { border-bottom: 1px solid var(--grey-light); background: var(--white); }
.navbar__inner {
  max-width: 1122px; margin: 0 auto; height: 96px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 16px;
}
.navbar__back { justify-self: start; }
.navbar__logo { justify-self: center; }
.navbar__logo img { width: 155px; height: 40px; }
.navbar__contact { justify-self: end; text-align: right; text-decoration: none; color: inherit; }
.navbar__contact strong { display: block; font-size: 18px; line-height: 24px; font-weight: 600; }
.navbar__contact span { display: block; font-size: 14px; line-height: 18px; color: var(--grey); }

/* ───────── Layout ───────── */
.checkout {
  max-width: 1154px; margin: 0 auto; padding: 48px 16px 96px;
  display: grid; grid-template-columns: minmax(0, 646px) minmax(0, 435px);
  justify-content: space-between; gap: 40px; align-items: start;
}
.checkout__main > .section + .section { margin-top: 48px; }
.section > h1, .section > h2 { margin-bottom: 24px; }
.checkout__aside { align-self: stretch; }
.aside__sticky { position: sticky; top: 24px; }
/* Desktop: summary scrolls inside the panel, price + CTA always visible */
@media (min-width: 861px) {
  .aside__sticky { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
  .aside__title, .timer, .total { flex: none; }
  #summary {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    margin: 0 -4px; padding: 0 4px 4px;
    scrollbar-width: thin; scrollbar-color: var(--grey-light) transparent;
  }
  #summary::-webkit-scrollbar { width: 6px; }
  #summary::-webkit-scrollbar-thumb { background: var(--grey-light); border-radius: 3px; }
}
.aside__title { margin: 10px 0 24px; }

/* ───────── Cards ───────── */
.card {
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.divider { border: 0; height: 1px; background: var(--grey-light); margin: 0; }

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius); border: 1px solid transparent;
  font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.btn--sm { height: 32px; padding: 0 16px; font-size: 14px; line-height: 18px; }
.btn--lg { height: 48px; padding: 0 24px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--green); color: var(--white); }
.btn--primary:hover { background: #0a9b8f; }
.btn--ghost {
  background: var(--white); border-color: var(--grey-light); color: var(--black);
  box-shadow: var(--shadow);
}
.btn--ghost:hover { border-color: #cfcfcf; }
.btn--outline {
  height: 40px; padding: 0 24px; font-size: 14px; line-height: 18px;
  background: var(--white); border-color: var(--green); color: var(--green);
}
.btn--outline:hover { background: var(--green-10); }
.icon-btn {
  width: 32px; height: 32px; display: inline-grid; place-items: center;
  background: none; border: 0; border-radius: var(--radius);
}
.icon-btn:hover { background: rgba(0,0,0,.05); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* ───────── Form fields ───────── */
.field label, .field > .label { display: block; font-size: 14px; line-height: 18px; font-weight: 600; margin-bottom: 12px; }
.field input, .inline-form input, textarea {
  width: 100%; height: 40px; padding: 0 16px;
  font-size: 14px; line-height: 18px; color: var(--black);
  background: var(--grey-superlight);
  border: 1px solid var(--grey-light); border-radius: var(--radius);
  outline: none; transition: border-color .15s, background-color .15s;
}
.field input::placeholder, .inline-form input::placeholder, textarea::placeholder { color: var(--black); opacity: 1; }
.field input:focus, .inline-form input:focus, textarea:focus { border-color: var(--green); background: var(--white); }
.field input.is-invalid { border-color: var(--red); }
.field input.is-warn { background: var(--warn-bg); border-color: var(--warn-border); }
textarea { height: 96px; padding: 12px 16px; resize: vertical; }
.field__hint, .field__error { font-size: 14px; line-height: 18px; margin-top: 8px; }
.field__hint--warn { color: var(--ink); font-weight: 600; }
.field__error { color: var(--red); }
.input-icon { position: relative; }
.input-icon img { position: absolute; left: 16px; top: 12px; pointer-events: none; }
.field .input-icon input { padding-left: 48px; }
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
input[type=number] { -moz-appearance: textfield; }

/* Checkbox (Rectangle 2 Copy 9 / Group 132) */
.check { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; line-height: 18px; cursor: pointer; user-select: none; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box { width: 16px; height: 16px; flex: none; background: url("assets/icons/checkbox-off.svg") center / 16px no-repeat; }
.check input:checked + .check__box { background-image: url("assets/icons/checkbox-on.svg"); }
.check input:focus-visible + .check__box { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 2px; }

/* ───────── Selectable options (64px tiles) ───────── */
.option {
  position: relative;
  background: var(--white);
  border: 1px solid var(--grey-light); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.option.is-selected { border: 2px solid var(--green); margin: -1px; }
.option.is-selected + .option { margin-top: 11px; }
.option.is-selected::after {
  content: ""; position: absolute; top: 7px; right: 7px; width: 16px; height: 16px;
  background: url("assets/icons/checkbox-on.svg") center / 16px no-repeat;
}
.option__head {
  display: flex; align-items: center; gap: 16px; width: 100%;
  min-height: 62px; padding: 0 40px 0 23px; text-align: left;
  background: none; border: 0; border-radius: var(--radius);
}
.option__icon { width: 24px; height: 24px; flex: none; }
.option__label { font-size: 14px; line-height: 18px; font-weight: 600; }
.option__body { display: none; padding: 0 23px 23px; }
.option__body > * + * { margin-top: 24px; }
.option--expandable.is-selected .option__body { display: block; border-top: 1px solid var(--grey-light); padding-top: 24px; margin: 0 23px; padding-left: 0; padding-right: 0; }
.payment-logos { width: 100%; max-width: 550px; height: auto; }

/* ───────── Stay card ───────── */
.stay { position: relative; }
.stay__remove { position: absolute; top: 18px; right: 18px; }
.stay__top { display: flex; gap: 16px; padding-right: 28px; }
.stay__img { width: 160px; height: 100px; border-radius: 4.6px; object-fit: cover; flex: none; transform: scaleX(-1); }
.stay__title { font-size: 18px; line-height: 24px; font-weight: 600; max-width: 290px; }
.stay__title span { color: var(--grey); }
.stay__price { font-size: 20px; line-height: 30px; font-weight: 600; margin-top: 12px; }
.stay__note { margin-top: 24px; }
.stay__note textarea { margin-top: 12px; }
.stay__ins { border-top: 1px solid var(--grey-light); margin-top: 24px; padding-top: 24px; }
.stay__ins-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.ins {
  position: relative; display: flex; align-items: center; gap: 16px;
  min-height: 64px; padding: 0 16px 0 23px; text-align: left; width: 100%;
  background: var(--white); border: 1px solid var(--grey-light); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.ins:hover { border-color: #cfcfcf; }
.ins__text { flex: 1; min-width: 0; font-size: 14px; line-height: 18px; font-weight: 600; }
.ins__sub { display: block; font-weight: 400; color: var(--ink); }
.ins__meta { display: flex; align-items: center; gap: 8px; flex: none; }
.ins.is-selected { border: 2px solid var(--green); padding: 0 15px 0 22px; }
.ins.is-selected::after {
  content: ""; position: absolute; top: 7px; right: 7px; width: 16px; height: 16px;
  background: url("assets/icons/checkbox-on.svg") center / 16px no-repeat;
}
.ins.is-selected .ins__meta { margin-right: 18px; }
.tuito {
  width: 20px; height: 20px; border-radius: 4px; background: #ededf2; color: #333340;
  display: inline-grid; place-items: center; font-size: 12px; line-height: 1; font-weight: 700;
}
.info { width: 16px; height: 16px; flex: none; cursor: help; }

/* ───────── Donations ───────── */
.donations { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tile {
  height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: var(--white); border: 1px solid var(--grey-light); border-radius: var(--radius); box-shadow: var(--shadow);
  font-size: 14px; line-height: 18px; font-weight: 600; white-space: nowrap;
}
.tile[aria-checked=true] { border: 2px solid var(--green); }
.radio { width: 16px; height: 16px; background: url("assets/icons/radio-off.svg") center / 16px no-repeat; }
.tile[aria-checked=true] .radio { background-image: url("assets/icons/radio-on.svg"); }

/* ───────── Discounts ───────── */
.discounts { display: flex; flex-direction: column; gap: 20px; }
.discount__body { padding-left: 28px; margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.inline-form { display: flex; gap: 12px; }
.inline-form input { flex: 1; min-width: 0; }
.applied {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--green-10); border-radius: var(--radius); padding: 10px 16px;
  font-size: 14px; line-height: 18px;
}
.applied__label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }

/* ───────── Summary ───────── */
.timer {
  border: 1px solid var(--red); border-radius: var(--radius) var(--radius) 0 0;
  color: var(--red); text-align: center; font-weight: 600; font-size: 16px; line-height: 24px;
  padding: 3px 12px; box-shadow: var(--shadow); background: var(--white);
}
.timer + #summary > .sum:first-child { border-top-left-radius: 0; border-top-right-radius: 0; border-top: 0; }
.sum { padding: 24px 32px; }
.sum__title { font-size: 18px; line-height: 24px; font-weight: 600; }
.sum__title span { color: var(--grey); }
.sum__perks {
  margin-top: 16px; padding: 12px; border-radius: var(--radius); background: var(--green-10);
  display: flex; flex-direction: column; gap: 8px;
}
.sum__perk { display: flex; align-items: center; gap: 8px; color: var(--green); font-size: 14px; line-height: 18px; font-weight: 600; }
.sum__perk img { flex: none; }
.sum__rows { margin-top: 16px; }
.sum__row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 6px 0; border-bottom: 1px solid var(--grey-light); font-size: 16px; line-height: 24px;
}
.sum__row > :first-child { font-weight: 600; }
.sum__row > :last-child { text-align: right; }
.sum__row:last-child { border-bottom: 0; }
.sum__toggle {
  display: flex; align-items: center; gap: 12px; padding: 0; border: 0; background: none;
  font-weight: 600; text-align: left;
}
.sum__toggle img { transition: transform .15s; }
.sum__toggle[aria-expanded=true] img { transform: rotate(180deg); }
.sum__extras {
  background: var(--grey-superlight); border-radius: var(--radius); padding: 12px 24px; margin: 8px 0 6px;
  display: grid; grid-template-columns: 1fr auto; gap: 12px 16px; font-size: 14px; line-height: 18px;
}
.sum__extras > :nth-child(odd) { font-weight: 600; }
.sum__extras > :nth-child(even) { text-align: right; }

.total { padding: 24px; margin-top: 24px; }
.total__rows { margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.total__rows:empty { display: none; }
.total__row { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; line-height: 18px; }
.total__row > :first-child { font-weight: 600; }
.total__row .minus { color: var(--green); }
.total__row--grand { font-size: 20px; line-height: 30px; font-weight: 600; margin-bottom: 24px; }
.legal { margin-top: 12px; font-size: 12px; line-height: 16px; color: var(--grey); text-align: center; }

/* ───────── Modals ───────── */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(40, 41, 63, 0.6); }
.modal__panel {
  position: relative; width: 100%; max-height: calc(100vh - 32px); overflow: auto;
  background: var(--white); border: 1px solid var(--modal-border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.modal__panel--list { max-width: 740px; }
.modal__panel--process { max-width: 740px; }
.modal__panel--small { max-width: 440px; }
.modal__head {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 16px 0 24px;
  background: var(--grey-superlight); border-bottom: 1px solid var(--modal-border); border-radius: var(--radius) var(--radius) 0 0;
  color: var(--ink); font-weight: 600; font-size: 16px;
}
.modal__body { padding: 24px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 24px; }
.plan {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 24px 24px 16px; border: 1px solid var(--grey-light); border-radius: var(--radius); box-shadow: var(--shadow);
}
.plan strong { font-size: 14px; line-height: 18px; }
.plan .text-xs { margin-top: 4px; }
.btn--plan { width: 100%; max-width: 244px; margin: 24px 0 16px; }
.plan .link { font-size: 14px; line-height: 18px; }
.tag {
  position: absolute; top: 12px; right: 12px; padding: 3px 8px; border-radius: var(--radius);
  background: rgba(255, 0, 0, 0.08); color: var(--red); font-size: 11px; line-height: 14px;
}
.table-wrap { overflow-x: auto; }
.cover { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 18px; }
.cover th, .cover td { border: 1px solid var(--grey-light); height: 32px; padding: 6px 12px; font-weight: 400; }
.cover thead th:not(:first-child), .cover td:not(:first-child) { text-align: center; }
.cover th:first-child, .cover td:first-child { text-align: left; width: 46%; }
.cover__group th { background: var(--grey-superlight); font-weight: 600; text-align: left; }

.process { display: grid; grid-template-columns: 265px 1fr; min-height: 420px; }
.process__side { background: var(--grey-superlight); padding: 24px; border-bottom-left-radius: var(--radius); }
.process__side .text-sm { margin-top: 12px; }
.process__main { padding: 24px; display: flex; flex-direction: column; }
.process__actions { margin-top: auto; padding-top: 32px; display: flex; justify-content: flex-end; gap: 24px; }
.steps { list-style: none; padding: 0; margin: 32px 0 0; }
.steps li { position: relative; display: flex; align-items: center; gap: 12px; height: 24px; font-weight: 600; color: var(--grey); }
.steps li + li { margin-top: 16px; }
.steps li + li::before { content: ""; position: absolute; left: 7px; top: -20px; width: 2px; height: 24px; background: #f0f0f2; z-index: 0; }
.steps li .dot { position: relative; z-index: 1; width: 16px; height: 16px; background: url("assets/icons/step-off.svg") center / 16px no-repeat; }
.steps li.is-current { color: var(--black); }
.steps li.is-current .dot { background-image: url("assets/icons/step-on.svg"); }
.steps li.is-done { color: var(--black); }
.steps li.is-done .dot { background-image: url("assets/icons/checkbox-on.svg"); border-radius: 50%; }
.traveller-list { list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 18px; }
.traveller-list li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--grey-light); }
body.has-modal { overflow: hidden; }

/* ───────── Responsive (mobile frames 375px) ───────── */
@media (max-width: 1100px) {
  .checkout { grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 24px; }
}
@media (max-width: 860px) {
  .checkout { grid-template-columns: minmax(0, 1fr); padding-top: 24px; }
  .aside__sticky { position: static; }
  .checkout__aside { margin-top: 16px; }
}
@media (max-width: 640px) {
  .navbar__inner { height: 64px; grid-template-columns: auto 1fr auto; }
  .navbar__back span, .navbar__contact span { display: none; }
  .navbar__back { padding: 0 10px; }
  .navbar__logo img { width: 116px; height: 30px; }
  .navbar__contact strong { font-size: 14px; }
  .h2 { font-size: 24px; line-height: 32px; }
  .h3 { font-size: 20px; line-height: 28px; }
  .card { padding: 16px; }
  .sum { padding: 16px; }
  .grid-2, .stay__ins-grid, .plans { grid-template-columns: 1fr; }
  .stay__img { width: 96px; height: 60px; }
  .stay__title { font-size: 16px; line-height: 22px; }
  .donations { grid-template-columns: 1fr 1fr; }
  .option__head { padding-left: 15px; gap: 12px; }
  .option__body, .option--expandable.is-selected .option__body { margin: 0 15px; }
  .inline-form { flex-direction: column; }
  .discount__body { padding-left: 0; }
  .process { grid-template-columns: 1fr; }
  .process__side { border-radius: 0; }
  .steps { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; }
  .steps li + li { margin-top: 0; }
  .steps li + li::before { display: none; }
  .process__actions { gap: 12px; }
  .process__actions .btn { flex: 1; padding: 0 12px; }
}
