/* ==========================================================================
   Components — shared across every page of the site
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-small);
  transition:
    background var(--duration-fast) var(--ease-standard),
    color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard);
  cursor: pointer;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn-ghost {
  color: var(--color-navy);
  padding: 8px 24px;
}

.btn-ghost:hover {
  background: rgba(0, 33, 85, 0.06);
}

.btn-primary {
  background: var(--color-navy-cta);
  color: var(--color-accent-ink);
  padding: 8px 24px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
  background: var(--color-navy-cta-hover);
}

/* Nav "Sign Up" button uses the brand accent color instead of navy */
.nav-auth-slot .btn-primary {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

.nav-auth-slot .btn-primary:hover {
  background: #f0ad0e;
}
.intro-brand-accent {
  color: #fdbb24;
}

.btn-cta {
  width: 100%;
  background: var(--color-navy-cta);
  color: var(--color-overlay-text);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 24px;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-btn);
}

.btn-cta:hover {
  background: var(--color-navy-cta-hover);
  transform: translateY(-1px);
}

.btn-outline {
  width: 100%;
  border: 1px solid var(--color-navy);
  color: var(--color-navy);
  font-weight: 500;
  font-size: var(--fs-small);
  padding: 9px 0;
  border-radius: var(--radius-md);
}

.btn-outline:hover {
  background: var(--color-navy);
  color: var(--color-bg-page);
}

.btn-dark {
  background: var(--color-overlay-bg);
  color: var(--color-overlay-text);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 24px;
  padding: var(--space-4) var(--space-12);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-btn);
}

.btn-dark:hover {
  background: var(--color-navy-dark-btn);
}

.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  box-shadow: 0 4px 14px rgba(13, 35, 64, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-navy);
  transition:
    background var(--duration-fast),
    color var(--duration-fast),
    box-shadow var(--duration-fast);
}

.btn-icon:hover {
  background: var(--color-navy);
  color: var(--color-bg-page);
  box-shadow: 0 6px 20px rgba(13, 35, 64, 0.24);
}

.btn-icon:disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ------------------------- Header / Nav ------------------------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: var(--space-4) 40px;
}

.site-header.header-solid {
  background: var(--color-header-solid-bg);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-nav);
}

.site-header.header-glass {
  background: var(--color-header-glass-bg);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  backdrop-filter: blur(18px) saturate(145%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 8px 28px rgba(0, 33, 85, 0.1);
}

.site-header.header-glass .nav-link:not(.active),
.site-header.header-glass .nav-dropdown-btn {
  color: var(--color-navy);
}

.site-header.header-solid .nav-link:not(.active),
.site-header.header-solid .nav-dropdown-btn {
  color: var(--color-navy);
}

.header-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.logo-img {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-pill);
  object-fit: cover;
}

.logo-text-group {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.7px;
  color: var(--color-navy);
}

.logo-sub-text {
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.2px;
  color: #f5810c;
  margin-top: 2px;
  padding-left: 18px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-12);
}

.nav-link {
  position: relative;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--color-overlay-text);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  transition: opacity var(--duration-fast);
}

.nav-link:hover {
  opacity: 0.8;
}

.nav-link.active {
  color: var(--color-navy);
  font-weight: 700;
}

/* Underline is drawn with an absolutely-positioned pseudo-element (not a
   border/padding on the link itself) so it doesn't add asymmetric height
   to the link's box - a bottom-only border/padding shifts the flexbox's
   centered content upward, which is what made the bell/avatar icons in
   .header-actions look lower than the nav links next to them. */
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-btn {
  color: var(--color-overlay-text);
}

.nav-chevron {
  transition: transform var(--duration-fast) var(--ease-standard);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 12px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-btn);
  min-width: 200px;
  padding: var(--space-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    opacity var(--duration-fast),
    transform var(--duration-fast),
    visibility 0s linear var(--duration-fast);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity var(--duration-fast),
    transform var(--duration-fast),
    visibility 0s linear 0s;
}

