/* Shared shell for the Indian Motorcycle app prototype (Figma: 705 Design / APP UI).
   Every screen is one HTML page: <div class="phone"> holds a scrolling .screen,
   the fixed .appbar (status bar + top bar) and, where the design has one, the .bottom-nav. */

:root {
  /* Figma styles */
  --red: #8e0124;          /* Indian Red/Regular */
  --red-deep: #8a0000;     /* active dots, "View all" */
  --grey: #585858;         /* Grey */
  --light-grey: #b8b8b8;   /* Light Grey */
  --white75: #f5f5f5;      /* White75 */
  --dark: #101010;         /* Dark */
  --ink: #111827;
  --muted: #6b7280;
  --border-soft: #f3f4f6;

  --phone-w: 402px;
  --phone-h: 874px;
  --appbar-h: 115.35px;    /* status bar 45.35 - 10 overlap + top bar 80 */

  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-sf: "SF Pro Text", -apple-system, "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  color: #000;
  background: #e8e4e0;
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
}
img { display: block; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: inherit; }

/* ---------- device ---------- */
.stage { position: relative; transform-origin: center center; }
.phone {
  position: relative;
  width: var(--phone-w);
  height: var(--phone-h);
  background: #fff;
  border-radius: 54px;
  overflow: hidden;
  box-shadow: 0 0 0 11px #141414, 0 0 0 12px #3a3a3a, 0 40px 80px -20px rgba(0, 0, 0, 0.45);
  isolation: isolate;
}
.screen {
  position: absolute;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  overscroll-behavior: contain;
  animation: screen-in 220ms ease-out;
}
.screen::-webkit-scrollbar { display: none; }
@keyframes screen-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* phones and narrow windows: the page *is* the phone */
@media (max-width: 520px) {
  body { display: block; background: #fff; overflow: auto; }
  .stage { transform: none !important; }
  .phone { width: 100vw; height: 100dvh; border-radius: 0; box-shadow: none; }
  .proto-panel { display: none; }
}

/* ---------- status bar (Figma instance "status") ---------- */
.statusbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 45.354px;
  padding: 0 12.369px;
}
.statusbar__left, .statusbar__right { flex: 1 0 0; height: 45.354px; position: relative; min-width: 1px; }
.statusbar__notch { width: 169.046px; height: 45.354px; flex-shrink: 0; }
.statusbar__time {
  position: absolute;
  left: calc(50% + 0.52px);
  top: 16.49px;
  transform: translateX(-50%);
  font-family: var(--font-sf);
  font-weight: 600;
  font-size: 17.52px;
  letter-spacing: -0.7008px;
  line-height: normal;
  white-space: nowrap;
}
.statusbar__icons {
  position: absolute;
  left: calc(50% + 0.52px);
  top: calc(50% + 3.09px);
  transform: translate(-50%, -50%);
  width: 78.338px;
  height: 14.431px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4.123px;
}
.sim { width: 20.615px; height: 14.431px; display: flex; align-items: flex-end; justify-content: center; gap: 2.16px; padding-bottom: 1.03px; }
.sim i { display: block; width: 3.298px; background: currentColor; border-radius: 1px; }
.sim i:nth-child(1) { height: 4.742px; }
.sim i:nth-child(2) { height: 7.215px; }
.sim i:nth-child(3) { height: 9.895px; }
.sim i:nth-child(4) { height: 12.369px; }
.wifi { width: 20.615px; height: 12.369px; display: flex; align-items: center; justify-content: center; }
.statusbar__privacy { position: absolute; left: 6.18px; top: 6.18px; }
.statusbar--light { color: #fff; }

/* ---------- app bar: status bar + top bar, fixed over the scrolling screen ---------- */
.appbar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.appbar > .statusbar { margin-bottom: -10px; }
.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  padding: 16px 20.01px 16px 20px;
  background: #fff;
}
.topbar__title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 177px;
  text-align: center;
  font-weight: 600;
  font-size: 16px;
  line-height: 28px;
  color: var(--dark);
  white-space: nowrap;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 12px;
  transition: background-color 150ms;
}
.icon-btn:hover { background: rgba(0, 0, 0, 0.05); }
.icon-btn:active { background: rgba(0, 0, 0, 0.09); }

