/* =============================================================
   Lejbus — Public site stylesheet
   Used by the public pages (index, booking, photos, faq, contact,
   betingelser, cookies) and portal.html. Reuses /script.js and
   /booking-form.js, so every dynamic class name from those files
   (is-available, is-reserved, is-booked, is-selected-start, etc.)
   is styled here. Admin/contract/cancel pages use /styles.css.
============================================================= */

:root {
  --bg: #f6f8f5;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-muted: #eef2ec;
  --text: #0f1a14;
  --text-muted: #5a6c61;
  --text-soft: #809489;
  --accent: #1f7a52;
  --accent-dark: #14563a;
  --accent-soft: #dff3e8;
  --accent-tint: #eaf6ef;
  --warning: #d4a017;
  --warning-soft: #fbeec0;
  --danger: #b8364a;
  --danger-soft: #fbdde2;
  --border: rgba(15, 26, 20, 0.08);
  --border-strong: rgba(15, 26, 20, 0.16);
  --ring: 0 0 0 3px rgba(31, 122, 82, 0.18);
  --shadow-sm: 0 1px 2px rgba(15, 26, 20, 0.04), 0 1px 1px rgba(15, 26, 20, 0.03);
  --shadow-md: 0 8px 24px -10px rgba(15, 26, 20, 0.12);
  --shadow-lg: 0 28px 60px -24px rgba(15, 26, 20, 0.22);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --container: 1180px;
  --font-sans: "Inter", "InterVariable", ui-sans-serif, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter", ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  --transition: 180ms cubic-bezier(.2,.7,.2,1);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--accent-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
  line-height: 1.2;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 4.2vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

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

/* ---------- Header ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 248, 245, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.header-inner h1,
.header-inner .site-brand {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-inner h1::before,
.header-inner .site-brand::before {
  content: "";
  display: inline-block;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  box-shadow: 0 4px 12px -4px rgba(31, 122, 82, 0.5);
}

.site-nav ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  box-shadow: var(--shadow-sm);
}
.site-nav a {
  display: inline-block;
  padding: 8px 16px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 999px;
  transition: all var(--transition);
}
.site-nav a:hover { color: var(--text); background: var(--surface-muted); }
.site-nav a.active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 4px 12px -4px rgba(31, 122, 82, 0.5);
}

.menu-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 42px; height: 42px;
  padding: 0;
  cursor: pointer;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 4px;
}
.menu-toggle-bar {
  display: block; width: 18px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

@media (max-width: 860px) {
  .menu-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 100%; right: 16px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 18px; box-shadow: var(--shadow-lg);
    padding: 10px; min-width: 220px;
    display: none;
    margin-top: 10px;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul {
    flex-direction: column;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
    gap: 2px;
  }
  .site-nav a {
    display: block;
    padding: 10px 14px;
    border-radius: 12px;
  }
}

/* ---------- Layout ---------- */
main { display: block; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-dark);
  margin: 0 0 .6em;
}

/* ---------- Buttons ---------- */
.button-link, .btn-primary, button.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 10px 22px -10px rgba(31, 122, 82, 0.5);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.button-link:hover, .btn-primary:hover { background: var(--accent-dark); color: #fff; transform: translateY(-1px); }
.button-link:active, .btn-primary:active { transform: translateY(0); }
.button-link.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}
.button-link.secondary:hover { background: var(--surface-muted); color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--container);
  margin: 48px auto 32px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-copy h1,
.hero-copy h2 {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
}
.hero-copy h1 {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  line-height: 1.12;
}
.hero-copy p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 52ch;
}
.hero-actions {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 24px;
}
.hero-image {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--surface);
  aspect-ratio: 4 / 3;
}
.hero-image a { display: block; height: 100%; }
.hero-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 600ms cubic-bezier(.2,.7,.2,1);
}
.hero-image:hover img { transform: scale(1.04); }
.hero-badge {
  position: absolute; left: 18px; bottom: 18px;
  background: rgba(255,255,255,0.92);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow-md);
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 28px; margin-top: 24px; }
  .hero-image { aspect-ratio: 16 / 11; }
}