.nav-dropdown:hover .nav-chevron,
.nav-dropdown:focus-within .nav-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu a {
  display: block;
  padding: 8px 12px;
  font-size: var(--fs-small);
  color: var(--color-text-body);
  border-radius: var(--radius-sm);
}

.nav-dropdown-menu a:hover {
  background: var(--color-bg-section);
  color: var(--color-navy);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: currentColor;
  color: var(--color-overlay-text);
  background: var(--color-white);
  border-radius: 2px;
  transition: background var(--duration-fast);
}

.site-header.header-solid .menu-toggle span,
.site-header.header-glass .menu-toggle span {
  background: var(--color-navy);
}

/* Auth modal overlay */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  padding: 20px;
}

.auth-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.auth-modal-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  max-width: 440px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 32px;
  transform: scale(0.96) translateY(8px);
  transition: transform 0.2s ease;
}

.auth-modal-overlay.open .auth-modal-card {
  transform: scale(1) translateY(0);
}

.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--color-bg-section);
  font-size: 20px;
  line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-modal-close:hover {
  background: var(--color-border);
}

/* Inside the modal the card no longer needs its own box/shadow/margins -
   the modal wrapper already provides those */
.auth-modal-card .auth-card {
  padding: 0;
  box-shadow: none;
  border: none;
}

body.auth-modal-lock {
  overflow: hidden;
}

@media (max-width: 480px) {
  .auth-modal-card {
    padding: 24px 20px;
  }
}

/* Auth-state nav slot (populated by js/auth.js later) */
.nav-auth-slot {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

@media (max-width: 1024px) {
  .main-nav,
  .header-actions {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .site-header {
    padding: var(--space-4) 20px;
  }

  .site-header.nav-open {
    background: var(--color-header-solid-bg);
    padding-bottom: var(--space-4);
    max-height: 100vh;
    overflow-y: auto;
  }

  .site-header.header-solid.nav-open {
    background: var(--color-header-solid-bg);
  }

  .site-header.nav-open .header-inner {
    flex-wrap: wrap;
  }

  .site-header.nav-open .main-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
    width: 100%;
    order: 3;
    margin-top: var(--space-4);
  }

  .site-header.nav-open .main-nav .nav-link,
  .site-header.nav-open .main-nav .nav-dropdown-btn {
    color: var(--color-navy) !important;
  }

  .site-header.nav-open .header-actions {
    display: flex;
    order: 4;
    margin-top: var(--space-4);
  }

  /* The open mobile menu always has a solid, theme-aware background
     (--color-header-solid-bg), so its text needs to be theme-aware too -
     --color-overlay-text is fixed white and was invisible against the
     near-white background in light mode. */
  .site-header.nav-open .btn-ghost {
    color: var(--color-navy);
  }

  .site-header.nav-open .btn-ghost:hover {
    background: rgba(0, 33, 85, 0.06);
  }

  .site-header.nav-open .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    margin-top: var(--space-2);
    display: none;
  }

  .site-header.nav-open .nav-dropdown.open .nav-dropdown-menu {
    display: block;
  }
}

/* ------------------------- Footer ------------------------- */

.site-footer {
  background: var(--color-bg-footer);
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-12) var(--space-6);
}

.footer-grid {
  display: flex;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer-col {
  flex: 1 0 0;
  min-width: 0;
}

.footer-brand h3 {
  font-size: var(--fs-h3);
  margin-bottom: var(--space-4);
}

.footer-brand p {
  font-family: var(--font-heading);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text-body);
  margin-bottom: var(--space-4);
}

.social-links {
  display: flex;
  gap: var(--space-4);
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: rgba(0, 33, 85, 0.05);
  color: var(--color-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--duration-fast);
}

.social-icon:hover {
  background: rgba(0, 33, 85, 0.12);
}

.footer-col h6 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-small);
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--color-navy);
  margin-bottom: var(--space-4);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-col ul a {
  font-weight: 400;
  font-size: var(--fs-small);
  letter-spacing: 0.3px;
  color: var(--color-text-body);
  display: inline-block;
  padding: 5px 0;
  transition: color var(--duration-fast);
}

