/* WaveLock mobile: additions to the web UI's app.css. */

.camera canvas.feed { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* start-up screen while Python and the models load */
.boot {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-content: center; justify-items: center;
  gap: 12px; padding: 24px; text-align: center; background: var(--bg); color: var(--text);
}
.boot[hidden] { display: none; }
.boot-mark { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 0 40px rgba(60, 150, 255, .25); }
.boot strong { font-size: 1.4rem; }
.boot small { max-width: 34ch; color: var(--text-muted); line-height: 1.45; }

/* settings switches */
.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  color: var(--text); font: inherit; text-align: left; cursor: pointer; min-height: 48px;
}
.switch-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* touch: comfortable targets and room for the phone's home indicator */
@media (pointer: coarse) {
  .btn, .icon-btn, .nav a { min-height: 44px; }
  .view { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  /* no keyboard on a phone: hide the key hints (the buttons do the same) */
  .hint-line, .kbd { display: none; }
}

/* ------------------------------------------------------------------ phone layout */
.mobile-brand { display: none; }
.cam-actions { display: none; }

@media (max-width: 900px) {
  /* bottom tab bar with labels (thumb reach), instead of the top icon row */
  .app { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  /* scrolling and focus stop clear of the fixed top and bottom bars */
  html { scroll-padding-top: 96px; scroll-padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .sidebar {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 40; height: auto;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    border-bottom: 0; border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 96%, transparent);
  }
  .sidebar .brand { display: none; }
  .nav { flex: 1; justify-content: space-between; overflow: visible; gap: 2px; }
  .nav a {
    flex: 1 1 0; min-width: 0; min-height: 54px; flex-direction: column; justify-content: center;
    gap: 3px; padding: 6px 2px; font-size: 10.5px; font-weight: 600; text-align: center;
  }
  .nav a span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav a svg { width: 22px; height: 22px; }

  /* top app bar: brand + page title, stays visible */
  .topbar {
    position: sticky; top: 0; z-index: 30;
    padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    border-bottom: 1px solid var(--border); backdrop-filter: blur(10px);
  }
  .mobile-brand {
    display: flex; align-items: center; gap: 7px; margin-bottom: 2px;
    color: var(--text-muted); font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: .02em;
  }
  .mobile-brand:hover { text-decoration: none; }
  .mobile-brand img { width: 26px; height: 26px; }
  .topbar h1 { font-size: 21px; }
  .view { padding-top: 12px; }
  .toasts { left: 16px; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); max-width: none; }

  /* the page's main action right under the camera (the original is hidden
     while mirrored, so it is not shown twice) */
  .cam-actions:not([hidden]) { display: flex; gap: 10px; }
  .wl-mirrored { display: none !important; }
  .hint-line, .kbd { display: none; }
  .cam-actions .btn { flex: 1 1 0; justify-content: center; min-height: 52px; }
}

/* the logo image is square with its own dark background */
.brand-mark { border-radius: 10px; }
.mobile-brand img { border-radius: 6px; }