/* ---------- Home info cards + pricing ---------- */
.home-info-row {
  max-width: var(--container);
  margin: 32px auto 48px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
}
.home-info-main, .home-info-aside {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.home-info-main h2, .home-info-aside h2 {
  font-size: 1.4rem;
  margin-bottom: 14px;
}

.feature-list {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
}
.feature-list li {
  font-size: 0.95rem;
  color: var(--text);
  padding-left: 4px;
}

.pricing-block {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  background: var(--accent-tint);
  border-radius: var(--radius-md);
}
.pricing-block:first-of-type { margin-top: 18px; }
.pricing-item {
  background: var(--surface);
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.pricing-item:last-child { color: var(--accent-dark); }

@media (max-width: 860px) {
  .home-info-row { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
footer {
  margin-top: 80px;
  background: var(--text);
  color: rgba(255,255,255,0.78);
  padding: 56px 24px 32px;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 2fr 1fr;
  gap: 40px;
  align-items: start;
}
.footer-brand {
  font-size: 1.1rem; font-weight: 700; color: #fff;
  margin: 0 0 6px;
}
.footer-tagline { color: rgba(255,255,255,0.6); margin: 0; font-size: 0.9rem; }
.footer-nav {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  align-self: center;
}
.footer-nav a {
  color: rgba(255,255,255,0.7);
  font-size: 0.92rem;
  transition: color var(--transition);
}
.footer-nav a:hover { color: #fff; }
.footer-cards {
  display: flex; gap: 10px; align-items: center;
  justify-self: end;
}
/* Acceptance marks: unaltered official artwork, equal-size white card frames (brand parity). */
.footer-cards img {
  box-sizing: border-box;
  width: 60px; height: 38px;
  object-fit: contain;
  background: #fff;
  padding: 5px 8px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
/* Visa artwork already includes its required clear space. */
.footer-cards .card-visa { padding: 0 2px; }
.footer-meta {
  grid-column: 1 / -1;
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  text-align: center;
}
@media (max-width: 860px) {
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-cards { justify-self: start; }
}

/* =============================================================
   Booking wizard
============================================================= */
.booking-wizard {
  max-width: var(--container);
  margin: 32px auto 100px;
  padding: 0 24px;
}
.wizard-panel { display: none; }
.wizard-panel.is-active { display: block; animation: fade-in 240ms ease both; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.wizard-step-intro {
  margin-bottom: 20px;
}
.wizard-step-intro h1,
.wizard-step-intro h2 { margin: 0 0 6px; font-size: 1.6rem; }
.wizard-step-intro p { color: var(--text-muted); margin: 0; }

/* Legend (calendar key) */
.availability-legend {
  display: flex; flex-wrap: wrap; gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.88rem;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  width: fit-content;
}
.legend-item { display: inline-flex; align-items: center; gap: 8px; }
.legend-swatch {
  width: 14px; height: 14px; border-radius: 4px;
  display: inline-block;
}
.legend-swatch-available { background: var(--accent-soft); border: 1px solid var(--accent); }
.legend-swatch-reserved  { background: var(--warning-soft); border: 1px solid var(--warning); }
.legend-swatch-booked    { background: var(--danger-soft);  border: 1px solid var(--danger); }
.legend-swatch-today     { background: var(--surface);      border: 2px solid var(--accent-dark); }

/* Step 1 layout */
.wizard-step1-layout, .wizard-step2-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 1020px) {
  .wizard-step1-layout, .wizard-step2-layout {
    grid-template-columns: 1fr;
  }
}

/* Calendar panel */
.availability-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.calendar-pager {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; gap: 12px;
}
.pager-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.pager-btn:hover:not(:disabled) {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.pager-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.pager-range {
  font-weight: 600; font-size: 1rem;
  color: var(--text);
}

.calendar-data-status {
  font-size: 0.85rem; color: var(--text-muted);
  margin: 0 0 12px;
}
.calendar-data-status.is-error { color: var(--danger); }

.availability-calendar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
@media (max-width: 700px) {
  .availability-calendar { grid-template-columns: 1fr; }
}

.calendar-month { min-width: 0; }
.calendar-month-header {
  margin-bottom: 8px;
  padding: 4px 6px;
}
.calendar-month-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-dark);
  text-transform: capitalize;
}
.calendar-weekdays {
  display: grid;
  grid-template-columns: 28px repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}
.calendar-weekday {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 0;
}
.calendar-grid {
  display: grid;
  grid-template-columns: 28px repeat(7, 1fr);
  gap: 2px;
}
.calendar-weeknumber {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-weight: 500;
}
.calendar-day, .calendar-day-empty {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  font-weight: 500;
  user-select: none;
  position: relative;
}
.calendar-day {
  background: var(--surface-muted);
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform 120ms ease;
}
.calendar-day.is-available { background: var(--accent-soft); color: var(--accent-dark); }
.calendar-day.is-available:hover { background: var(--accent); color: #fff; transform: scale(1.06); }
.calendar-day.is-reserved { background: var(--warning-soft); color: #6b4d04; cursor: not-allowed; }
.calendar-day.is-booked   { background: var(--danger-soft); color: #6f1623; cursor: not-allowed; }
.calendar-day.is-disabled { cursor: not-allowed; }
.calendar-day.is-disabled:hover { transform: none; }
.calendar-day.is-today {
  outline: 2px solid var(--accent-dark);
  outline-offset: -2px;
  font-weight: 700;
}
.calendar-day.is-selected-start,
.calendar-day.is-selected-end {
  background: var(--accent);
  color: #fff;
}
.calendar-day.is-in-range {
  background: var(--accent);
  color: #fff;
  border-radius: 0;
}
.calendar-day.is-selected-start { border-radius: 8px 0 0 8px; }
.calendar-day.is-selected-end { border-radius: 0 8px 8px 0; }
.calendar-day.is-selected-start.is-selected-end { border-radius: 8px; }
.calendar-day.is-hover-preview {
  background: var(--accent-tint);
  color: var(--accent-dark);
}
.calendar-day.is-row-end + .calendar-weeknumber { /* row end visual hook */ }

/* Price card sidebar */
.price-breakdown-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 92px;
}
.price-breakdown-title { margin: 0 0 6px; font-size: 1.15rem; }
.price-breakdown-subtitle {
  font-size: 0.86rem; color: var(--text-muted); margin: 0 0 16px;
}
.km-select-row, .time-select-field {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 14px;
}
.time-select-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 14px;
}
.time-select-row > .time-select-field { margin-bottom: 0; }
.km-select-label {
  font-size: 0.85rem; font-weight: 500; color: var(--text-muted);
}
.km-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235a6c61' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
.km-select:focus { outline: none; box-shadow: var(--ring); border-color: var(--accent); }

.price-breakdown-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.price-breakdown-badge[hidden] { display: none; }

.price-breakdown-list {
  margin: 12px 0;
  padding: 14px 0;
  border-top: 1px dashed var(--border-strong);
  border-bottom: 1px dashed var(--border-strong);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 16px;
  font-size: 0.92rem;
}
.price-breakdown-list dt { color: var(--text-muted); margin: 0; }
.price-breakdown-list dd { margin: 0; text-align: right; font-weight: 500; }
.price-breakdown-list dt.price-breakdown-section { margin-top: 0.35rem; font-weight: 700; color: var(--accent-dark); }
.price-breakdown-list dt.price-breakdown-separator {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border-strong);
  margin: 0.3rem 0;
  height: 0;
}
.price-breakdown-list dd.price-breakdown-separator-spacer { display: none; }

.km-select.is-attention { border-color: var(--accent); box-shadow: var(--ring); }

/* Clear price summary (step 1) */
.price-summary {
  margin: 12px 0;
  padding: 14px 0;
  border-top: 1px dashed var(--border-strong);
  border-bottom: 1px dashed var(--border-strong);
  font-size: 0.92rem;
}
.ps-hint { margin: 0; color: var(--text-muted); }
.ps-period {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--surface-muted);
  border-radius: 12px;
  margin-bottom: 12px;
}
.ps-period-dates { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 0.85rem; color: var(--text); }
.ps-arrow { color: var(--text-muted); }
.ps-days {
  flex-shrink: 0;
  font-weight: 700; font-size: 0.82rem; color: var(--accent-dark);
  background: var(--accent-tint);
  padding: 3px 10px; border-radius: 999px;
}
.ps-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ps-line { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ps-label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ps-name { font-weight: 600; color: var(--text); }
.ps-detail { font-size: 0.8rem; color: var(--text-muted); line-height: 1.35; }
.ps-amount { font-weight: 600; white-space: nowrap; color: var(--text); }

.price-included {
  list-style: none; margin: 14px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.price-included[hidden] { display: none; }
.price-included li {
  font-size: 0.78rem; color: var(--accent-dark);
  background: var(--accent-tint);
  padding: 4px 10px; border-radius: 999px;
}
.price-included li::before { content: "\2713\00a0"; font-weight: 700; }

/* Extras opt-in in price card */
.price-extras { margin-top: 4px; }
.price-extras[hidden] { display: none; }
.price-extras-summary {
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; color: var(--accent-dark);
  font-size: 0.92rem;
}
.price-extras-total { font-size: 0.9rem; }
.price-extras-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 4px; }
.price-extra-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background var(--transition), border-color var(--transition);
}
.price-extra-row:hover { background: var(--accent-tint); border-color: var(--border-strong); }
.price-extra-row input[type="checkbox"] { margin: 0; width: 16px; height: 16px; accent-color: var(--accent); }
.price-extra-row .px-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.price-extra-row .px-name { font-weight: 600; color: var(--text); }
.price-extra-row .px-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.3; }
.price-extra-row .px-price { font-size: 0.78rem; color: var(--text-muted); }
.price-extra-row .px-total { font-weight: 700; color: var(--accent-dark); min-width: 5.5rem; text-align: right; }

.price-breakdown-total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 12px;
  font-size: 1.1rem; font-weight: 700; color: var(--text);
}
.price-breakdown-total > :last-child { color: var(--accent-dark); font-size: 1.25rem; }
.price-breakdown-deposit {
  display: flex; justify-content: space-between;
  font-size: 0.82rem; color: var(--text-muted);
  margin-top: 4px;
}

.price-card-action {
  width: 100%; margin-top: 18px;
  padding: 14px 22px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  font-size: 1rem;
  transition: background var(--transition), transform var(--transition);
}
.price-card-action:hover:not(:disabled) { background: var(--accent-dark); transform: translateY(-1px); }
.price-card-action:disabled { background: var(--surface-muted); color: var(--text-muted); cursor: not-allowed; }

/* Step 2 form */
.wizard-step2-form { display: block; }
.booking-request-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.booking-request-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  margin: 14px 0 6px;
}
.booking-request-form label:first-child { margin-top: 0; }
.booking-request-form input[type="text"],
.booking-request-form input[type="email"],
.booking-request-form input[type="tel"],
.booking-request-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  transition: border var(--transition), box-shadow var(--transition);
}
.booking-request-form input:focus, .booking-request-form textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: var(--ring);
}
.booking-request-form textarea { resize: vertical; min-height: 110px; }

