/* =====================================================================
   Avira booking POC — styles
   Palette: deep harbour navy for trust, a calm teal for focus and
   selection, cool paper greys for surfaces. Colours are tokens so a
   later rebrand only touches :root.
   ===================================================================== */
:root {
  --ink: #0d2136;          /* deepest navy: headings on light, hero bg */
  --navy: #163a5f;         /* primary actions */
  --navy-hover: #0f2c49;
  --blue-soft: #e8eff7;
  --teal: #0a7470;         /* accent: focus, selection, success marks */
  --teal-soft: #e2f1f0;
  --bg: #f2f5f8;
  --surface: #ffffff;
  --line: #d5dde6;
  --line-strong: #b7c3d0;
  --text: #1a2633;
  --muted: #536476;
  --error: #b3261e;
  --error-bg: #fdeceb;
  --notice-bg: #fff6df;
  --notice-line: #ecd291;
  --notice-text: #5f4500;

  --font-ui: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  --font-display: 'Source Serif 4', Georgia, 'Noto Serif', serif;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --shadow: 0 1px 2px rgba(13, 33, 54, .06), 0 6px 20px rgba(13, 33, 54, .06);
  --focus: 0 0 0 3px #ffffff, 0 0 0 5px var(--teal);
  --page-max: 1080px;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Type ---------- */
h1, h2, h3 { color: var(--ink); margin: 0; line-height: 1.2; }
h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); letter-spacing: -.01em; }
h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0; }
.lede { color: var(--muted); max-width: 62ch; margin-top: .4rem; }
.screen-head { margin-bottom: 1.5rem; }
.screen-head:focus { outline: none; }
h1:focus { outline: none; }

/* ---------- Focus ---------- */
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
/* Headings receive focus on navigation for screen readers; no ring needed. */
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { box-shadow: none; outline: none; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--ink);
  color: #fff;
}
.topbar-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; letter-spacing: .01em; }
.brand-tag {
  font-size: .75rem; color: #c9d6e3; border: 1px solid rgba(255,255,255,.28);
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}
.session { display: flex; align-items: center; gap: 10px; }
.session-who { font-size: .875rem; color: #c9d6e3; }
@media (max-width: 420px) { .session-who { display: none; } .brand-tag { display: none; } }

/* ---------- Stepper (a real sequence, so numbered) ---------- */
.stepper { background: var(--surface); border-bottom: 1px solid var(--line); }
.stepper ol {
  list-style: none; margin: 0 auto; max-width: var(--page-max);
  padding: 10px var(--gutter); display: flex; gap: 6px; counter-reset: step;
}
.stepper li {
  counter-increment: step; flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  font-size: .8125rem; color: var(--muted);
  padding-top: 8px; border-top: 3px solid var(--line);
}
.stepper li::before {
  content: counter(step);
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: .75rem; font-weight: 600;
  background: var(--bg); color: var(--muted); border: 1px solid var(--line-strong);
}
.stepper li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stepper li.is-done { border-top-color: var(--teal); color: var(--text); }
.stepper li.is-done::before { content: '✓'; background: var(--teal); border-color: var(--teal); color: #fff; }
.stepper li[aria-current="step"] { border-top-color: var(--navy); color: var(--ink); font-weight: 600; }
.stepper li[aria-current="step"]::before { background: var(--navy); border-color: var(--navy); color: #fff; }
@media (max-width: 560px) {
  .stepper li span { display: none; }
  .stepper li[aria-current="step"] span { display: inline; }
  .stepper li[aria-current="step"] { flex: 3; }
}

/* ---------- Layout ---------- */
main { flex: 1; width: 100%; }
main:focus { outline: none; }
.page { max-width: var(--page-max); margin: 0 auto; padding: 28px var(--gutter) 48px; }
.grid-2 { display: grid; gap: 24px; }
@media (min-width: 860px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .sticky { position: sticky; top: 16px; }
}
.aside-first { order: -1; }
@media (min-width: 860px) { .aside-first { order: 0; } }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
}
@media (min-width: 640px) { .panel { padding: 28px; } }
.panel + .panel { margin-top: 20px; }
.panel-title { margin-bottom: 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px;
  border-radius: var(--r-md); border: 1px solid transparent;
  font-weight: 600; font-size: .9375rem; line-height: 1.2;
  cursor: pointer; text-align: center;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--navy-hover); }
.btn-secondary { background: var(--surface); color: var(--navy); border-color: var(--line-strong); }
.btn-secondary:hover:not(:disabled) { border-color: var(--navy); background: var(--blue-soft); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); min-height: 36px; padding: 6px 14px; font-size: .875rem; }
.btn-ghost-light:hover { background: rgba(255,255,255,.1); }
.btn-link {
  background: none; border: 0; padding: 4px 2px; color: var(--navy);
  font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.btn:disabled { opacity: .65; cursor: not-allowed; }
.btn-block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.actions .btn { flex: 1 1 180px; }
@media (min-width: 640px) { .actions .btn { flex: 0 0 auto; } .actions--end { justify-content: flex-end; } }

.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: spin .8s linear infinite; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Notices ---------- */
.notice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--r-md);
  font-size: .9rem; line-height: 1.45;
  background: var(--blue-soft); color: var(--ink); border: 1px solid #c8d8ea;
}
.notice svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.notice--sample { background: var(--notice-bg); color: var(--notice-text); border-color: var(--notice-line); }
.notice--error { background: var(--error-bg); color: var(--error); border-color: #f2b8b5; }
.notice--teal { background: var(--teal-soft); color: #064d4a; border-color: #b5dcd9; }
.notice + .notice { margin-top: 10px; }
.sample-tag {
  display: inline-block; font-size: .75rem; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
  background: var(--notice-bg); color: var(--notice-text); border: 1px solid var(--notice-line);
  vertical-align: middle;
}

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; min-width: 0; }
.field label, .field .label { display: block; font-weight: 600; font-size: .9375rem; margin-bottom: 6px; color: var(--ink); }
.field .optional { font-weight: 400; color: var(--muted); }
.hint { display: block; font-size: .8125rem; color: var(--muted); margin-top: -2px; margin-bottom: 6px; }
.input {
  width: 100%; min-height: 46px; padding: 10px 12px;
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--r-md);
  font-size: 1rem; line-height: 1.4;
  transition: border-color .15s ease;
}
.input:hover { border-color: #8fa1b4; }
.input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(10,116,112,.22); }
textarea.input { min-height: 110px; resize: vertical; }
.input[aria-invalid="true"] { border-color: var(--error); background: #fffafa; }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(179,38,30,.2); }
.field-error {
  display: flex; gap: 6px; align-items: flex-start;
  color: var(--error); font-size: .875rem; margin-top: 6px; font-weight: 500;
}
.field-error:empty { display: none; }
.field-error::before { content: '!'; flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--error); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; margin-top: 2px; }
.counter { font-size: .8125rem; color: var(--muted); text-align: right; margin-top: 4px; }
.counter.is-over { color: var(--error); font-weight: 600; }
.row-2 { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 480px) { .row-2 { grid-template-columns: 1fr 1fr; } }
.tz-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .8125rem; color: var(--teal); font-weight: 600;
  background: var(--teal-soft); padding: 3px 10px; border-radius: 999px; margin-bottom: 10px;
}
.tz-badge svg { width: 14px; height: 14px; }
fieldset { border: 0; padding: 0; margin: 0 0 4px; min-width: 0; }
legend { padding: 0; font-weight: 600; color: var(--ink); margin-bottom: 6px; font-size: .9375rem; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 72px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--navy); font-weight: 600; font-size: .8125rem;
  padding: 8px 10px; cursor: pointer; border-radius: var(--r-sm);
}
.error-summary { margin-bottom: 20px; }
.error-summary ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.error-summary button { background: none; border: 0; padding: 0; color: var(--error); text-decoration: underline; cursor: pointer; font: inherit; text-align: left; }

