/* The site's own questions and messages (static/elabs-dialog.js, 2026-11-29), and the sign-out warning: a picture, the
   question, what follows, and its buttons, each on one line. On a phone the buttons are full width, the one that goes
   ahead on top. The portal's larger dialogs (forms) are in elabs-base.css. */
dialog.ed { position: fixed; inset: 0; width: min(470px, calc(100vw - 32px)); max-width: none; height: fit-content; max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: #fff; color: #475569;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 0.92rem; line-height: 1.55; text-align: left;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.3); }
dialog.ed.ed-wide { width: min(600px, calc(100vw - 32px)); }
dialog.ed:not([open]) { display: none; }
dialog.ed[open] { display: flex; animation: ed-in 0.16s ease-out; }
dialog.ed::backdrop { background: rgba(15, 23, 42, 0.55); animation: ed-fade 0.16s ease-out; }
@keyframes ed-in { from { opacity: 0; transform: translateY(8px) scale(0.985); } }
@keyframes ed-fade { from { opacity: 0; } }
.ed *, .ed *::before, .ed *::after { box-sizing: border-box; }
.ed-in { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; min-height: 0; margin: 0; }
.ed-main { display: flex; flex: 1 1 auto; align-items: flex-start; gap: 16px; min-height: 0; padding: 24px 24px 4px; overflow-y: auto; overscroll-behavior: contain; }
.ed-ic { display: grid; flex: none; place-items: center; width: 44px; height: 44px; border-radius: 12px; font-size: 1.25rem; line-height: 1; background: #ecfeff; color: #0e7490; }
.ed-ic-danger, .ed-ic-error { background: #fef2f2; color: #dc2626; }
.ed-ic-warning { background: #fffbeb; color: #b45309; }
.ed-ic-success { background: #ecfdf5; color: #047857; }
.ed-text { flex: 1 1 auto; min-width: 0; padding-top: 2px; }
.ed-t { margin: 0; color: #0f172a; font-size: 1.08rem; font-weight: 700; line-height: 1.35; letter-spacing: -0.01em; overflow-wrap: anywhere; text-wrap: balance; }
.ed-m { margin-top: 6px; color: #475569; overflow-wrap: anywhere; text-wrap: pretty; white-space: pre-line; }
.ed-m.ed-html { white-space: normal; }
.ed-m strong, .ed-m b { color: #1e293b; }
.ed-m a { color: #0e7490; font-weight: 600; }
.ed-foot { display: flex; flex: none; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 20px 24px 24px; }
.ed-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; margin: 0; padding: 0 18px; border: 1px solid transparent;
    border-radius: 10px; font: inherit; font-size: 0.9rem; font-weight: 600; line-height: 1; white-space: nowrap; text-decoration: none; cursor: pointer;
    transition: background-color 0.12s, border-color 0.12s; }
.ed-quiet { border-color: #cbd5e1; background: #fff; color: #334155; }
.ed-quiet:hover { border-color: #94a3b8; background: #f8fafc; color: #0f172a; }
.ed-primary { background: #0e7490; color: #fff; }
.ed-primary:hover { background: #155e75; color: #fff; }
.ed-danger { background: #dc2626; color: #fff; }
.ed-danger:hover { background: #b91c1c; color: #fff; }
.ed-btn:focus-visible, .ed-pick:focus-visible { outline: 3px solid rgba(8, 145, 178, 0.45); outline-offset: 2px; }
.ed-btn:disabled { opacity: 0.65; cursor: default; }
.ed-btn.is-busy::before, .ed-spin { content: ''; flex: none; width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ed-turn 0.8s linear infinite; }
.ed-spin { width: 22px; height: 22px; }
@keyframes ed-turn { to { transform: rotate(360deg); } }
/* a typed answer, or something to copy */
.ed-field { margin-top: 14px; }
.ed-field label { display: block; margin: 0 0 6px; color: #1e293b; font-size: 0.85rem; font-weight: 600; }
.ed-field input, .ed-field textarea { display: block; width: 100%; min-height: 42px; margin: 0; padding: 9px 12px; border: 1px solid #cbd5e1; border-radius: 10px;
    background: #fff; color: #0f172a; font: inherit; font-size: 0.95rem; line-height: 1.45; resize: none; }
.ed-field textarea { background: #f8fafc; font-size: 0.85rem; overflow-wrap: anywhere; }
.ed-field input:focus, .ed-field textarea:focus { border-color: #0891b2; outline: 0; box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.2); }
.ed-field input.bad { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12); }
.ed-field input::placeholder { color: #64748b; opacity: 0.85; text-overflow: ellipsis; }
.ed-picks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ed-pick { min-height: 32px; margin: 0; padding: 4px 12px; border: 1px solid #a5d8e6; border-radius: 999px; background: #f0fdff; color: #155e75; font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.ed-pick:hover { background: #cffafe; }
.ed-hint { margin-top: 6px; color: #64748b; font-size: 0.82rem; }
.ed-err { margin-top: 6px; color: #b91c1c; font-size: 0.85rem; font-weight: 600; }
.ed-said { margin-top: 6px; color: #047857; font-size: 0.85rem; font-weight: 600; }
.ed-err:empty, .ed-said:empty { display: none; }
@media (max-width: 520px) {
    .ed-main { gap: 12px; padding: 20px 18px 2px; }
    .ed-ic { width: 38px; height: 38px; border-radius: 10px; font-size: 1.1rem; }
    .ed-foot { flex-direction: column-reverse; padding: 16px 18px 18px; }
    .ed-btn { width: 100%; min-height: 46px; white-space: normal; }
    .ed-pick { min-height: 38px; }
    .ed-field input, .ed-field textarea { font-size: 16px; }   /* a smaller size makes an iPhone zoom in */
}
@media (prefers-reduced-motion: reduce) { dialog.ed[open], dialog.ed::backdrop { animation: none; } .ed-btn { transition: none; } }
@media print { dialog.ed { display: none !important; } }