.footer-col ul a:hover {
  color: var(--color-navy);
}

.footer-sub-text {
  font-weight: 400;
  font-size: var(--fs-small);
  line-height: var(--lh-body);
  letter-spacing: 0.2px;
  color: var(--color-text-body);
  margin-bottom: var(--space-4);
}

.newsletter-form {
  display: flex;
  width: 100%;
  height: 54px;
}

.newsletter-form input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;

  background: var(--color-bg-page);
  border: 1px solid var(--color-border);
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);

  padding: 10px 17px;
  color: var(--color-text-body);
  font-family: var(--font-heading);
  font-size: var(--fs-body);
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--color-navy-cta);

  /* Keeps the focus effect inside the input instead of overlapping the button */
  box-shadow: inset 0 0 0 2px var(--color-navy-cta);
}

.newsletter-form input::placeholder {
  color: var(--color-text-placeholder);
}

.newsletter-form button {
  flex: 0 0 64px;
  width: 64px;
  height: 100%;
  box-sizing: border-box;

  background: var(--color-overlay-bg);
  border: none;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;

  padding: 0;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  transition: background var(--duration-fast);
}

.newsletter-form button svg {
  display: block;
  width: 19px;
  height: 16px;
}

.newsletter-form button:hover {
  background: #001838;
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 25px;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.6px;
  color: var(--color-text-body);
}

@media (max-width: 1024px) {
  .footer-grid {
    flex-wrap: wrap;
  }

  .footer-col {
    flex: 1 1 45%;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 12px;
    row-gap: var(--space-8);
  }

  .footer-brand,
  .footer-col:last-child {
    grid-column: 1 / -1;
  }
}

/* ------------------------- Cards & tags ------------------------- */

.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.tag {
  background: var(--color-tag-bg);
  color: var(--color-text-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.6px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.badge-accent {
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.6px;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  display: inline-block;
}

/* ------------------------- Route card (shared: landing + Popular Routes) ------------------------- */

.route-grid {
  display: flex;
  gap: var(--space-6);
}

.route-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-route-card);
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  width: 100%;
  scroll-snap-align: start;
}

.route-image {
  position: relative;
  height: 192px;
  width: 100%;
}

.route-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.route-badge {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
}

.route-body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: 7.5px;
}

.route-body h4 {
  font-size: var(--fs-h3);
  font-weight: 600;
}

.route-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.route-duration {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--color-text-muted);
}

.route-price {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

.route-price strong {
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--color-navy);
}

.route-tags {
  display: flex;
  gap: var(--space-2);
  padding: 8.5px 0;
}

/* ------------------------- Form fields ------------------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.field label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.6px;
  color: var(--color-text-body);
}

.field-input {
  width: 100%;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--color-text-body);
  font-family: var(--font-heading);
  font-size: var(--fs-body);
  transition:
    border-color var(--duration-fast),
    box-shadow var(--duration-fast);
}

.field-input::placeholder {
  color: var(--color-text-placeholder);
}

.field-input:focus {
  outline: none;
  border-color: var(--color-navy-cta);
  box-shadow: 0 0 0 3px rgba(0, 53, 128, 0.12);
}

/* ------------------------- Skeleton shimmer ------------------------- */

.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--color-skeleton-base);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    var(--color-skeleton-base) 25%,
    var(--color-skeleton-shine) 50%,
    var(--color-skeleton-base) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shine 1.6s ease-in-out infinite;
}

@keyframes skeleton-shine {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton::after {
    animation: none;
  }
}

/* ------------------------- Date picker ------------------------- */

