/* ── ZaliDree — Custom Styles ──────────────────── */

:root {
  --color-ocean:     #102A43;
  --color-secondary: #49607c;
  --color-primary:   #675d4e;
  --color-sand:      #F5F0BB;
  --color-warm-sand: #D3C4B2;
  --color-off-white: #FDFCF0;
  --color-surface:   #f7f9ff;
  --color-wa:        #25D366;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Plus Jakarta Sans', sans-serif; -webkit-tap-highlight-color: transparent; font-size: 14px; }
.material-symbols-outlined { font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24; vertical-align: middle; }

/* ── iOS Bottom Nav ─────────────────────────────── */
.ios-bottom-nav {
  background: rgba(255,255,255,0.94);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-top: .5px solid rgba(0,0,0,0.12);
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -1px 0 rgba(0,0,0,.06);
}
.ios-tab-item { min-width: 0; transition: opacity .15s; }
.ios-tab-item:active { opacity: .5; transform: scale(.95); }
.ios-tab-book {
  background: var(--color-secondary);
  border-radius: 14px;
  margin: 7px 4px;
  flex: 0 0 auto;
  padding: 0 14px;
  min-width: 68px;
  box-shadow: 0 2px 8px rgba(73,96,124,.35);
}
.ios-tab-active .material-symbols-outlined { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
/* Label sizes in iOS nav */
.ios-tab-item span:last-child { font-size: 9px; letter-spacing: .02em; }

/* ── Navbar scroll state ────────────────────────── */
#navbar.scrolled {
  background: rgba(16, 42, 67, 0.96) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255,255,255,.08), 0 4px 24px rgba(0,0,0,.18);
}

/* ── WhatsApp FAB ────────────────────────────────── */
.whatsapp-fab { box-shadow: 0 4px 20px rgba(37,211,102,.45); }
.whatsapp-fab:hover { box-shadow: 0 6px 28px rgba(37,211,102,.55); }

/* ══════════════════════════════════════════════════
   iOS-STYLE FORM INPUTS — truly borderless
   ══════════════════════════════════════════════════ */
.form-group { display: flex; flex-direction: column; }

.form-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #8e8e93;
  margin-bottom: 5px;
}
.form-label .req { color: #ff3b30; }

/* Base — NO border, just gray bg like iOS settings */
.form-input,
input.form-input,
select.form-input,
textarea.form-input {
  display: block;
  width: 100%;
  background: #f2f2f7;
  border: none !important;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 500;
  color: #1c1c1e;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  outline: none !important;
  box-shadow: none;
  min-height: 46px;
  transition: background .15s ease, box-shadow .2s ease;
}
.form-input::placeholder { color: #c7c7cc; font-weight: 400; }
.form-input:focus {
  background-color: #fff;     /* use background-color NOT shorthand — shorthand resets background-image/repeat/position */
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(73,96,124,.2);
}
.form-input.error {
  background: #fff1f0;
  box-shadow: 0 0 0 3px rgba(255,59,48,.18);
}
/* Select chevron — always set all bg sub-properties to avoid shorthand reset issues */
select.form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' fill='none'%3E%3Cpath d='M1 1.5l4.5 4 4.5-4' stroke='%238e8e93' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 11px 7px;
  padding-right: 36px;
  cursor: pointer;
}
select.form-input:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' fill='none'%3E%3Cpath d='M1 1.5l4.5 4 4.5-4' stroke='%2349607c' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 11px 7px;
}
input[type="date"].form-input { cursor: pointer; }
textarea.form-input { resize: none; min-height: 68px; }

/* ── Vehicle Card Picker ─────────────────────────── */
.vehicle-pick-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.vehicle-pick-scroll::-webkit-scrollbar { display: none; }