.form-row-inline {
  display: grid; grid-template-columns: 130px 1fr; gap: 12px;
}
.form-field-zip, .form-field-city { display: flex; flex-direction: column; }

.booking-hp { position: absolute; left: -10000px; top: -10000px; width: 1px; height: 1px; overflow: hidden; }

.booking-consent-group { margin-top: 18px; display: grid; gap: 10px; }
.booking-consent-item {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--surface-muted);
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
}
.booking-consent-item input[type="checkbox"] {
  margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex-shrink: 0;
}
.booking-terms-link {
  background: none; border: 0;
  color: var(--accent-dark);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.form-status { margin-top: 14px; font-size: 0.92rem; min-height: 1.2em; }
.form-status.is-error { color: var(--danger); }
.form-status.is-success { color: var(--accent-dark); }

.wizard-step2-actions {
  display: flex; gap: 12px; justify-content: space-between;
  margin-top: 18px;
}
.step2-back-btn, .step2-submit-btn {
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition), transform var(--transition);
}
.step2-back-btn { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); }
.step2-back-btn:hover { background: var(--surface-muted); }
.step2-submit-btn { background: var(--accent); color: #fff; min-width: 200px; }
.step2-submit-btn:hover:not(:disabled) { background: var(--accent-dark); transform: translateY(-1px); }
.step2-submit-btn:disabled { background: var(--surface-muted); color: var(--text-muted); cursor: not-allowed; }
.step2-submit-btn .dots { display: inline-block; width: 1.6em; text-align: left; }
.step2-submit-btn .dots::after { content: ''; animation: breathingDots 1.6s steps(1) infinite; }
@keyframes breathingDots {
  0%  { content: '.'; }
  25% { content: '..'; }
  50% { content: '...'; }
  75% { content: '....'; }
}

/* Step 2 readonly sidebar */
.price-breakdown-card--readonly .price-card-action { display: none; }
.pickup-info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 16px;
  box-shadow: var(--shadow-sm);
}
.pickup-info-title { font-size: 1rem; margin: 0 0 8px; }
.pickup-info-address {
  font-style: normal;
  color: var(--text);
  font-size: 0.95rem;
  margin: 0 0 8px;
}
.pickup-info-note { color: var(--text-muted); font-size: 0.85rem; margin: 0; }

