/* ═══ DESIGN LAYER - appeals, moderation notices and the report dialog (loaded with pages/moderation.css) ═══
   Loaded on the file page, the short-link page, /account-status and the IP ban page. Markup this file expects:
     .mod-box[.mod-box-danger | .mod-review | .mod-box-compact] > .mod-flash + h3 + p + .mod-status + .mod-staff-note
         + details.mod-details > summary + form.mod-form (label, input | textarea, p.mod-hint, .mod-btn)
                                                                        (src/Templates/moderation-ui.php)
     .account-status-container > .mod-box                               (src/Pages/account-status.php)
     .notice.notice-review                                              the .notice itself is design/file.css's
     #report-content-modal.report-modal-overlay > div > span, h2, p, form (labels, #report-description,
         #submit-report-btn, #cancel-report-btn, #report-status)        (src/Templates/report-modal.php)
   The report dialog is styled inline in its template and its script sets inline styles, so its rules need
   !important; its display is never set here. Status colours: red #ef4444, amber #f59e0b, green #10b981,
   always as a solid border around a flat fill.

   Advertising: nothing here touches the file card or an ad unit. On the file page .notice-review (above
   the card) is only recoloured, and .mod-box comes after the card and its two units. */

/* ─── Boxes ─── */
html[data-design] .mod-box {
    background: var(--d-surface);
    border: var(--d-panel-border);
    border-radius: var(--d-r-lg);
    box-shadow: var(--d-panel-shadow) !important;
}
html[data-design] .mod-box h3 {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.25;
}
html[data-design] .mod-box p { font-size: 15px; color: var(--text-secondary); }
html[data-design] .mod-hint,
html[data-design] .mod-box p.mod-hint { font-size: 13px; color: var(--text-muted); }
/* a box inside another one: the short-link card, the IP ban page */
html[data-design] .mod-box-compact,
html[data-design] .ban-container .mod-box {
    background: var(--d-ground);
    border: var(--d-inset-border);
    border-radius: var(--d-r-md);
    box-shadow: none !important;
}
html[data-design] .mod-box-danger { border-color: #ef4444; }
html[data-design] .mod-box-danger h3 { color: #fca5a5; }
html[data-design] .mod-review,
html[data-design] .notice-review { border-color: #f59e0b; }
html[data-design] .mod-review h3,
html[data-design] .notice-review h3 { color: #fcd34d; }

/* messages inside a box: flat, the state as a solid border all round (the old stripe on the left is gone) */
html[data-design] .mod-flash,
html[data-design] .mod-status,
html[data-design] .mod-staff-note {
    background: var(--d-ground);
    border: var(--d-inset-border);
    border-radius: var(--d-r-md);
    font-size: 15px;
}
html[data-design] .mod-status { padding: 10px 14px; }
html[data-design] .mod-flash-success,
html[data-design] .mod-status-accepted,
html[data-design] .mod-status-answered { border-color: #10b981; }
html[data-design] .mod-flash-success { color: #6ee7b7; }
html[data-design] .mod-flash-error,
html[data-design] .mod-status-rejected { border-color: #ef4444; }
html[data-design] .mod-flash-error { color: #fca5a5; }
html[data-design] .mod-status-pending { border-color: #f59e0b; }
html[data-design] .mod-status-closed { border-color: var(--d-line-strong); }

/* ─── The form ─── */
html[data-design] .mod-details > summary { font-size: 15px; font-weight: var(--d-strong-weight); }
html[data-design] .mod-details > summary:hover { color: var(--text-primary); }
html[data-design] .mod-form label {
    font-size: 14px;
    font-weight: var(--d-strong-weight);
    color: var(--text-primary);
}
html[data-design] .mod-form input[type="text"],
html[data-design] .mod-form input[type="url"],
html[data-design] .mod-form textarea {
    background: var(--d-ground);
    border: var(--d-field-border);
    border-radius: var(--d-r-sm);
    font-size: 16px;
}
html[data-design] .mod-form input:focus,
html[data-design] .mod-form textarea:focus {
    border-color: var(--blue-400);
    outline: 2px solid var(--blue-400);
    outline-offset: 0;
}
html[data-design] .mod-btn {
    background: var(--d-btn-bg);
    color: var(--d-btn-fg);
    border: var(--d-btn-border);
    border-radius: var(--d-r-md);
    box-shadow: var(--d-btn-shadow) !important;
    font-size: 15px;
    font-weight: var(--d-btn-weight);
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s var(--d-ease), box-shadow 0.12s var(--d-ease);
}
html[data-design] .mod-btn:hover { background: var(--d-btn-bg-hover); color: var(--d-btn-fg); }
html[data-design] .mod-btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: var(--d-btn2-border);
    box-shadow: var(--d-btn2-shadow) !important;
}
html[data-design] .mod-btn-secondary:hover {
    background: var(--d-raised);
    color: var(--text-primary);
    border-color: var(--d-ink);
}

/* ─── Report dialog (PANEL recipe over the template's inline styles) ─── */
html[data-design] .report-modal-overlay { background-color: rgba(5, 8, 15, 0.82) !important; }
html[data-design] .report-modal-overlay > div {
    background-color: var(--d-surface) !important;
    border: var(--d-panel-border) !important;
    border-radius: var(--d-r-lg) !important;
    box-shadow: var(--d-panel-shadow) !important;
}
html[data-design] .report-modal-overlay h2 { font-size: 26px; line-height: 1.1; }
html[data-design] .report-modal-overlay label { color: var(--text-primary) !important; font-size: 15px; }
html[data-design] .report-modal-overlay input[type="radio"] { accent-color: #3b82f6; }
html[data-design] #close-report-content-modal:hover { color: var(--text-primary) !important; }
html[data-design] #report-description {
    background-color: var(--d-ground) !important;
    border: var(--d-field-border) !important;
    border-radius: var(--d-r-sm) !important;
    font-family: inherit;
    font-size: 16px;
}
html[data-design] #report-description:focus {
    border-color: var(--blue-400) !important;
    outline: 2px solid var(--blue-400);
    outline-offset: 0;
}
/* the red main action: white on #b91c1c (the template's white on #ef4444 is too faint) */
html[data-design] #submit-report-btn {
    background-color: #b91c1c !important;
    color: #ffffff !important;
    border: var(--d-btn2-border) !important;
    border-color: #b91c1c !important;
    border-radius: var(--d-r-md) !important;
    font-family: inherit;
    font-weight: var(--d-btn-weight) !important;
    transition: transform 0.12s var(--d-ease), box-shadow 0.12s var(--d-ease);
}
html[data-design] #submit-report-btn:hover { border-color: var(--d-ink) !important; }
html[data-design] #submit-report-btn:disabled {
    background-color: var(--d-raised) !important;
    border-color: var(--d-line-strong) !important;
    color: var(--text-secondary) !important;
    box-shadow: none !important;
}
html[data-design] #cancel-report-btn {
    background-color: transparent !important;
    color: var(--text-primary) !important;
    border: var(--d-btn2-border) !important;
    border-radius: var(--d-r-md) !important;
    font-family: inherit;
}
html[data-design] #cancel-report-btn:hover {
    background-color: var(--d-raised) !important;
    border-color: var(--d-ink) !important;
}
/* the result line: the script paints it dark green or dark red inline; here it is a flat box with the
   state as its border (matched by the colour the script wrote; unmatched it stays readable) */
html[data-design] #report-status {
    background-color: var(--d-ground) !important;
    border: var(--d-inset-border);
    border-radius: var(--d-r-md) !important;
    font-size: 15px;
}
html[data-design] #report-status[style*="rgb(6, 95, 70)"] { border-color: #10b981; color: #6ee7b7 !important; }
html[data-design] #report-status[style*="rgb(153, 27, 27)"] { border-color: #ef4444; color: #fca5a5 !important; }

/* ═══════════════════════ A · Swiss grid ═══════════════════════
   A warning is a hairline box in its status colour with a strong rule of that colour on top. */
html[data-design="swiss"] .mod-box-danger,
html[data-design="swiss"] .mod-review,
html[data-design="swiss"] .mod-status { border-top-width: 3px; }
/* the status page: the box stands on the left edge of the page grid */
html[data-design="swiss"] .account-status-container {
    max-width: 1200px;
    margin: 56px auto 72px;
    padding: 0 24px;
}
html[data-design="swiss"] .account-status-container .mod-box { max-width: 640px; }

/* ═══════════════════════ D · Neo-brutalist ═══════════════════════
   A warning is a thick box in its status colour on a hard shadow of the same colour. */
html[data-design="brutal"] .mod-box h3 { font-size: 22px; }
html[data-design="brutal"] .mod-box-danger { box-shadow: 8px 8px 0 #ef4444 !important; }
html[data-design="brutal"] .mod-review { box-shadow: 8px 8px 0 #f59e0b !important; }
html[data-design="brutal"] .notice-review { box-shadow: 6px 6px 0 #f59e0b !important; }
html[data-design="brutal"] .mod-flash { font-weight: 600; }
html[data-design="brutal"] .mod-form input:focus,
html[data-design="brutal"] .mod-form textarea:focus {
    outline: 0;
    border-color: var(--d-ink);
    box-shadow: 4px 4px 0 #3b82f6 !important;
}
html[data-design="brutal"] #report-description:focus {
    outline: 0;
    border-color: var(--d-ink) !important;
    box-shadow: 4px 4px 0 #3b82f6 !important;
}
html[data-design="brutal"] .account-status-container { margin: 56px auto 72px; padding: 0 24px; }
html[data-design="brutal"] .report-modal-overlay > div { box-shadow: 10px 10px 0 #3b82f6 !important; }
html[data-design="brutal"] #submit-report-btn {
    border-color: var(--d-ink) !important;
    box-shadow: 4px 4px 0 var(--d-ink) !important;
}
html[data-design="brutal"] #cancel-report-btn { font-weight: 700; }
@media (max-width: 600px) {
    html[data-design="brutal"] .account-status-container { padding: 0 22px 0 16px; }
    html[data-design="brutal"] .mod-form { padding-right: 4px; }
    html[data-design="brutal"] .report-modal-overlay > div { box-shadow: 6px 6px 0 #3b82f6 !important; }
}

/* ═══════════════════════ Motion ═══════════════════════
   The status page's box, an opened form and the report dialog; none of them holds an ad unit. */
@media (prefers-reduced-motion: no-preference) {
    html[data-design="swiss"] .account-status-container .mod-box { animation: d-rise 0.6s var(--d-ease) both; }
    html[data-design="swiss"] .mod-details[open] > .mod-form,
    html[data-design="swiss"] .report-modal-overlay > div { animation: d-rise 0.35s var(--d-ease) both; }

    html[data-design="brutal"] .account-status-container .mod-box { animation: d-drop-in 0.5s var(--d-pop) both; }
    html[data-design="brutal"] .mod-details[open] > .mod-form,
    html[data-design="brutal"] .report-modal-overlay > div { animation: d-pop-in 0.35s var(--d-pop) both; }
    html[data-design="brutal"] .mod-btn:hover {
        transform: translate(-2px, -2px);
        box-shadow: 6px 6px 0 var(--d-ink) !important;
    }
    html[data-design="brutal"] .mod-btn-secondary:hover { box-shadow: 6px 6px 0 #3b82f6 !important; }
    html[data-design="brutal"] #submit-report-btn:hover:not(:disabled) {
        transform: translate(-2px, -2px);
        box-shadow: 6px 6px 0 var(--d-ink) !important;
    }
    html[data-design="brutal"] .mod-btn:active,
    html[data-design="brutal"] #submit-report-btn:active:not(:disabled) {
        transform: translate(3px, 3px);
        box-shadow: 0 0 0 var(--d-ink) !important;
    }
}