.dp-trigger {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.dp-display {
  flex: 1 0 0;
  min-width: 0;
  color: var(--color-text-body);
  font-family: var(--font-heading);
  font-size: var(--fs-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dp-display.dp-placeholder {
  color: var(--color-text-placeholder);
}

.dp-popup {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 500;
  width: 220px;
  max-width: calc(100vw - 32px);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-dropdown);
  padding: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.97) translateY(-6px);
  transform-origin: top left;
  transition:
    opacity var(--duration-fast),
    transform var(--duration-fast),
    visibility 0s linear var(--duration-fast);
}

.dp-popup.dp-open {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
  transition:
    opacity var(--duration-fast),
    transform var(--duration-fast),
    visibility 0s linear 0s;
}

.dp-popup.dp-flip-up {
  top: auto;
  bottom: calc(100% + 8px);
  transform-origin: bottom left;
}

.dp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 9px;
  border-bottom: 1px solid var(--color-border);
}

.dp-month-label {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-family: var(--font-body);
}

.dp-month-row {
  display: flex;
  gap: var(--space-1);
  align-items: center;
}

.dp-month-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-navy-strong);
  /* Devanagari month names (Nepali/BS mode) need a script-aware fallback -
     the rest of the site's heading font doesn't cover those glyphs. */
  font-family: "Noto Sans Devanagari", var(--font-body);
}

.dp-year {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
}

.dp-month-caret {
  color: var(--color-text-muted);
  margin-left: 2px;
  width: 7px;
  height: 5px;
}

/* AD subtitle shown under the BS month/year heading, e.g. "Aug / Sep 2026" -
   empty and collapsed (no reserved height) while in AD mode. */
.dp-sub-year {
  font-size: 9px;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.2px;
}
.dp-sub-year:empty {
  display: none;
}

/* ---- BS / AD calendar-mode toggle ---- */

.dp-mode-switch {
  display: flex;
  gap: 2px;
  padding: 6px 8px 0;
}

.dp-mode-btn {
  flex: 1 0 0;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--color-text-muted);
  background: var(--color-bg-section);
  border-radius: var(--radius-sm);
  padding: 4px 0;
  transition:
    background var(--duration-fast),
    color var(--duration-fast);
}

.dp-mode-btn:hover {
  color: var(--color-text-body);
}

.dp-mode-btn.active {
  background: var(--color-navy);
  color: var(--color-bg-page);
}

/* Up/down stepper (stacked) instead of left/right arrows, so the popup
   reads like the native browser date-input calendar it's styled after. */
.dp-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.dp-nav-btn {
  width: 16px;
  height: 11px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-body);
  transition:
    background var(--duration-fast),
    color var(--duration-fast);
}

.dp-nav-btn svg {
  width: 8px;
  height: 5px;
}

.dp-nav-btn:hover:not(:disabled) {
  background: var(--color-navy);
  color: var(--color-bg-page);
}

.dp-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.dp-body {
  padding: 8px;
}

.dp-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}

.dp-weekday {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 0;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.dp-weekday.dp-sunday {
  color: var(--color-navy);
}

/* Nepali (BS) calendar: Saturday is the weekend, styled the way the
   reference calendar shows it - red header + red day numbers, in place
   of the Sunday-is-navy treatment used in the Gregorian (AD) view. */
.dp-weekday.dp-saturday {
  color: var(--color-saturday);
}

.dp-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.dp-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 10px;
  color: var(--color-text-body);
  transition:
    background var(--duration-fast),
    color var(--duration-fast);
  position: relative;
}

.dp-day:hover:not(:disabled):not(.dp-selected) {
  background: var(--color-bg-section);
}

.dp-day.dp-muted {
  color: var(--color-text-disabled);
}

.dp-day.dp-sunday:not(.dp-selected) {
  color: var(--color-navy);
}

.dp-day.dp-selected {
  background: var(--color-navy);
  color: var(--color-bg-page);
}

.dp-day.dp-today:not(.dp-selected)::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-navy);
}

.dp-day.dp-today.dp-selected::after {
  background: var(--color-white);
}

.dp-day:disabled {
  color: var(--color-text-disabled);
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  text-decoration: line-through;
  text-decoration-color: var(--color-text-disabled);
  text-decoration-thickness: 1px;
}

.dp-day.dp-empty {
  visibility: hidden;
  pointer-events: none;
}

