/* v1877: shared presentation. Behaviour belongs to each existing dialog. */
:root { --sfd-bg:#fff; --sfd-fg:#24292f; --sfd-muted:#57606a; --sfd-border:#d0d7de; --sfd-button:#f6f8fa; --sfd-hover:#eaeef2; }
html[data-theme="dark"] { --sfd-bg:#161b22; --sfd-fg:#f0f3f6; --sfd-muted:#b1bac4; --sfd-border:#6e7681; --sfd-button:#21262d; --sfd-hover:#30363d; }
html body .sylebel-dialog {
    box-sizing:border-box!important; background:var(--sfd-bg)!important; color:var(--sfd-fg)!important;
    border:1px solid var(--sfd-border)!important; border-radius:8px!important;
    padding:24px!important; font:18px/1.55 Arial,sans-serif!important;
    max-width:calc(100vw - 32px)!important; max-height:calc(100dvh - 32px)!important;
    overflow:auto!important; overflow-wrap:anywhere; box-shadow:0 12px 40px #0006!important;
}
html body .sylebel-dialog:not(.sylebel-dialog-wide) { width:620px!important; }
html body .sylebel-dialog-wide { width:960px!important; }
.sylebel-dialog::backdrop { background:rgba(0,0,0,.6); }
html body :is(#phpbb_alert,#phpbb_confirm).sylebel-dialog { left:50%!important; margin-left:0!important; transform:translateX(-50%); }
html body .sylebel-dialog :is(p,label,legend,li,small) { font-size:inherit!important; line-height:1.55!important; color:inherit; }
html body .sylebel-dialog :is(h2,h3,h4) { font:600 22px/1.35 Arial,sans-serif!important; color:inherit!important; margin:0 0 16px!important; }
html body .sylebel-dialog :is(p,ul,ol) { margin-top:12px; margin-bottom:16px; }
html body .sylebel-dialog :is(button,input[type="submit"],input[type="button"],a.button,a.button1,a.button2,.sylebel-dialog-button) {
    box-sizing:border-box!important; font:600 17px/1.35 Arial,sans-serif!important; min-height:44px!important;
    padding:10px 18px!important; max-width:100%!important; white-space:normal!important; height:auto!important;
    border:1px solid var(--sfd-border)!important; border-radius:6px!important; background:var(--sfd-button)!important;
    background-image:none!important; color:var(--sfd-fg)!important; text-shadow:none!important; box-shadow:none!important;
    text-decoration:none!important; cursor:pointer; vertical-align:middle;
}
html body .sylebel-dialog :is(button,input,a).sylebel-dialog-primary { background:#1f883d!important; border-color:#1f883d!important; color:#fff!important; }
html body .sylebel-dialog :is(button,input,a).sylebel-dialog-danger { background:#cf222e!important; border-color:#cf222e!important; color:#fff!important; }
html body .sylebel-dialog :is(button,input[type="submit"],input[type="button"],a.button,a.button1,a.button2,.sylebel-dialog-button):hover { background:var(--sfd-hover)!important; }
html body .sylebel-dialog :is(button,input,a).sylebel-dialog-primary:hover { background:#1a7f37!important; }
html body .sylebel-dialog :is(button,input,a).sylebel-dialog-danger:hover { background:#a40e26!important; }
html body .sylebel-dialog :is(button,input,select,textarea,a):focus-visible { outline:3px solid #bf8700!important; outline-offset:3px!important; }
html body .sylebel-dialog :is(button,input):disabled { opacity:.5!important; cursor:not-allowed!important; }
html body .sylebel-dialog :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),select,textarea) {
    box-sizing:border-box!important; font:18px/1.4 Arial,sans-serif!important; padding:10px!important;
    min-height:44px; max-width:100%; background:var(--sfd-bg)!important; color:var(--sfd-fg)!important;
    border:1px solid var(--sfd-border)!important; border-radius:4px!important;
}
html body .sylebel-dialog :is(input[type="checkbox"],input[type="radio"]) { width:20px; height:20px; vertical-align:middle; }
html body .sylebel-dialog .sylebel-dialog-actions { display:flex; gap:12px; flex-wrap:wrap; justify-content:flex-end; margin-top:20px; }
html body .sylebel-dialog .sylebel-dialog-close { min-width:44px!important; padding:6px!important; font-size:24px!important; }
html body .sylebel-dialog [hidden] { display:none!important; }
html body .sylebel-dialog > :is(header,footer) { color:inherit!important; background:var(--sfd-bg)!important; }
html body .sylebel-dialog .sylebel-dialog-message { white-space:pre-wrap; }
@media(max-width:600px) {
    html body .sylebel-dialog { padding:18px!important; max-width:calc(100vw - 16px)!important; max-height:calc(100dvh - 16px)!important; }
    html body .sylebel-dialog .sylebel-dialog-actions > * { flex:1 1 auto; }
}
@media print { .sylebel-dialog { display:none!important; } }

/* v1878: outrank the shared code-theme muted label rule, including hover/focus. */
html body .sylebel-dialog.sylebel-dialog :is(button,input,a).sylebel-dialog-primary,
html body .sylebel-dialog.sylebel-dialog :is(button,input,a).sylebel-dialog-danger {
    color:#fff!important;
}