/* Bottom bar */
.booking-bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 12px 24px;
  display: flex; align-items: center; gap: 14px;
  z-index: 40;
  box-shadow: 0 -10px 30px -10px rgba(15,26,20,0.12);
}
.bottom-bar-back, .bottom-bar-action {
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.92rem;
  transition: background var(--transition);
}
.bottom-bar-back { background: var(--surface-muted); color: var(--text); }
.bottom-bar-back[hidden] { display: none; }
.bottom-bar-action { background: var(--accent); color: #fff; }
.bottom-bar-action:hover:not(:disabled) { background: var(--accent-dark); }
.bottom-bar-action:disabled { background: var(--surface-muted); color: var(--text-muted); cursor: not-allowed; }
.bottom-bar-summary {
  flex: 1;
  display: flex; flex-direction: column;
  font-size: 0.88rem;
}
.bottom-bar-dates { color: var(--text); font-weight: 500; }
.bottom-bar-price { color: var(--accent-dark); font-weight: 600; }

/* Terms modal */
body.terms-modal-open { overflow: hidden; }
.terms-modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.terms-modal[hidden] { display: none; }
.terms-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(15,26,20,0.55);
  backdrop-filter: blur(4px);
}
.terms-modal-dialog {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 720px; width: 100%; max-height: 85vh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.terms-modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.terms-modal-header h3 { margin: 0; }
.terms-modal-close {
  background: var(--surface-muted);
  border: 0; cursor: pointer;
  width: 32px; height: 32px; border-radius: 8px;
  font-size: 1.4rem; line-height: 1;
  color: var(--text);
}
.terms-modal-body { padding: 22px; overflow-y: auto; font-size: 0.92rem; }
.terms-modal-body h2 { font-size: 1.2rem; margin-top: 1em; }
.terms-modal-body h3 { font-size: 1rem; margin-top: 1em; }
.terms-modal-footer {
  padding: 14px 22px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end;
}

/* Booking confirmation */
.booking-confirmation {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.booking-confirmation[hidden] { display: none; }
.booking-confirmation-icon {
  width: 64px; height: 64px; margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center;
}
.booking-confirmation-icon svg {
  width: 32px; height: 32px;
  fill: none; stroke: currentColor; stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round;
}
.booking-confirmation h2 { margin: 0 0 8px; }
.booking-confirmation > p { color: var(--text-muted); }
.booking-confirmation-details {
  margin-top: 20px;
  text-align: left;
  background: var(--surface-muted);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}
.booking-confirmation-details h3 { margin: 0 0 10px; font-size: 1rem; }
.booking-confirmation-list {
  display: grid; grid-template-columns: 1fr 2fr;
  gap: 6px 14px; margin: 0;
}
.booking-confirmation-list dt { color: var(--text-muted); font-weight: 500; }
.booking-confirmation-list dd { margin: 0; }
.booking-confirmation-actions {
  display: flex; gap: 10px; justify-content: center; margin-top: 22px;
  flex-wrap: wrap;
}
.booking-confirmation-print, .booking-confirmation-new {
  padding: 11px 20px; border-radius: 999px;
  font-weight: 600; cursor: pointer; border: 0;
  font-family: inherit;
}
.booking-confirmation-print { background: var(--surface-muted); color: var(--text); }
.booking-confirmation-new { background: var(--accent); color: #fff; }

body.modal-open { overflow: hidden; }

/* =============================================================
   Photos / gallery
============================================================= */
.photos-layout {
  max-width: var(--container);
  margin: 40px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 32px;
  align-items: start;
}
.photos-gallery-section h1,
.photos-gallery-section h2,
.photos-info-section h2 { font-size: 1.5rem; margin-bottom: 16px; }

.minibus-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.minibus-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}
.minibus-gallery img:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-md);
}