.dp-day.dp-saturday:not(.dp-selected) {
  color: var(--color-saturday);
}

.dp-day.dp-saturday.dp-selected {
  background: var(--color-saturday);
}

/* BS calendar day cell: big Nepali day number with the matching AD day
   shown underneath, small and muted (mirrors the reference screenshot). */
.dp-day.dp-bs-day {
  flex-direction: column;
  gap: 0;
  line-height: 1;
}

.dp-day.dp-bs-day .dp-sub {
  font-family: var(--font-body);
  font-size: 7px;
  font-weight: 500;
  opacity: 0.6;
  margin-top: 1px;
}

.dp-day.dp-bs-day.dp-selected .dp-sub,
.dp-day.dp-bs-day.dp-saturday .dp-sub {
  opacity: 0.8;
}

/* The today-dot would collide with the AD sub-date under it in BS mode -
   pin it to the corner instead of bottom-center there. */
.dp-day.dp-bs-day.dp-today:not(.dp-selected)::after {
  bottom: auto;
  left: auto;
  top: 2px;
  right: 2px;
  transform: none;
}

/* A little more breathing room for the Devanagari month name + the extra
   AD-subtitle/mode-toggle rows in BS mode. */
.dp-popup.dp-bs-mode {
  width: 236px;
}

.dp-footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--color-border);
  padding: 6px 8px 8px;
}

.dp-today-btn,
.dp-clear-btn {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-navy);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast);
}

.dp-today-btn:hover,
.dp-clear-btn:hover {
  background: var(--color-bg-section);
}

/* .dp-popup's own max-width (calc(100vw - 32px), set above) already keeps
   it clear of the viewport edges on narrow screens - no extra breakpoint
   needed. */

/* ------------------------- Carousel ------------------------- */

.carousel-wrapper {
  position: relative;
  padding: 0 28px;
  margin: 0 -28px;
}

.carousel-track {
  display: flex;
  gap: var(--space-6);
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-2);
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-track.dragging {
  scroll-snap-type: none;
  cursor: grabbing;
  scroll-behavior: auto;
}

.carousel-arrow {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  z-index: 10;
}

.carousel-arrow.arrow-left {
  left: 0;
}

.carousel-arrow.arrow-right {
  right: 0;
}

.carousel-arrow.arrow-hidden {
  opacity: 0;
  pointer-events: none;
}

/* ------------------------- FAQ accordion ------------------------- */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-white);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-6);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-body);
  color: var(--color-navy);
  text-align: left;
}

.faq-icon {
  flex-shrink: 0;
  transition: transform var(--duration-base) var(--ease-standard);
  color: var(--color-text-muted);
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
  color: var(--color-navy);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-slow) var(--ease-standard);
}

.faq-answer-inner {
  padding: 0 var(--space-6) var(--space-6);
  color: var(--color-text-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

/* ------------------------- Toast notifications ------------------------- */

#toast-container {
  position: fixed;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  top: 20px;
  right: 20px;
  width: 360px;
  max-width: calc(100vw - 24px);
}

@media (max-width: 480px) {
  #toast-container {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-btn);
  padding: 13px 14px 13px 16px;
  border-left: 4px solid transparent;
  pointer-events: auto;
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--color-text-body);
  animation: toast-in 0.28s cubic-bezier(0.22, 0.68, 0, 1.2) both;
}

.toast.toast-leaving {
  animation: toast-out 0.22s ease forwards;
}

.toast-success {
  border-left-color: #22c55e;
}

.toast-error {
  border-left-color: #ef4444;
}

.toast-info {
  border-left-color: var(--color-navy);
}

.toast-loading {
  border-left-color: #94a3b8;
}

.toast-icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.toast-msg {
  flex: 1;
}

.toast-close {
  flex-shrink: 0;
  color: #94a3b8;
  line-height: 0;
  transition: color var(--duration-fast);
  align-self: flex-start;
}

.toast-close:hover {
  color: var(--color-text-body);
}

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

