/* Responsive fixes – DigiTech Solutions, Nov 2026
   Loaded after style.css. Keeps the ferry photo visible and the booking
   panel usable at every screen size. */

/* ---------- Laptop & desktop: photo fills the screen, panel sits on the bottom edge ---------- */
@media (min-width: 1024px) {
  .full-ferry-hero {
    min-height: clamp(460px, calc(100svh - var(--masthead-height, 156px) - 60px), 760px);
    padding: 0;
    margin-bottom: 92px;
    align-items: flex-end;
  }
  .full-ferry-hero .booking-wrap { margin-bottom: -92px; z-index: 3; }
  .full-ferry-hero .booking-panel {
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: 0 14px 40px rgb(0 28 60 / 16%);
  }
  .full-ferry-hero .hero-shade { background: linear-gradient(180deg, #0023480a 55%, #0c24524d 100%); }
}

/* ---------- Phones & tablets: photo first, panel below it ---------- */
@media (max-width: 1023px) {
  .full-ferry-hero {
    display: block;
    min-height: 0;
    height: auto;
    padding: 0 0 8px;
    margin-bottom: 0;
    background: transparent;
  }
  .full-ferry-hero .hero-vessel {
    position: relative;
    display: block;
    inset: auto;
    width: 100%;
    height: clamp(230px, 58vw, 460px);
    object-fit: cover;
    object-position: center 52%;
  }
  .full-ferry-hero .hero-shade {
    position: absolute;
    inset: 0 0 auto 0;
    height: clamp(230px, 58vw, 460px);
    background: linear-gradient(180deg, #00234800 60%, #0c245233 100%);
  }
  .full-ferry-hero .booking-wrap {
    position: relative;
    width: 92%;
    max-width: 720px;
    margin: -40px auto 0;
    transform: none;
    left: auto;
    bottom: auto;
    z-index: 3;
  }
  .full-ferry-hero .booking-panel {
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 1px solid #e3e9f1;
    box-shadow: 0 10px 30px rgb(0 28 60 / 14%);
    padding: 16px;
  }
  .booking-panel .booking-tabs { flex-wrap: nowrap; margin-bottom: 14px; }
  .booking-panel .booking-caption { display: none; }

  .booking-panel .booking-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .booking-panel .terminal-pair { grid-column: 1 / -1; display: flex; min-width: 0 !important; }
  .booking-panel .terminal-pair .booking-field { flex: 1; min-width: 0; }
  .booking-panel .booking-date { grid-column: 1 / -1; min-width: 0; max-width: none; }
  .booking-panel .booking-search { grid-column: 1 / -1; width: 100%; margin: 4px 0 0; }

  /* Counters as  −  1  +  with the label underneath */
  .booking-panel .counter {
    display: grid;
    grid-template-columns: 34px 1fr 34px;
    grid-template-areas: "minus num plus" "label label label";
    align-items: center;
    justify-items: center;
    gap: 2px 4px;
    min-width: 0;
    padding: 8px 6px;
    border: 1px solid #b8cae1;
    border-radius: 8px;
    background: #f3f5f8;
  }
  .booking-panel .counter > div { display: contents; }
  .booking-panel .counter button { width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 1px solid #d5deea; font-size: 18px; line-height: 1; }
  .booking-panel .counter button[data-step="1"] { grid-area: plus; }
  .booking-panel .counter button[data-step="-1"] { grid-area: minus; }
  .booking-panel .counter output { grid-area: num; font-size: 20px; }
  .booking-panel .counter span { grid-area: label; font-size: 11px; }
}

/* Tablets: two-row layout */
@media (min-width: 600px) and (max-width: 1023px) {
  .booking-panel .booking-fields { grid-template-columns: repeat(4, 1fr); }
  .booking-panel .terminal-pair { grid-column: span 2; }
  .booking-panel .booking-date { grid-column: span 2; }
  .booking-panel .booking-fields:has(#return-field:not([hidden])) .booking-date { grid-column: span 1; }
  .booking-panel .booking-search { grid-column: span 2; margin: 0; }
}

/* Wide screens: keep the whole ferry (mast to waterline) in view */
@media (min-width: 1280px) { .full-ferry-hero .hero-vessel { object-position: center 38%; } }

/* ---------- Routes cards: 2 per row on tablets ---------- */
@media (min-width: 600px) and (max-width: 1023px) {
  .grid:has(.route-art) { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ---------- Lost & Found report form: full width below the intro on tablets/phones ---------- */
@media (max-width: 1023px) {
  .lost-report-layout { grid-template-columns: 1fr !important; gap: 28px; }
}

/* ---------- Vehicle fares: card rows on phones instead of a clipped table ---------- */
@media (max-width: 640px) {
  .fare-table-scroll { overflow: visible; }
  .vehicle-fare-table { min-width: 0 !important; }
  .vehicle-fare-table thead { display: none; }
  .vehicle-fare-table tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "cls gmd" "desc cfa";
    gap: 6px 14px;
    padding: 16px;
    border-top: 1px solid #b8cae1;
    align-items: center;
  }
  .vehicle-fare-table tbody th,
  .vehicle-fare-table tbody td { display: block; padding: 0 !important; border: 0; width: auto !important; }
  .vehicle-fare-table tbody th { grid-area: cls; display: flex; align-items: center; gap: 12px; font-size: 15px; }
  .vehicle-fare-table tbody th .fare-vehicle-icons svg { width: 64px; height: auto; }
  .vehicle-fare-table tbody td:nth-child(2) { grid-area: desc; font-size: 13px; line-height: 1.45; color: #4d5f78; }
  .vehicle-fare-table tbody td:nth-child(3) { grid-area: gmd; text-align: right; font-size: 15px; }
  .vehicle-fare-table tbody td:nth-child(4) { grid-area: cfa; text-align: right; font-size: 12px; font-weight: 500; color: #4d5f78; }
  .vehicle-fare-table tbody td:nth-child(3)::before { content: "D "; }
  .vehicle-fare-table tbody td:nth-child(4)::after { content: " CFA"; }
}

/* ---------- Full-screen curtain menu (phones & tablets) ---------- */
html.curtain-lock, html.curtain-lock body { overflow: hidden; }
.curtain {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; flex-direction: column;
  background: #0c2452; color: #fff;
  padding: max(18px, env(safe-area-inset-top)) 22px max(22px, env(safe-area-inset-bottom));
  overflow-y: auto; overscroll-behavior: contain;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .5s cubic-bezier(.7, 0, .2, 1);
}
.curtain.open { clip-path: inset(0 0 0 0); }
.curtain::before {
  content: ""; position: absolute; inset: auto -20% -30% auto; width: 80vw; height: 80vw; max-width: 520px; max-height: 520px;
  border-radius: 50%; background: radial-gradient(circle, #1b53eb33, transparent 70%); pointer-events: none;
}
.curtain-top { display: flex; align-items: center; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid #ffffff1f; }
.curtain-brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-size: 16px; line-height: 1.2; }
.curtain-brand img { width: 48px; height: 48px; background: #fff; border-radius: 50%; padding: 2px; }
.curtain-close { position: relative; width: 46px; height: 46px; border-radius: 50%; border: 1px solid #ffffff40; background: transparent; cursor: pointer; }
.curtain-close span { position: absolute; left: 13px; right: 13px; top: 22px; height: 2px; background: #fff; border-radius: 2px; transform: rotate(45deg); }
.curtain-close span + span { transform: rotate(-45deg); }
.curtain-close:focus-visible, .curtain a:focus-visible, .curtain button:focus-visible { outline: 2px solid #8fb3ff; outline-offset: 3px; }

.curtain-nav ul { list-style: none; margin: 12px 0 0; padding: 0; }
.curtain-item { border-bottom: 1px solid #ffffff14; }
.curtain-link {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 17px 2px; background: none; border: 0; color: #fff; text-decoration: none; text-align: left;
  font-size: clamp(22px, 6.4vw, 30px); font-weight: 600; letter-spacing: -.01em; cursor: pointer;
}
.curtain-link svg { width: 22px; height: 22px; flex: none; fill: none; stroke: #ffffff80; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s; }
.curtain-link[aria-current] { color: #8fb3ff; }
.curtain-group[aria-expanded="true"] svg { transform: rotate(180deg); }
.curtain-sub > div { display: flex; flex-direction: column; padding: 0 0 14px 14px; border-left: 2px solid #1b53eb; margin: 0 0 14px 2px; }
.curtain-sub a { color: #d4def0; text-decoration: none; font-size: 17px; padding: 9px 0; }
.curtain-sub a[aria-current] { color: #8fb3ff; }

.curtain-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 26px; }
.curtain-cta { display: grid; place-items: center; min-height: 52px; border-radius: 12px; background: #1b53eb; color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; text-align: center; padding: 0 10px; }
.curtain-cta.ghost { background: transparent; border: 1px solid #ffffff4d; }
.curtain-foot { margin-top: auto; padding-top: 28px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.curtain-lang { display: inline-flex; background: #ffffff14; border-radius: 30px; padding: 4px; }
.curtain-lang button { border: 0; background: transparent; color: #c5d2e8; font-size: 13px; padding: 8px 14px; border-radius: 30px; cursor: pointer; }
.curtain-lang button[aria-pressed="true"] { background: #fff; color: #0c2452; font-weight: 600; }
.curtain-contact { color: #c5d2e8; font-size: 14px; }

/* Staggered reveal */
.curtain .curtain-item, .curtain-actions, .curtain-foot { opacity: 0; transform: translateY(14px); transition: opacity .35s, transform .35s; }
.curtain.open .curtain-item, .curtain.open .curtain-actions, .curtain.open .curtain-foot { opacity: 1; transform: none; transition-delay: calc(.22s + var(--i, 0) * .045s); }
@media (min-width: 600px) { .curtain { padding-left: 48px; padding-right: 48px; } .curtain-actions { max-width: 520px; } }
@media (min-width: 1024px) { .curtain { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
  .curtain, .curtain .curtain-item, .curtain-actions, .curtain-foot { transition: none !important; }
}

/* ---------- Service alert banner (from the staff portal) ---------- */
.service-alert{padding:12px 5%;font-size:14px}
.service-alert.delay{background:#fbf3e3;color:#7a5410}
.service-alert.cancel{background:#fbecea;color:#9b2c25}
.service-alert .sa-inner{max-width:var(--content-max-width,1300px);margin:0 auto;display:flex;gap:12px;align-items:flex-start}
.service-alert svg{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;margin-top:1px}
.service-alert p{margin:0;line-height:1.5}
.service-alert strong{margin-right:8px}
.ticker-track a.ticker-alert{font-weight:700}
