/* Nexvoryn v3.2 customer web (WEB-CUSTOMER, SPEC-V32 §2.3): first-run sheets (AQ.onboard), header bell states,
   chat-header call buttons. Direction B tokens only (aq.css custom properties: light by default, dark via
   prefers-color-scheme or data-theme="dark" — every colour below is a token, so dark mode follows automatically).
   Logical properties keep the layout right in RTL. */

/* ------------------------------------------------------------------ sheet frame */
.modal-box.ob-box { overflow-x: hidden; }
.sheet.ob { padding: 10px 20px 20px; padding-bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px)); text-align: center; }
.sheet.ob > *:not(.sheet-grip), .ob-pane { max-width: 420px; margin-inline: auto; }
.ob-hero { display: flex; justify-content: center; margin: 4px auto 14px; }
.ob-title { margin: 0 auto 6px; font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -0.018em; color: var(--text-primary); overflow-wrap: anywhere; }
.ob-title-sm { font-size: 20px; line-height: 26px; margin: 0; }
.ob-text { margin: 0 auto 18px; font-size: 15px; line-height: 21px; color: var(--text-secondary); overflow-wrap: anywhere; }
.ob-title bdi, .ob-text bdi, .ob-step-t bdi { unicode-bidi: isolate; }
.ob-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.ob-actions .btn { white-space: normal; text-align: center; }
.ob-actions .btn-lg { min-height: 52px; }
.ob-actions .btn-text { min-height: 44px; }
.ob-btn svg { flex: none; }

/* round icon tile (globe, bell-off) */
.ob-ico { width: 64px; height: 64px; border-radius: 22px; display: inline-flex; align-items: center; justify-content: center; background: var(--bubble-own); color: var(--on-accent); box-shadow: var(--shadow-fab); }
.ob-ico.is-danger { background: var(--danger-tint); color: var(--danger-text); box-shadow: none; }

/* app icon tile (install sheets) */
.ob-apptile { width: 72px; height: 72px; border-radius: 20px; overflow: hidden; display: inline-flex; box-shadow: var(--shadow-e2); background: var(--surface); }
.ob-apptile img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* numbered steps (reuses chat.css .ios-steps / .ios-step / .ios-n / .ios-ic) */
.ob-steps { text-align: start; margin: 4px 0 18px; }
.ob-steps .ios-step { gap: 12px; }
.ob-step-t { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.ob-step-app { width: 22px; height: 22px; border-radius: 6px; display: block; }
.ob-inline-ic { display: inline-flex; vertical-align: -3px; margin-inline-start: 2px; color: var(--accent-text); }

/* ------------------------------------------------------------------ name popup (sheet A / sheet B) */
.ob-avwrap { position: relative; display: inline-flex; }
.ob-av { width: 84px; height: 84px; font-size: 29px; box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--accent-soft); }
.ob-online { position: absolute; inset-inline-end: 3px; bottom: 5px; width: 18px; height: 18px; border-radius: 50%; background: var(--online); box-shadow: 0 0 0 3px var(--surface); }
.ob-pane { animation-duration: var(--d-slow, 320ms); animation-timing-function: var(--e-emphasized, cubic-bezier(.3,0,0,1)); animation-fill-mode: both; }
.ob-in-right { animation-name: ob-in-right; }
.ob-in-left { animation-name: ob-in-left; }
@keyframes ob-in-right { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes ob-in-left { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
[dir="rtl"] .ob-in-right { animation-name: ob-in-left; }
[dir="rtl"] .ob-in-left { animation-name: ob-in-right; }

.ob-b { text-align: start; }
.ob-bhead { display: flex; align-items: center; gap: 6px; margin: -4px 0 14px; }
.ob-back { flex: none; width: 44px; height: 44px; margin-inline-start: -10px; color: var(--text-secondary); }
[dir="rtl"] .ob-back svg { transform: scaleX(-1); }
.ob-form { display: flex; flex-direction: column; }
.ob-form .field { margin-bottom: 14px; }
.ob-form #ob-name { font-size: 16px; }
.ob-photo-row { display: flex; align-items: center; gap: 16px; margin: 0 0 18px; }
.ob-photo { position: relative; flex: none; width: 96px; height: 96px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ob-photo-c { width: 96px; height: 96px; border-radius: 50%; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--accent-softer); color: var(--accent-text); border: 2px dashed var(--accent-soft); transition: transform var(--d-fast, 150ms) var(--e-standard, ease), border-color var(--d-fast, 150ms); }
.ob-photo-c img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ob-photo.has-photo .ob-photo-c { border: 0; box-shadow: 0 0 0 4px var(--accent-soft); }
.ob-photo:hover .ob-photo-c { border-color: var(--accent); }
.ob-photo:active .ob-photo-c { transform: scale(.96); }
.ob-photo:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ob-photo-badge { position: absolute; inset-inline-end: -2px; bottom: 2px; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--bubble-own); color: var(--on-accent); border: 3px solid var(--surface); box-shadow: var(--shadow-e2); }
.ob-photo-tx { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.ob-photo-l { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--text-primary); }
.ob-photo-rm { min-height: 36px; padding: 0 8px; margin-inline-start: -8px; font-size: 14px; color: var(--danger-text); }
.ob-photo-rm:hover { color: var(--danger-text); background: var(--danger-tint); }

/* ------------------------------------------------------------------ notification popup illustration */
.ob-bellart { position: relative; width: 96px; height: 96px; display: inline-flex; align-items: center; justify-content: center; }
.ob-bellc { position: relative; z-index: 1; width: 72px; height: 72px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--bubble-own); color: var(--on-accent); box-shadow: var(--shadow-fab); }
.ob-bellc svg { transform-origin: 50% 12%; animation: ob-ring-bell 2.6s var(--e-standard, ease) 0.4s infinite; }
.ob-ring { position: absolute; inset: 12px; border-radius: 50%; border: 2px solid var(--accent-soft); animation: ob-pulse 2.6s var(--e-standard, ease) infinite; }
.ob-ring.r2 { animation-delay: 1.3s; }
@keyframes ob-pulse { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.45); opacity: 0; } }
@keyframes ob-ring-bell { 0%, 60%, 100% { transform: rotate(0); } 8% { transform: rotate(14deg); } 16% { transform: rotate(-12deg); } 24% { transform: rotate(8deg); } 32% { transform: rotate(-5deg); } 40% { transform: rotate(0); } }