.toast-spinner {
  animation: toast-spin 0.75s linear infinite;
  display: block;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
    max-height: 120px;
    margin-bottom: 0;
  }
  to {
    opacity: 0;
    transform: translateX(24px) scale(0.96);
    max-height: 0;
    margin-bottom: -10px;
  }
}

/* ------------------------- Utility ------------------------- */

.hidden {
  display: none !important;
}

@media (max-width: 1200px) {
  .site-header {
    padding: var(--space-4) 24px;
  }
}

/* --- Nav notification badge (added for backend notification system) --- */
.nav-notif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  margin-left: 2px;
}

.theme-toggle-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-navy);
  cursor: pointer;
  margin-right: 10px;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}
.theme-toggle-btn:hover {
  background: var(--color-bg-section);
}

/* --- Notification bell (standalone, in header-actions) --- */
.nav-bell-btn {
  position: relative;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--color-navy);
  cursor: pointer;
  margin-right: 6px;
}
.nav-bell-btn:hover {
  background: var(--color-bg-section);
}
.nav-bell-btn .nav-notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  margin-left: 0;
}

/* --- Account avatar + tiny caret dropdown (Sign Out only) --- */
.nav-account {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-navy), var(--color-navy-cta));
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nav-account-caret .nav-caret-btn {
  width: 22px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--color-navy);
  cursor: pointer;
}
.nav-dropdown-menu-right {
  right: 0;
  left: auto;
}

/* --- Recent routes (index.html) --- */
.recent-routes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.recent-route-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.recent-route-label {
  font-weight: 600;
  color: var(--color-navy);
}
.my-booking-home-qr {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-bg-section);
}

/* --- City autocomplete (search fields: homepage hero + results edit-search) --- */
.city-autocomplete-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-height: 240px;
  overflow-y: auto;
}
.city-autocomplete-item {
  padding: 10px 16px;
  font-size: var(--fs-body);
  color: var(--color-text-body);
  cursor: pointer;
}
.city-autocomplete-item mark {
  background: none;
  color: var(--color-navy);
  font-weight: 700;
}
.city-autocomplete-item:hover,
.city-autocomplete-item.active {
  background: var(--color-bg-section);
}

/* --- Favorite operator heart --- */
.operator-card {
  position: relative;
}
.favorite-heart-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 16px;
  cursor: pointer;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.favorite-heart-btn.active {
  color: #dc2626;
  border-color: #fca5a5;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: var(--space-6);
}

:root[data-theme="dark"] .modal-overlay {
  background: rgba(0, 0, 0, 0.78);
}

.modal-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  max-width: 420px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-sizing: border-box;
  text-align: center;
}

@media (max-width: 480px) {
  .modal-card {
    padding: var(--space-5);
    max-height: 85vh;
  }
}

:root[data-theme="dark"] .modal-card {
  background: var(--color-bg-footer);
  border: 1px solid var(--color-border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-card .icon-warn {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-pill);
  background: rgba(220, 38, 38, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
}

.modal-card h3 {
  font-size: 20px;
  margin-bottom: var(--space-2);
}

.modal-card p {
  font-family: var(--font-heading);
  color: var(--color-text-body);
  margin-bottom: var(--space-6);
}

.modal-actions {
  display: flex;
  gap: var(--space-3);
}

.modal-actions .btn {
  flex: 1;
  justify-content: center;
}

/* ---- Shared photo lightbox (js/photo-lightbox.js) ---- */
.photo-lightbox-source img,
img.photo-lightbox-source {
  cursor: zoom-in;
  transition: filter 0.15s ease;
}
.photo-lightbox-source img:hover,
img.photo-lightbox-source:hover {
  filter: brightness(0.9);
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.photo-lightbox[hidden] {
  display: none;
}
.photo-lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}
.photo-lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: #fff;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
}
.photo-lightbox-nav {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0 12px;
}
.photo-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.3);
}
.photo-lightbox-nav[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .nav-account-caret {
    display: none;
  }
}
