/* Radilux design system: styles for the auth area (sign in, register, forgot
   and reset password, email verification, complete profile). Tokens and base
   components live in rl.css. No colour literals here: tokens only.
   Markup: internal/controllers/auth/panel.go, internal/middleware/emailverification.go,
   internal/controllers/dashboard/legacy_auth.go. */

/* ── The form block (dialog, page and legacy side panel share it) ─────── */
.rl-auth { min-width: 0; }
.rl-auth form { margin: 0; }
.rl-auth-names { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 380px) { .rl-auth-names { grid-template-columns: minmax(0, 1fr); } }
.rl-auth .rl-busy { align-items: center; gap: 7px; }
.rl-auth-aside { text-align: right; }
.rl-auth-foot { text-align: center; }
.rl-auth-or { display: flex; align-items: center; gap: 12px; font-size: .8rem; color: var(--rl-muted); }
.rl-auth-or::before, .rl-auth-or::after { content: ""; flex: 1 1 0; border-top: 1px solid var(--rl-line); }
.rl-auth-more > summary { font-weight: 600; font-size: .9rem; }

/* "Your specialty" is asked only while "Other" is selected. */
.rl-auth-custom { display: none; }
.rl-auth:has(select[name="specialty"] option[value="Other"]:checked) .rl-auth-custom { display: block; }
@supports not selector(:has(*)) { .rl-auth-custom { display: block; } }

/* ── Full pages ───────────────────────────────────────────────────────── */
.rl-auth-page { display: flex; justify-content: center; padding-block: 16px; }
.rl-auth-card { width: min(440px, 100%); }

/* ── Resend-verification button with its inline answer ────────────────── */
.rl-auth-resend { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.rl-auth-result:empty { display: none; }
.rl-auth-msg--ok { color: var(--rl-ok); }
.rl-auth-msg--danger { color: var(--rl-danger); }

/* ── Shell: verification banner, complete-profile prompt, blocked feature ─ */
.rl-auth-bannerhost:empty { display: none; }
.rl-auth-banner { align-items: center; flex-wrap: wrap; border-radius: 0; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }
.rl-auth-prompt {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding-block: 8px; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px));
  background: var(--rl-accent-soft); border-bottom: 1px solid var(--rl-accent-line);
}
.rl-auth-notice { max-width: 640px; }

/* ── Legacy side panels (#loginOffcanvas, #registerOffcanvas) ────────────
   Bootstrap opens and closes them for the still-legacy fragments that refer
   to those ids; the content is the form block above. Delete with them. */
.rl-auth-offcanvas.offcanvas { background: var(--rl-surface); color: var(--rl-ink); border-left: 1px solid var(--rl-line); }
.rl-auth-offcanvas-inner { height: 100%; overflow-y: auto; }

/* ── Dialogs on pages with the compatibility layer ───────────────────────
   candidate for rl.css (compatibility section): the Tailwind CDN reset makes
   every button transparent and is injected after rl.css, and Bootstrap's
   layers sit far above the dialog. These rules give buttons inside the new
   look their rl.css background back and put the dialog above legacy layers. */
.rl-scope button.rl-btn { background-color: var(--rl-surface); }
.rl-scope button.rl-btn:hover { background-color: var(--rl-sunken); }
.rl-scope button.rl-btn--primary { background-color: var(--rl-accent); }
.rl-scope button.rl-btn--primary:hover { background-color: var(--rl-accent-hover); }
.rl-scope button.rl-btn--quiet { background-color: transparent; }
.rl-scope button.rl-btn--quiet:hover { background-color: var(--rl-sunken); }
.rl-scope button.rl-btn--danger:hover { background-color: var(--rl-danger-soft); }
.rl-scope .rl-backdrop { background-color: var(--rl-bg); opacity: .6; }
:root[data-theme="light"] .rl-scope .rl-backdrop { background-color: var(--rl-ink); opacity: .45; }
@media (prefers-color-scheme: light) { :root[data-theme="system"] .rl-scope .rl-backdrop { background-color: var(--rl-ink); opacity: .45; } }
body.rl-compat #overlayHost dialog.rl-dialog { z-index: 1061; }
body.rl-compat #overlayHost .rl-backdrop { z-index: 1060; }