.photos-info-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 92px;
}
.photos-info-section ul {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 10px;
  font-size: 0.92rem;
}
.photos-info-section ul ul {
  margin-top: 4px; padding-left: 14px;
  color: var(--text-muted);
}
.photos-info-section strong { color: var(--accent-dark); }

@media (max-width: 860px) {
  .photos-layout { grid-template-columns: 1fr; }
  .photos-info-section { position: static; }
}

/* Image modal (lightbox) */
.modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15,26,20,0.92);
  display: none;
  align-items: center; justify-content: center;
}
.modal.is-open { display: flex; }
.modal[aria-hidden="false"] { display: flex; }
.modal-panel {
  position: relative;
  max-width: 92vw; max-height: 92vh;
  display: flex; align-items: center; justify-content: center;
}
.modal-content {
  max-width: 92vw; max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.6);
}
.modal-nav, .close {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  backdrop-filter: blur(8px);
  transition: background var(--transition);
}
.modal-nav:hover, .close:hover { background: rgba(255,255,255,0.22); }
.modal-prev { position: absolute; left: -68px; top: 50%; transform: translateY(-50%); }
.modal-next { position: absolute; right: -68px; top: 50%; transform: translateY(-50%); }
.close { position: absolute; top: -56px; right: 0; font-size: 1.5rem; }
#caption {
  position: absolute; bottom: -44px; left: 0; right: 0;
  color: rgba(255,255,255,0.85); text-align: center; font-size: 0.9rem;
}
@media (max-width: 700px) {
  .modal-prev { left: 8px; }
  .modal-next { right: 8px; }
  .close { top: -52px; right: 8px; }
}

