/* Twende Web — small custom layer on top of Tailwind CDN. */

html { height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  display: flex;
  justify-content: center;
  background: #0b1b33; /* dark backdrop beside the phone frame on wide screens */
}

/* ── Mobile-frame: center a phone-width, scrollable column ──
   The frame just constrains content width; the document scrolls normally so
   position:fixed overlays (cart bar, sheets, toasts) stay pinned to the
   viewport — correct on mobile where the frame fills the screen. */
#frame {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  background: #F5F7FA;
  overflow-x: hidden;
}
@media (min-width: 481px) {
  #frame { box-shadow: 0 0 50px rgba(0, 0, 0, 0.35); }
  /* On wide screens, keep the full-bleed overlays inside the phone column
     instead of spanning the whole window. (Centered-card and bottom-bar
     overlays already self-center, so they need no override.) */
  #account-sheet, #chat-panel, #sos-modal, #loading-overlay {
    left: 50%; right: auto; width: 100%; max-width: 480px;
    transform: translateX(-50%);
  }
}

/* Hide number-input spinners on the OTP / phone fields. */
input[type="tel"]::-webkit-outer-spin-button,
input[type="tel"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="tel"] { -moz-appearance: textfield; }

/* Google Maps containers must have an explicit height to render. */
#request-map, #tracking-map { width: 100%; min-height: 240px; }

/* Slim suggestion-list scrollbar. */
#pickup-suggestions::-webkit-scrollbar,
#dropoff-suggestions::-webkit-scrollbar { width: 6px; }
#pickup-suggestions::-webkit-scrollbar-thumb,
#dropoff-suggestions::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* Respect iOS safe areas (notch / home indicator). */
@supports (padding: env(safe-area-inset-bottom)) {
  body { padding-bottom: env(safe-area-inset-bottom); }
}

/* Spinner emoji rotation used by the loading overlay. */
@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { display: inline-block; animation: spin 1.2s linear infinite; }

/* Print: show only the LATRA receipt card, nothing else. */
@media print {
  body { background: #fff; display: block; }
  #frame { max-width: none; min-height: auto; box-shadow: none; }
  body * { visibility: hidden; }
  #receipt, #receipt * { visibility: visible; }
  #receipt {
    position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; margin: 0;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;  /* keep the navy header + coloured chips */
  }
}
