/* sys.readonly.css - a page opened on a read-only entitlement alone.
 *
 * Loaded by html/index.php ONLY when the page lock put the page into read-only
 * mode (the visitor holds view_content but not the page's manage_* key). The
 * server refuses every write regardless; this file makes the page look like
 * what it is, so nobody clicks a Delete that 403s. makeControl() already
 * renders inputs readonly with autosave off and drops action buttons - what is
 * left here is the raw markup the pages carry outside makeControl.
 */
.read-only-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.75rem;
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--border-color, #444);
    border-left-width: 4px;
    border-radius: 6px;
    background: var(--surface-2, rgba(127, 127, 127, 0.08));
    color: var(--text-muted, #aaa);
    font-size: 0.9rem;
}
.read-only-banner strong { color: var(--text-color, inherit); }

/* Delete forms and danger buttons the update views write by hand. */
body[data-read-only] form[id^="delete"],
body[data-read-only] .content .btn-danger,
body[data-read-only] .content .dialog-delete-btn,
body[data-read-only] .content .empty-state .btn-primary { display: none !important; }

/* Controls that act on click rather than on typing (toggle, slider, picture,
   ratings, association pickers ...) are wrapped in .ro-lock by makeControl().
   They stay visible - reading the value is the point - but take no input. */
body[data-read-only] .ro-lock { pointer-events: none; opacity: 0.85; }
body[data-read-only] .ro-lock img { pointer-events: auto; }
