/* First-run setup wizard (js/onboarding.js). Light + Dark (html.dark), RTL, >=44px targets, >=12px text. */
.ob-lock { overflow: hidden; }
.ob-overlay { position: fixed; inset: 0; z-index: 2147482000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, .72); backdrop-filter: blur(6px); overflow-y: auto; font-family: "Almarai", system-ui, sans-serif; }
.ob-card { width: 100%; max-width: 560px; max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: #fff; color: #0f172a; border: 1px solid #e2e8f0; border-radius: 22px; box-shadow: 0 30px 80px -20px rgba(2, 6, 23, .6); overflow: hidden; }
.ob-card *, .ob-card *::before, .ob-card *::after { box-sizing: border-box; font-family: inherit; }
.ob-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px 8px; }
.ob-kicker { margin: 0 0 2px; font-size: 12px; font-weight: 800; color: #0369a1; }
.ob-head h2 { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.4; }
.ob-skip { min-height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: transparent; color: #475569; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.ob-skip:hover { background: #f1f5f9; color: #0f172a; }

.ob-steps { list-style: none; margin: 0; padding: 8px 24px 4px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ob-steps li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: #f1f5f9; color: #475569; font-size: 12px; font-weight: 700; min-width: 0; }
.ob-steps li span { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #cbd5e1; color: #0f172a; font-size: 12px; font-weight: 800; }
.ob-steps li em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ob-steps li.is-current { background: #e0f2fe; color: #075985; }
.ob-steps li.is-current span { background: #0284c7; color: #fff; }
.ob-steps li.is-done span { background: #0d9488; color: #fff; }

.ob-body { padding: 14px 24px 8px; overflow-y: auto; flex: 1 1 auto; display: flex; flex-direction: column; gap: 14px; }
.ob-hint { margin: 0; color: #475569; font-size: 14px; line-height: 1.7; }
.ob-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ob-field label, .ob-label { font-size: 13px; font-weight: 800; color: #334155; }
.ob-opt { font-weight: 600; color: #64748b; }
.ob-input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 12px; background: #f8fafc; color: #0f172a; font-size: 15px; }
.ob-input:focus, .ob-switch:focus-visible, .ob-btn:focus-visible, .ob-skip:focus-visible, .ob-file:focus-visible { outline: 3px solid #0284c7; outline-offset: 2px; }
.ob-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ob-logo-row { display: flex; align-items: center; gap: 12px; }
.ob-logo-preview { width: 52px; height: 52px; object-fit: contain; border-radius: 12px; border: 1px solid #e2e8f0; background: #fff; flex: none; }
.ob-logo-preview[hidden] { display: none; }
.ob-file { flex: 1; min-width: 0; min-height: 46px; padding: 8px; font-size: 13px; color: #334155; border: 1px dashed #94a3b8; border-radius: 12px; background: #f8fafc; }

.ob-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid #e2e8f0; border-radius: 14px; background: #f8fafc; }
.ob-toggle-row strong { display: block; font-size: 15px; font-weight: 800; }
.ob-toggle-row p { margin: 2px 0 0; font-size: 13px; color: #475569; line-height: 1.6; }
.ob-switch { position: relative; flex: none; width: 56px; min-height: 44px; padding: 0; border: 0; border-radius: 999px; background: transparent; cursor: pointer; }
.ob-switch::before { content: ""; position: absolute; inset-inline: 0; top: 50%; height: 28px; margin-top: -14px; border-radius: 999px; background: #cbd5e1; transition: background .15s; }
.ob-switch span { position: absolute; top: 50%; margin-top: -11px; inset-inline-start: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: inset-inline-start .15s; }
.ob-switch[aria-checked="true"]::before { background: #0284c7; }
.ob-switch[aria-checked="true"] span { inset-inline-start: 30px; }

.ob-done { text-align: center; padding: 6px 0 2px; }
.ob-done-ico { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #ccfbf1; color: #0f766e; font-size: 28px; font-weight: 800; }
.ob-done h3 { margin: 10px 0 4px; font-size: 20px; font-weight: 800; }
.ob-done p { margin: 0; color: #475569; font-size: 14px; line-height: 1.7; }
.ob-url-row { display: flex; gap: 10px; }
.ob-url-row .ob-input { flex: 1; min-width: 0; }
.ob-copied { margin: 0; min-height: 20px; font-size: 13px; font-weight: 700; color: #0f766e; }

.ob-error { margin: 0 24px; padding: 10px 14px; border-radius: 12px; background: #ffe4e6; border: 1px solid #fecdd3; color: #be123c; font-size: 13px; font-weight: 700; }
.ob-error[hidden] { display: none; }
.ob-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px 20px; }
.ob-btn { min-height: 46px; padding: 0 22px; border-radius: 13px; border: 1px solid transparent; font-size: 15px; font-weight: 800; cursor: pointer; }
.ob-btn[hidden], .ob-skip[hidden] { display: none; }
.ob-btn:disabled { opacity: .6; cursor: wait; }
.ob-btn-primary { background: #0284c7; color: #fff; margin-inline-start: auto; }
.ob-btn-primary:hover:not(:disabled) { background: #0369a1; }
.ob-btn-ghost { background: #fff; border-color: #cbd5e1; color: #334155; }
.ob-copy { margin-inline-start: 0; flex: none; }

/* dark */
html.dark .ob-card { background: #0f1a2e; color: #f1f5f9; border-color: #26344d; }
html.dark .ob-kicker { color: #7dd3fc; }
html.dark .ob-skip { color: #a8b6cb; }
html.dark .ob-skip:hover { background: #1b2740; color: #f1f5f9; }
html.dark .ob-steps li { background: #1b2740; color: #a8b6cb; }
html.dark .ob-steps li span { background: #334766; color: #f1f5f9; }
html.dark .ob-steps li.is-current { background: #0c2a43; color: #bae6fd; }
html.dark .ob-steps li.is-current span { background: #38bdf8; color: #082f49; }
html.dark .ob-steps li.is-done span { background: #5eead4; color: #042f2e; }
html.dark .ob-hint, html.dark .ob-toggle-row p, html.dark .ob-done p { color: #a8b6cb; }
html.dark .ob-field label, html.dark .ob-label { color: #cbd5e1; }
html.dark .ob-opt { color: #94a3b8; }
html.dark .ob-input, html.dark .ob-file { background: #131c2e; border-color: #334766; color: #f1f5f9; }
html.dark .ob-logo-preview { background: #131c2e; border-color: #334766; }
html.dark .ob-toggle-row { background: #131c2e; border-color: #26344d; }
html.dark .ob-switch::before { background: #475569; }
html.dark .ob-switch[aria-checked="true"]::before { background: #38bdf8; }
html.dark .ob-done-ico { background: #0f3a37; color: #5eead4; }
html.dark .ob-copied { color: #5eead4; }
html.dark .ob-error { background: #3d1420; border-color: #6b1d33; color: #fda4af; }
html.dark .ob-btn-primary { background: #38bdf8; color: #082f49; }
html.dark .ob-btn-primary:hover:not(:disabled) { background: #7dd3fc; }
html.dark .ob-btn-ghost { background: #131c2e; border-color: #334766; color: #e2e8f0; }

@media (max-width: 767px) {
  .ob-overlay { align-items: flex-end; padding: 0; }
  .ob-card { max-width: none; max-height: 94dvh; border-radius: 22px 22px 0 0; }
  .ob-head, .ob-steps, .ob-body, .ob-foot { padding-inline: 16px; }
  .ob-error { margin-inline: 16px; }
  .ob-steps li { padding: 8px; gap: 6px; }
  .ob-steps li em { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ob-steps li.is-current em { position: static; width: auto; height: auto; overflow: hidden; clip: auto; }
  .ob-steps { grid-template-columns: 1fr 1fr 1fr; }
  .ob-grid2 { grid-template-columns: 1fr; }
  .ob-url-row { flex-direction: column; }
  .ob-copy { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .ob-switch::before, .ob-switch span { transition: none; }
}
