/* ---------------------------------------------------------------------------
 * BlackOphir overrides on top of the LimoRide template.
 *
 * Loaded last, after custom.css. Two jobs only:
 *   1. Fit real BlackOphir assets into the template's chrome (the crest logo
 *      is a tall square, the template's logo.svg is a wide wordmark).
 *   2. Provide the handful of app-specific widgets the template has no
 *      equivalent for — skip link, loading state, status messages, and the
 *      booking wizard's form furniture.
 *
 * Everything here is prefixed `bo-` except the template-class overrides, so
 * it stays obvious which rules are ours.
 * ------------------------------------------------------------------------ */

/* --- Hero image carousel dots -------------------------------------------- */
/* Mirrors the template's own .swiper-pagination-bullet sizing (custom.css),
 * since these dots aren't Swiper-rendered (see HeroImageCarousel.tsx). */

.bo-hero-carousel-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
}

.bo-hero-carousel-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: rgb(255 255 255 / 0.5);
  cursor: pointer;
  transition: all 0.4s ease-in-out;
}

.bo-hero-carousel-dot.is-active {
  width: 30px;
  background: var(--main-color, #a6832f);
}

@media (prefers-reduced-motion: reduce) {
  .bo-hero-carousel-dot {
    transition: none;
  }
}

/* --- Logo fitting -------------------------------------------------------- */

/* The template ships a wide wordmark and leaves the image intrinsic
 * (`.sisf-header-logo-link.navbar-brand img { height: auto }`). The BlackOphir
 * crest is a tall square, so unconstrained it inflates the absolutely
 * positioned header until it covers the hero headline. Matching the template's
 * two-class specificity so these win. */
.sisf-header-logo-link.navbar-brand img,
.sisf-header-logo-link img {
  height: 64px;
  width: auto;
  max-width: none;
  object-fit: contain;
}

.sis-header-sticky.active .sisf-header-logo-link.navbar-brand img {
  height: 56px;
}

.footer-logo img {
  height: 110px;
  width: auto;
  object-fit: contain;
}

.sis-preloader .sis-loading-icon img {
  height: 90px;
  width: auto;
  object-fit: contain;
}

@media (max-width: 991px) {
  .sisf-header-logo-link img {
    height: 52px;
  }
}

/* --- Skip link (WCAG 2.2 SC 2.4.1) --------------------------------------- */

.bo-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
}

.bo-skip-link:focus {
  left: 16px;
  top: 16px;
  padding: 12px 24px;
  border-radius: 50px;
  background: var(--main-color, #a6832f);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

/* --- Loading state ------------------------------------------------------- */

.bo-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 50vh;
  color: var(--text-color, #4b4740);
  font-family: var(--default-font, "Jost", sans-serif);
}

.bo-loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgb(2 6 24 / 0.15);
  border-top-color: var(--main-color, #a6832f);
  border-radius: 50%;
  animation: bo-spin 800ms linear infinite;
}

@keyframes bo-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bo-loading-spinner {
    animation-duration: 3s;
  }
}

/* --- Status messages ----------------------------------------------------- */

.bo-status {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid;
  font-family: var(--default-font, "Jost", sans-serif);
  line-height: 26px;
}

.bo-status i {
  margin-top: 4px;
  flex-shrink: 0;
}

.bo-status--success {
  border-color: rgb(25 127 91 / 0.4);
  background: rgb(25 127 91 / 0.08);
  color: #14563f;
}

.bo-status--error {
  border-color: rgb(230 87 87 / 0.45);
  background: rgb(230 87 87 / 0.08);
  color: #a12c2c;
}

.bo-status--unavailable {
  border-color: rgb(180 105 14 / 0.45);
  background: rgb(180 105 14 / 0.08);
  color: #8a5109;
}

.bo-status--info {
  border-color: rgb(2 6 24 / 0.15);
  background: var(--secondary-color, #f4f4f4);
  color: var(--primary-color, #17140f);
}

/* --- Empty state --------------------------------------------------------- */

.bo-empty {
  text-align: center;
  padding: 64px 32px;
  border-radius: 16px;
  background: var(--secondary-color, #f4f4f4);
}

.bo-empty h2 {
  font-family: var(--heading-font, "Cormorant Garamond", serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--primary-color, #17140f);
  margin-bottom: 8px;
}

/* --- Forms the template has no equivalent for ---------------------------- */

.bo-field {
  display: block;
  margin-bottom: 20px;
}

.bo-field > span.bo-label,
.bo-label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--default-font, "Jost", sans-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-color, #17140f);
}

.bo-input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgb(2 6 24 / 0.15);
  background: #fff;
  font-family: var(--default-font, "Jost", sans-serif);
  font-size: 16px;
  font-weight: 500;
  color: var(--primary-color, #17140f);
  transition: border-color 0.2s ease;
}

.bo-input:focus {
  outline: none;
  border-color: var(--main-color, #a6832f);
}

.bo-panel {
  border-radius: 16px;
  border: 1px solid rgb(2 6 24 / 0.12);
  background: #fff;
  padding: 32px;
}

.bo-muted {
  color: var(--text-color, #4b4740);
}

.bo-strong {
  color: var(--primary-color, #17140f);
  font-weight: 600;
}

/* --- Booking wizard progress -------------------------------------------- */

.bo-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.bo-step {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgb(2 6 24 / 0.12);
  overflow: hidden;
}

.bo-step-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--main-color, #a6832f);
  transition: width 0.5s ease;
}

.bo-step.is-done .bo-step-fill {
  width: 100%;
}

/* Selectable option cards (travel mode, vehicle choice). */
.bo-choice {
  display: block;
  width: 100%;
  text-align: left;
  padding: 28px;
  border-radius: 16px;
  border: 1px solid rgb(2 6 24 / 0.12);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bo-choice:hover {
  border-color: var(--main-color, #a6832f);
}

.bo-choice.is-active {
  border-color: var(--main-color, #a6832f);
  box-shadow: 0 0 0 1px var(--main-color, #a6832f);
}

.bo-choice-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 16px;
}

/* --- Reduced motion (WCAG 2.3.3) ------------------------------------------
 * The GSAP/AOS/Swiper motion itself is gated in TemplateScripts.tsx (it
 * reads prefers-reduced-motion before choosing durations); this covers the
 * plain CSS transitions the template applies directly (button hovers, nav,
 * sticky header), which had no reduced-motion handling at all before.
 * -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Definition rows (review step, spec tables) -------------------------- */

.bo-rows {
  border-radius: 16px;
  border: 1px solid rgb(2 6 24 / 0.12);
  overflow: hidden;
}

.bo-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 24px;
  border-bottom: 1px solid rgb(2 6 24 / 0.08);
}

.bo-row:last-child {
  border-bottom: 0;
}

/* Stacked price block:
 *
 *     $246
 *     KES 32,000 / per day
 *
 * The headline USD figure takes a full row of its own, so the shillings and
 * the period text fall together onto a second line. Scoped to .bo-price-stack
 * rather than .sisf-m-price so the template's own pricing table is untouched.
 */
.bo-price-stack .sisf-m-price-wrapper {
  flex: 0 0 100%;
}

/* The KES figure: same size as the " / per day" beside it — supporting
   detail, not a second headline. The template's .sisf-m-price-wrapper is
   48px, which is why this sits outside that wrapper. */
.bo-price-secondary {
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 500;
  color: var(--text-color, #4b4740);
}
