/* Session wiring only; preserve the existing purple/orange identity. */
.session-view { min-height: 100vh; display: grid; place-items: center; padding: 32px 18px; background: var(--bg, #f7f9fc); }
.session-card { width: min(100%, 580px); padding: clamp(24px, 5vw, 44px); border: 1px solid var(--border, #e3eaf4); border-radius: 24px; background: var(--surface, #ffffff); box-shadow: 0 18px 60px #16325c12; }
.session-card h1 { margin: 20px 0 12px; font-size: clamp(24px, 5vw, 32px); }
.session-card p { color: var(--muted, #737c89); line-height: 1.9; font-size: 14px; }
.session-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.session-message { margin-top: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.session-workspace-list { display: grid; gap: 12px; margin-top: 20px; }
.session-workspace-list .btn { justify-content: space-between; text-align: right; }
.workspace-select { width: 100%; margin-top: 12px; min-height: 38px; color: inherit; background: #ffffff0a; border: 1px solid #ffffff30; border-radius: 9px; padding: 8px; font: inherit; font-size: 12px; }
.workspace-select option { background: #25354e; color: white; }
.session-user-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.session-invitation-link { width: 100%; direction: ltr; text-align: left; }
.app-banner .btn { margin-inline-start: 10px; }
body[data-saving="true"] .app-main button, body[data-saving="true"] .dialog button, body[data-saving="true"] .dialog input, body[data-saving="true"] .dialog select { pointer-events: none; opacity: .65; }
body[data-saving="true"] .app-topbar::after { content: "جارٍ الحفظ على الخادم…"; color: var(--muted); font-size: 11px; }
body.dark .session-card { background: var(--surface, #222d3d); }
@media (max-width: 600px) { .session-actions .btn { flex: 1 1 100%; } .session-user-name { max-width: 85px; } .top-actions { gap: 7px; flex-wrap: wrap; justify-content: flex-end; } #sessionMode { font-size: 10px; } }
[hidden] { display: none !important; }

/* Opening the workspace or checking the session: a plain wait, without the card or any words. */
.session-view.is-waiting .session-card { border-color: transparent; background: transparent; box-shadow: none; }
.boot-wait { display: grid; place-items: center; min-height: 120px; }
.boot-wait-ring { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border, #e3eaf4); border-top-color: var(--brand, #16325c); animation: boot-spin 0.9s linear infinite; }
@keyframes boot-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .boot-wait-ring { animation-duration: 2.4s; } }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* boot-route.js: an app address waits on a plain screen until app.js shows the view. */
.boot-route #landingView { display: none; }
.boot-route #sessionView[hidden] { display: grid; }
.boot-route #sessionView[hidden] .session-card { border-color: transparent; background: transparent; box-shadow: none; }
.boot-route #sessionView[hidden] .session-card::before { content: ""; display: block; width: 28px; height: 28px; margin: 46px auto; border-radius: 50%; border: 3px solid var(--border, #e3eaf4); border-top-color: var(--brand, #16325c); animation: boot-spin 0.9s linear infinite; }