/* =============================================================
   Contact page
============================================================= */
.contact-section {
  max-width: var(--container);
  margin: 48px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: start;
}
.contact-info { padding: 8px 0; }
.contact-info h1,
.contact-info h2 { font-size: 2rem; margin-bottom: 16px; }
.contact-info p { color: var(--text-muted); }
.company-details {
  margin: 24px 0 0;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px 18px;
  font-size: 0.95rem;
}
.company-details dt { color: var(--text-muted); font-weight: 500; }
.company-details dd { margin: 0; color: var(--text); }

#contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
}
#contact-form label {
  display: block;
  font-size: 0.85rem; font-weight: 500;
  margin: 12px 0 6px;
}
#contact-form label:first-child { margin-top: 0; }
#contact-form input,
#contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  transition: border var(--transition), box-shadow var(--transition);
}
#contact-form input:focus,
#contact-form textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: var(--ring);
}
#contact-form textarea { min-height: 140px; resize: vertical; }
#contact-form button[type="submit"] {
  margin-top: 16px;
  width: 100%;
  padding: 14px 22px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  border: 0;
  cursor: pointer;
  transition: background var(--transition);
}
#contact-form button[type="submit"]:hover { background: var(--accent-dark); }
@media (max-width: 860px) {
  .contact-section { grid-template-columns: 1fr; gap: 24px; }
}