.vehicle-pick-card {
  flex: 0 0 auto;
  width: 86px;
  border-radius: 14px;
  background: #f2f2f7;
  border: 2px solid transparent;
  padding: 9px 6px 7px;
  cursor: pointer;
  transition: border-color .18s, background .18s, box-shadow .18s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.vehicle-pick-card:has(input:checked),
.vehicle-pick-card.selected {
  background: rgba(73,96,124,.08);
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 1px var(--color-secondary);
}
.vehicle-pick-card:not(.selected):hover { border-color: #c7c7cc; }

.pick-check {
  display: none;
  position: absolute;
  top: 5px;
  right: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-secondary);
  align-items: center;
  justify-content: center;
}
.vehicle-pick-card:has(input:checked) .pick-check,
.vehicle-pick-card.selected .pick-check { display: flex; }

.pick-img {
  width: 58px;
  height: 40px;
  object-fit: contain;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.pick-name {
  font-size: 9.5px;
  font-weight: 700;
  color: #1c1c1e;
  text-align: center;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  pointer-events: none;
}
.pick-price {
  font-size: 9px;
  font-weight: 600;
  color: var(--color-secondary);
  pointer-events: none;
}

/* ── Vehicle Type Pills (inside booking modal) ─────── */
.pick-cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  border: 1.5px solid #e5e5ea;
  background: #f2f2f7;
  color: #8e8e93;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.pick-cat-btn.active {
  background: var(--color-secondary);
  color: #fff;
  border-color: var(--color-secondary);
}
.pick-cat-btn:not(.active):hover { border-color: #c7c7cc; color: var(--color-secondary); }

/* ── Hero search inputs (glass variant) ─────────────── */
.search-input {
  width: 100%;
  background: rgba(255,255,255,.88);
  border: none;
  border-radius: 13px;
  padding: 11px 14px;
  font-size: 13px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 500;
  color: #1c1c1e;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  transition: background .15s, box-shadow .15s;
}
.search-input:focus { background-color: #fff; box-shadow: 0 0 0 3px rgba(73,96,124,.25); }
select.search-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' fill='none'%3E%3Cpath d='M1 1.5l4.5 4 4.5-4' stroke='%2349607c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 11px 7px;
  padding-right: 32px;
  cursor: pointer;
}
.search-input:focus {
  background-color: #fff;    /* use background-color to preserve background-image */
  box-shadow: 0 0 0 3px rgba(73,96,124,.25);
}
.search-label { display: block; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.7); margin-bottom: 5px; padding-left: 2px; }

/* ══════════════════════════════════════════════════
   BOOKING MODAL
   ══════════════════════════════════════════════════ */
#booking-modal { animation: fadeIn .18s ease; }
#booking-modal:not(.hidden) { display: flex; }

/* Modal card — sticky header + scrollable body + sticky footer on ALL sizes */
.modal-card {
  animation: slideUp .28s cubic-bezier(.16,1,.3,1);
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* mobile: leave 24px breathing room (p-3 padding on container = 12px each side) */
  max-height: calc(100vh - 24px);
  max-height: calc(100svh - 24px); /* svh = excludes mobile browser toolbar */
}
@media (min-width: 768px) {
  .modal-card { max-width: 780px; max-height: 92vh; }
}

/* Scrollable middle section */
.modal-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0; /* required: flex items don't shrink below content by default */
  -webkit-overflow-scrolling: touch;
}
.modal-body::-webkit-scrollbar { width: 3px; }
.modal-body::-webkit-scrollbar-thumb { background: #e5e5ea; border-radius: 10px; }

/* Form must also be flex-column so footer sticks to bottom */
#booking-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Sticky footer inside form */
.modal-footer {
  flex-shrink: 0;
  border-top: 1px solid #f2f2f7;
}

/* 2-column form grid on desktop */
.modal-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 768px) {
  .modal-form-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
    align-items: start;
  }
  .modal-col-span { grid-column: 1 / -1; }
}

@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(36px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
#booking-modal.closing { animation: fadeOut .18s ease forwards; }
#booking-modal.closing .modal-card { animation: slideDown .18s ease forwards; }
@keyframes fadeOut  { to { opacity: 0; } }
@keyframes slideDown { to { transform: translateY(24px); opacity: 0; } }

/* Duration badge */
#duration-badge { display: flex; }
#duration-badge.hidden { display: none; }

/* ── Glass effect ─────────────────────────────────── */
.glass-effect {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255,255,255,.16);
}
.glass-card {
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(73,96,124,.1);
}

/* ── Hero wave ─────────────────────────────────────── */
.wave-bottom { position: absolute; bottom: -1px; left: 0; width: 100%; overflow: hidden; line-height: 0; }
.wave-bottom svg { display: block; width: 100%; }

/* ── Reviews scroll ────────────────────────────────── */
.reviews-track { display: flex; width: max-content; animation: reviewScroll 40s linear infinite; }
.reviews-track:hover { animation-play-state: paused; }
@keyframes reviewScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ── Vehicle card ─────────────────────────────────── */
.vehicle-card { transition: transform .3s ease, box-shadow .3s ease; }
.vehicle-card:hover { transform: translateY(-5px); box-shadow: 0 16px 48px rgba(73,96,124,.16); }
.vehicle-card .card-actions { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.vehicle-card:hover .card-actions { max-height: 80px; }

/* ── Filter pills ─────────────────────────────────── */
.filter-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 16px; border-radius: 9999px;
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  border: 1.5px solid transparent; cursor: pointer; transition: all .18s;
  white-space: nowrap;
}
.filter-pill.active { background: var(--color-secondary); color: #fff; border-color: var(--color-secondary); }
.filter-pill:not(.active) { background: #fff; color: var(--color-secondary); border-color: #dde3ea; }
.filter-pill:not(.active):hover { border-color: var(--color-secondary); background: rgba(73,96,124,.05); }

/* ── Reveal on scroll ─────────────────────────────── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ── Promo strip ──────────────────────────────────── */
.promo-strip { background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-ocean) 100%); }

/* ── FAQ ──────────────────────────────────────────── */
.faq-btn[aria-expanded="true"] + .faq-body,
.faq-body:not(.hidden) { display: block; }
.faq-btn[aria-expanded="true"] .material-symbols-outlined { transform: rotate(180deg); }
.faq-btn .material-symbols-outlined { transition: transform .22s; }

/* ── Mobile bottom nav padding ─────────────────────── */
main, .page-content { padding-bottom: 76px; }
@media (min-width: 768px) { main, .page-content { padding-bottom: 0; } }

/* ── Scrollbar ──────────────────────────────────────── */
.custom-scrollbar::-webkit-scrollbar { width: 3px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #c8c8cc; border-radius: 10px; }

/* ── Badge ────────────────────────────────────────── */
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.badge-primary { background: var(--color-secondary); color: #fff; }
.badge-sand    { background: #F5F0BB; color: var(--color-primary); }
.badge-ocean   { background: var(--color-ocean); color: #fff; }

/* ── Mobile text density tweaks ─────────────────────── */
@media (max-width: 767px) {
  h1 { font-size: clamp(1.75rem, 6vw, 2.5rem); line-height: 1.1; }
  h2 { font-size: clamp(1.4rem, 5vw, 2rem); }
  h3 { font-size: clamp(1rem, 4vw, 1.3rem); }
  .hero-sub { font-size: clamp(.8rem, 3.5vw, 1rem); }
}