/* ---------- Login ---------- */
.login-shell { display: grid; gap: 0; max-width: 980px; margin: 0 auto; padding: 28px var(--gutter) 48px; }
@media (min-width: 860px) { .login-shell { grid-template-columns: 1fr 1fr; padding-top: 56px; } }
.login-aside {
  background: var(--ink); color: #dfe8f1;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 28px 24px; position: relative; overflow: hidden;
}
@media (min-width: 860px) { .login-aside { border-radius: var(--r-lg) 0 0 var(--r-lg); padding: 44px 40px; } }
.login-aside h1 { color: #fff; font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); }
.login-aside .lede { color: #b9c9d9; }
.login-aside .pattern { position: absolute; right: -40px; bottom: -40px; width: 220px; opacity: .14; pointer-events: none; }
.how { list-style: none; padding: 0; margin: 28px 0 0; counter-reset: how; display: grid; gap: 14px; position: relative; }
.how li { counter-increment: how; display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; font-size: .9375rem; }
.how li::before {
  content: counter(how); width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.35); display: grid; place-items: center;
  font-weight: 600; font-size: .85rem; color: #fff;
}
.how strong { display: block; color: #fff; font-weight: 600; }
.login-card {
  background: var(--surface); border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 var(--r-lg) var(--r-lg); padding: 24px 20px;
}
@media (min-width: 860px) { .login-card { border-top: 1px solid var(--line); border-left: 0; border-radius: 0 var(--r-lg) var(--r-lg) 0; padding: 44px 40px; } }
.demo-flag {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; color: var(--notice-text); background: var(--notice-bg);
  border: 1px solid var(--notice-line); border-radius: var(--r-md);
  padding: 10px 12px; font-size: .9rem; margin-bottom: 18px;
}
.demo-flag svg { width: 18px; height: 18px; flex: none; }
.creds {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 14px;
  background: var(--bg); border: 1px dashed var(--line-strong); border-radius: var(--r-md);
  padding: 12px 14px; margin: 0 0 22px; font-size: .9rem;
}
.creds dt { color: var(--muted); }
.creds dd { margin: 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

/* ---------- Property ---------- */
.hero {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: var(--ink); min-height: 220px; display: flex; align-items: flex-end;
}
@media (min-width: 640px) { .hero { min-height: 300px; } }
.hero-media { position: absolute; inset: 0; }
.hero-media svg, .hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media img { position: absolute; inset: 0; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,33,54,0) 30%, rgba(13,33,54,.88) 100%); }
.hero-copy { position: relative; padding: 20px; color: #fff; width: 100%; }
@media (min-width: 640px) { .hero-copy { padding: 28px 32px; } }
.hero-copy h1 { color: #fff; }
.hero-loc { display: flex; align-items: center; gap: 6px; color: #d6e2ee; margin-top: 6px; font-size: .95rem; }
.hero-loc svg { width: 16px; height: 16px; flex: none; }
.hero .sample-tag { margin-bottom: 10px; }

.amenities { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 16px; }
.amenities li { display: flex; align-items: center; gap: 8px; font-size: .9375rem; }
.amenities svg { width: 18px; height: 18px; color: var(--teal); flex: none; }

.apt-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.apt {
  display: grid; gap: 12px; grid-template-columns: 1fr;
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px;
  background: var(--surface);
}
@media (min-width: 560px) { .apt { grid-template-columns: 1fr auto; align-items: center; } }
.apt.is-selected { border-color: var(--teal); box-shadow: inset 4px 0 0 var(--teal); background: #fbfefe; }
.apt-name { font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.apt-meta { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.apt-occ { display: inline-block; margin-top: 8px; font-size: .8125rem; color: var(--navy); background: var(--blue-soft); padding: 2px 10px; border-radius: 999px; }
.apt-id { font-size: .75rem; color: var(--muted); margin-top: 6px; }
.apt .btn { min-width: 150px; }

.contact-block { font-size: .95rem; }
.contact-block dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.contact-block dt { color: var(--muted); }
.contact-block dd { margin: 0; overflow-wrap: anywhere; }
.contact-missing { color: var(--muted); font-style: italic; }

/* ---------- Booking summary aside ---------- */
.choice {
  border-radius: var(--r-md); background: var(--ink); color: #fff; padding: 18px;
}
.choice .label { font-size: .8125rem; color: #b9c9d9; }
.choice .name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; margin-top: 2px; }
.choice .meta { color: #c9d6e3; font-size: .875rem; margin-top: 4px; }
.choice .btn-link { color: #fff; margin-top: 10px; }

/* ---------- Review ---------- */
.review-list { margin: 0; display: grid; }
.review-row { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 14px 0; border-top: 1px solid var(--line); }
.review-row:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 560px) { .review-row { grid-template-columns: 200px 1fr; gap: 16px; } }
.review-row dt { color: var(--muted); font-size: .9rem; }
.review-row dd { margin: 0; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; white-space: pre-wrap; }
.review-row dd .sub { display: block; color: var(--muted); font-weight: 400; font-size: .875rem; }
.review-row dd.is-empty { color: var(--muted); font-style: italic; font-weight: 400; }

/* ---------- Success slip (the one bold element) ---------- */
.slip-wrap { max-width: 640px; margin: 0 auto; }
.slip {
  position: relative; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow);
  overflow: hidden;
}
.slip-top { background: var(--ink); color: #fff; padding: 26px 22px 30px; text-align: center; }
.slip-check {
  width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 14px;
  display: grid; place-items: center; background: var(--teal); color: #fff;
}
.slip-check svg { width: 26px; height: 26px; }
.slip-top h1 { color: #fff; }
.slip-ref-label { color: #b9c9d9; font-size: .875rem; margin-top: 18px; }
.slip-ref {
  font-size: clamp(1.5rem, 1.1rem + 2.2vw, 2.25rem); font-weight: 700; letter-spacing: .06em;
  font-variant-numeric: tabular-nums; margin-top: 4px; overflow-wrap: anywhere;
}
/* perforation between stub and body */
.slip-perf { height: 22px; position: relative; background: var(--surface); }
.slip-perf::before {
  content: ''; position: absolute; left: 22px; right: 22px; top: 50%;
  border-top: 2px dashed var(--line-strong);
}
.slip-perf::after, .slip-perf > i {
  content: ''; position: absolute; top: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line);
}
.slip-perf::after { right: -12px; }
.slip-perf > i { left: -12px; }
.slip-body { padding: 8px 22px 24px; }
@media (min-width: 560px) { .slip-body { padding: 8px 32px 30px; } }
@media print { .topbar, .stepper, .actions, footer { display: none !important; } }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); background: var(--surface); }
footer p { max-width: var(--page-max); margin: 0 auto; padding: 14px var(--gutter); font-size: .8125rem; color: var(--muted); }

/* ---------- Screen transition: one quiet move on navigation ---------- */
.screen { animation: enter .22s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