/* ------------------------------------------------------------------ header bell states (AQ.onboard.bell) */
.hbtn.ob-bell[data-state="on"] { color: var(--accent-text); }
.hbtn.ob-bell[data-state="blocked"] { color: var(--danger-text); }
.hbtn.ob-bell[data-state="unsupported"] { color: var(--text-muted); }
.hbtn.ob-bell .ob-bell-dot { position: absolute; top: 10px; inset-inline-end: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 0 2px var(--surface); pointer-events: none; }
.ghead .hbtn.ob-bell[data-state="on"] { color: var(--accent-text); }
.ghead .hbtn.ob-bell[data-state="blocked"] { color: var(--danger-text); }

/* ------------------------------------------------------------------ chat header call buttons */
.ghead .gchat-call { width: 40px; height: 40px; color: var(--text-secondary); }
.ghead .gchat-call:hover { color: var(--accent-text); }
.ghead .gchat-call[hidden] { display: none; }
/* compact header while the two call buttons are shown (guest-chat.js adds .has-calls): the name and "Online" keep
   their room; the rating moves out of the header on phones (it stays on the intro card and the profile viewer) */
.ghead.has-calls .gchat-id { gap: 8px; padding-inline: 4px; }
.ghead.has-calls .gchat-rate { flex: 0 1 auto; min-width: 0; overflow: hidden; }
@media (max-width: 440px) { .ghead.has-calls .gchat-rate { display: none; } }
@media (max-width: 380px) {
  .ghead.has-calls { gap: 2px; }
  .ghead.has-calls .hbtn, .ghead.has-calls .gchat-call { width: 36px; }
  .ghead.has-calls .hbtn.ob-bell .ob-bell-dot { inset-inline-end: 7px; }
  .ghead.has-calls .gchat-av .avatar { width: 36px; height: 36px; font-size: 13.5px; }
  .ghead.has-calls .gchat-name { font-size: 15.5px; }
}

/* ------------------------------------------------------------------ chats page: installed app without identity */
.gc-pwahint { margin: 12px 16px 16px; text-align: center; font-size: 14px; line-height: 20px; color: var(--text-secondary); }

/* ------------------------------------------------------------------ motion */
@media (prefers-reduced-motion: reduce) {
  .ob-pane, .ob-in-right, .ob-in-left { animation: none !important; }
  .ob-ring, .ob-bellc svg { animation: none !important; }
  .ob-ring { opacity: .35; transform: scale(1.12); }
  .ob-photo-c { transition: none; }
}
