/* Shared app layer: the primitives every screen reuses, the bottom tabs, the
 * toast, and the three keyframes the design animates with. Screen-specific
 * geometry lives in styles/screens/<screen>.css.
 *
 * Colors, fonts, radii and shadows always come from the Organic tokens. The px
 * values are the design's own type and spacing sizes.
 */

/* — keyframes, straight from the design — */
@keyframes wv { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes halo { 0%, 100% { transform: scale(1); opacity: .5; } 50% { transform: scale(1.14); opacity: .16; } }

/* — a clickable element that is a real button —
   Wrapped in :where() so it carries no specificity: it still beats the browser's
   own button styling (author origin wins), but a .btn or a screen's own class
   layered on top keeps its fill, padding and type. */
:where(.ro-press) {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: inherit;
  cursor: pointer;
}

/* — the screen surface every route fills — */
.ro-screen {
  min-height: calc(100% - 92px);
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--color-text);
  animation: rise .34s cubic-bezier(.2, .75, .3, 1);
}

.ro-display { font-family: var(--font-heading); font-weight: var(--font-heading-weight); }

.ro-kicker {
  font: 400 10px var(--font-body);
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--color-accent-800);
}

/* The quiet line at the foot of a screen — the privacy promise, mostly. */
.ro-note {
  font-size: 11px;
  line-height: 1.6;
  color: var(--color-neutral-700);
  text-align: center;
}

/* — avatars — */
.ro-avatar {
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  flex: none;
}

/* — voice-note waveform — */
.ro-wave {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.ro-wave b {
  border-radius: 999px;
  flex: none;
  display: block;
}
.ro-wave--live b { animation: wv 1.1s ease-in-out infinite; }

/* — progress — */
.ro-track {
  border-radius: 999px;
  overflow: hidden;
}
.ro-track i {
  display: block;
  height: 100%;
  border-radius: 999px;
}

/* — 44px round back button — */
.ro-back {
  width: 44px;
  height: 44px;
  padding: 0;
  flex: none;
}

/* — a settings toggle — */
.ro-toggle {
  width: 50px;
  height: 30px;
  border-radius: 999px;
  flex: none;
  padding: 3px;
  display: flex;
}
.ro-toggle i {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--color-bg);
}

/* — the lock chip: one line, no compliance banner — */
.ro-lockchip {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 7px;
  background: var(--color-neutral-200);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 11.5px;
  color: var(--color-neutral-800);
}

/* — bottom tabs: labels always visible, 54px targets, active tab a filled
     pill *and* aria-current so it never reads by color alone — */
.ro-tabbar {
  position: sticky;
  bottom: 0;
  z-index: 70;
  flex: none;
  background: var(--color-bg);
  box-shadow: 0 -1px 0 var(--color-divider);
  padding: 8px 10px 30px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.ro-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 54px;
  border-radius: 22px;
  font: 600 11px var(--font-body);
  color: var(--color-neutral-700);
}
.ro-tab[aria-current='page'] {
  background: var(--color-accent-200);
  color: var(--color-accent-900);
}
.ro-tab:not([aria-current='page']):hover { background: var(--color-neutral-200); }
.ro-tab:not([aria-current='page']):active { background: var(--color-neutral-300); }

/* — toast — */
.ro-toast {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 106px;
  background: var(--color-neutral-900);
  color: var(--color-neutral-100);
  border-radius: 999px;
  padding: 14px 20px;
  font-size: 13px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  z-index: 80;
  animation: rise .22s cubic-bezier(.2, .75, .3, 1);
}

@media (prefers-reduced-motion: reduce) {
  .ro-screen, .ro-toast { animation: none; }
  .ro-wave--live b { animation: none; }
}