/* ---------- bottom navigation (Figma "Bottom Navigation Bar (Mobile Only)") ---------- */
.bottom-nav {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 73px;
  z-index: 20;
  background: rgba(251, 249, 248, 0.95);
  border-top: 1px solid #e0bfbc;
  border-radius: 12px 12px 0 0;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}
.bottom-nav__row {
  position: absolute;
  left: 0;
  top: 13px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 24px 0 32px;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 47px;
  opacity: 0.6;
  transition: opacity 150ms;
}
.nav-item:hover { opacity: 0.85; }
.nav-item__icon { padding-bottom: 4px; }
.nav-item__label {
  font-weight: 500;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: -0.1px;
  color: var(--grey);
  white-space: nowrap;
}
.nav-item[data-nav="passport"], .nav-item[data-nav="profile"] { --label: #5f5e5e; }
.nav-item[data-nav="passport"] .nav-item__label, .nav-item[data-nav="profile"] .nav-item__label { color: #5f5e5e; }
.nav-item.is-active { opacity: 1; width: 45px; height: 44px; }
.nav-item.is-active .nav-item__label { color: var(--red); }
.nav-item.is-active .nav-item__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(1.1);
}
.nav-item.is-active .nav-item__icon { transform: scale(0.91); padding-bottom: 0; margin-bottom: 4px; }
.nav-item:not(.is-active) .nav-item__inner { display: contents; }

/* ---------- toast ---------- */
/* screens with a bottom button set --toast-bottom on .phone to keep the toast clear of it */
.phone:has(> .bottom-nav) { --toast-bottom: 96px; }
.toast {
  position: absolute;
  left: 50%;
  bottom: var(--toast-bottom, 40px);
  z-index: 50;
  max-width: calc(100% - 40px);
  transform: translate(-50%, 12px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(16, 16, 16, 0.92);
  color: #fff;
  font-size: 14px;
  line-height: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms, transform 200ms;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast__action { color: #ffb3c1; font-weight: 600; white-space: nowrap; }

/* ---------- desktop prototype panel (injected by app.js) ---------- */
.proto-panel {
  position: fixed;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  width: 220px;
  font-size: 13px;
  line-height: 18px;
  color: #3d3a37;
}
.proto-panel__brand { font-weight: 700; font-size: 15px; color: var(--red); }
.proto-panel__sub { margin: 2px 0 18px; color: #7a7570; }
.proto-panel ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.proto-panel a { display: flex; gap: 10px; padding: 7px 10px; border-radius: 8px; }
.proto-panel a:hover { background: rgba(0, 0, 0, 0.05); }
.proto-panel a[aria-current="page"] { background: #fff; color: var(--red); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
.proto-panel__num { color: #a49d96; font-variant-numeric: tabular-nums; }
.proto-panel__hint { margin-top: 18px; color: #8f8983; font-size: 12px; }
.proto-panel { max-height: calc(100vh - 48px); overflow-y: auto; scrollbar-width: none; }
.proto-panel a { padding: 4px 10px; align-items: center; }
.proto-panel__group { margin: 12px 0 4px 10px; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #a49d96; }
.proto-panel__group:first-child { margin-top: 0; }
.proto-panel__fig { margin-left: auto; padding: 0 6px; border-radius: 4px; background: rgba(142, 1, 36, 0.08); font-size: 10px; font-weight: 600; color: var(--red); }
@media (max-width: 900px) { .proto-panel { display: none; } }

/* ---------- utilities ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tap { cursor: pointer; }
.tap:focus-visible, .icon-btn:focus-visible, .nav-item:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