/* =============================================================
   FAQ
============================================================= */
.faq-section {
  max-width: 820px;
  margin: 48px auto;
  padding: 0 24px;
}
.faq-section h1,
.faq-section h2 { font-size: 2rem; margin-bottom: 8px; }
.faq-list { display: grid; gap: 10px; margin-top: 24px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0;
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.faq-item[open] { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 22px;
  font-weight: 600;
  color: var(--text);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent-dark);
  transition: transform var(--transition);
  width: 24px; text-align: center; flex-shrink: 0;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p {
  padding: 0 22px 18px;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.faq-item a { color: var(--accent-dark); text-decoration: underline; }
.faq-item p + p { margin-top: -8px; }
.faq-item ul {
  margin: 0;
  padding: 0 22px 18px 42px;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.faq-item li + li { margin-top: 4px; }
.faq-section h2.faq-group-title { font-size: 1.35rem; margin: 40px 0 0; color: var(--accent-dark); }

/* =============================================================
   Terms (betingelser) page
============================================================= */
.terms-section {
  max-width: 820px;
  margin: 48px auto;
  padding: 0 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  box-shadow: var(--shadow-sm);
}
.terms-section + .terms-section { margin-top: 24px; }
.terms-section h1,
.terms-section h2 { font-size: 1.8rem; margin-bottom: 16px; }
.terms-section h3 {
  font-size: 1.05rem;
  margin: 28px 0 10px;
  color: var(--accent-dark);
}
.terms-section ul {
  padding-left: 20px;
  margin: 0 0 14px;
  color: var(--text);
}
.terms-section li { margin: 6px 0; }
.terms-section p { color: var(--text); }

@media (max-width: 700px) {
  .terms-section { padding: 24px 22px; }
}

/* =============================================================
   Customer portal (/b/{code} → /portal.html)
============================================================= */
.portal-body [hidden] { display: none !important; }

.portal-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 28px 24px 0;
}

.portal-screen {
  min-height: 55vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; text-align: center;
}
.portal-screen-icon { font-size: 2.6rem; }

.portal-muted { color: var(--text-muted); }
.portal-small { font-size: 0.85rem; }
.portal-error-text { color: var(--danger); font-size: 0.88rem; margin: 6px 0 0; min-height: 1em; }

.portal-hero { margin-bottom: 20px; }
.portal-hero h2 { margin-bottom: 4px; }
.portal-subtitle { color: var(--text-muted); margin: 0; }
.portal-unread-banner {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 0.9rem;
}

/* Tabs */
.portal-tabs {
  display: inline-flex; gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}
.portal-tab {
  position: relative;
  border: 0; background: transparent;
  padding: 9px 20px;
  border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 0.92rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.portal-tab:hover { color: var(--text); background: var(--surface-muted); }
.portal-tab.is-active { color: #fff; background: var(--accent); }
.portal-tab:focus-visible { outline: none; box-shadow: var(--ring); }
.portal-tab-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--warning);
  margin-left: 4px;
  vertical-align: middle;
}

/* Layout */
.portal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.portal-col-main { display: flex; flex-direction: column; gap: 20px; }
.portal-col-chat { position: sticky; top: 84px; }
@media (max-width: 900px) {
  .portal-grid { grid-template-columns: 1fr; }
  .portal-col-chat { position: static; }
}

.portal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
}
.portal-card h3 { margin-bottom: 14px; }

/* Status */
.portal-status-banner {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 14px;
}
.portal-status-banner.is-danger { background: var(--danger-soft); color: var(--danger); }
.portal-status-banner.is-warning { background: var(--warning-soft); color: #7a5a00; }

.portal-timeline { list-style: none; margin: 0 0 12px; padding: 0; }
.portal-step {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 6px 0;
  color: var(--text-soft);
}
.portal-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13px; top: 34px;
  width: 2px; height: calc(100% - 22px);
  background: var(--border-strong);
}
.portal-step-dot {
  flex: 0 0 28px;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700;
  background: var(--surface-muted);
  color: var(--text-soft);
  border: 2px solid var(--border-strong);
}
.portal-step.is-done { color: var(--text); }
.portal-step.is-done .portal-step-dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.portal-step.is-done:not(:last-child)::after { background: var(--accent); }
.portal-step.is-current { color: var(--text); font-weight: 600; }
.portal-step.is-current .portal-step-dot { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-tint); }

.portal-note { color: var(--text-muted); font-size: 0.92rem; }
.portal-link-btn {
  border: 0; background: none; padding: 0;
  font: inherit; font-weight: 600;
  color: var(--accent-dark);
  text-decoration: underline;
  cursor: pointer;
}

/* Booking details */
.portal-dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 18px;
  margin: 0 0 14px;
  font-size: 0.93rem;
}
.portal-dl dt { color: var(--text-muted); }
.portal-dl dd { margin: 0; font-weight: 500; }
.portal-pdf-link { padding: 9px 16px; font-size: 0.88rem; }

/* Payments */
.portal-payments { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.portal-pay-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}
.portal-pay-main { display: flex; flex-direction: column; }
.portal-pay-name { font-weight: 600; }
.portal-pay-amount { color: var(--text-muted); font-size: 0.9rem; }
.portal-pay-side { display: flex; align-items: center; gap: 10px; }
.portal-pay-btn { padding: 8px 18px; font-size: 0.9rem; }
.portal-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem; font-weight: 600;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.portal-badge.is-ok { background: var(--accent-soft); color: var(--accent-dark); border-color: transparent; }
.portal-badge.is-warning { background: var(--warning-soft); color: #7a5a00; border-color: transparent; }

/* Cancel */
.portal-danger-btn { color: var(--danger); border-color: var(--danger-soft); }
.portal-danger-btn:hover { background: var(--danger-soft); color: var(--danger); }
.portal-danger-solid { background: var(--danger); box-shadow: none; }
.portal-danger-solid:hover { background: #962b3c; }
.portal-cancel-confirm {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
}
.portal-btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* Chat */
.portal-chat { display: flex; flex-direction: column; }
.portal-chat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.portal-chat-head h3 { margin-bottom: 10px; }
.portal-chat-list {
  display: flex; flex-direction: column; gap: 10px;
  min-height: 180px;
  max-height: 52vh;
  overflow-y: auto;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}
.portal-chat-empty { margin: auto 0; text-align: center; color: var(--text-muted); font-size: 0.9rem; }
.portal-msg { display: flex; flex-direction: column; max-width: 82%; }
.portal-msg.is-mine { align-self: flex-end; align-items: flex-end; }
.portal-msg.is-theirs { align-self: flex-start; align-items: flex-start; }
.portal-msg-bubble {
  padding: 9px 13px;
  border-radius: 16px;
  font-size: 0.93rem;
  line-height: 1.45;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.portal-msg.is-mine .portal-msg-bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.portal-msg.is-theirs .portal-msg-bubble { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.portal-msg-text { white-space: pre-wrap; }
.portal-msg-img { max-width: 220px; max-height: 220px; border-radius: 10px; margin-bottom: 4px; }
.portal-msg-meta { font-size: 0.74rem; color: var(--text-soft); margin-top: 3px; }

.portal-chat-input-row { display: flex; align-items: flex-end; gap: 8px; }
.portal-chat-input-row textarea {
  flex: 1;
  min-height: 44px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  font: inherit; font-size: 0.93rem;
  background: var(--surface);
  color: var(--text);
}
.portal-chat-input-row textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.portal-chat-attach-btn {
  flex: 0 0 44px;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  font-size: 1.15rem;
}
.portal-chat-attach-btn:hover { background: var(--surface-muted); }
.portal-chat-send { padding: 11px 18px; }
.portal-chat-send:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.portal-chat-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 0.78rem; margin-top: 4px; }
.portal-chat-meta .portal-error-text { margin: 0; font-size: 0.82rem; }
.portal-chat-attach { position: relative; display: inline-block; margin-bottom: 8px; }
.portal-chat-attach img { max-width: 120px; max-height: 90px; border-radius: 8px; border: 1px solid var(--border); }
.portal-chat-attach-remove {
  position: absolute; top: -8px; right: -8px;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 0;
  background: var(--text);
  color: #fff;
  cursor: pointer;
  line-height: 1;
}

/* Contract tab — contract.css uses the legacy token names */
.portal-contract {
  --text-primary: var(--text);
  --text-secondary: var(--text-muted);
}
.portal-contract.contract-wrap { padding: 0 0 2rem; }
.portal-contract-placeholder { max-width: 640px; }

/* Footer */
.portal-footer { margin-top: 56px; padding: 32px 24px; }
.portal-footer-inner { max-width: var(--container); margin: 0 auto; }
.portal-footer-line { margin: 2px 0; color: rgba(255,255,255,0.7); font-size: 0.9rem; }

@media (max-width: 600px) {
  .portal-main { padding: 20px 14px 0; }
  .portal-card { padding: 16px; }
  .portal-tabs { display: flex; }
  .portal-tab { flex: 1; }
  .portal-msg { max-width: 92%; }
}
