/* Report-abuse page: form styling that follows the contact page design language.
   Colours come from custom properties so a dark scheme only swaps the values. */
.page-report-abuse {
    --af-surface: #ffffff;
    --af-text: #334155;
    --af-heading: #0f172a;
    --af-muted: #64748b;
    --af-field: #ffffff;
    --af-border: #758195;
    --af-primary: #2563eb;
    --af-ring: rgba(37, 99, 235, 0.18);
    --af-divider: #e2e8f0;
    --af-ok-bg: #ecfdf5;
    --af-ok-text: #065f46;
    --af-ok-border: #a7f3d0;
    --af-err-bg: #fef2f2;
    --af-err-text: #991b1b;
    --af-err-border: #fecaca;
    --af-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    color-scheme: light;
}
/* Light is the only default, like the contact page: the site around the card has no dark theme, and a dark card
   on a light page looked broken. Dark values apply only when the page sets data-theme="dark" explicitly. */
[data-theme="dark"] .page-report-abuse {
    --af-surface: #0f172a;
    --af-text: #cbd5e1;
    --af-heading: #f1f5f9;
    --af-muted: #94a3b8;
    --af-field: #1e293b;
    --af-border: #334155;
    --af-primary: #60a5fa;
    --af-ring: rgba(96, 165, 250, 0.28);
    --af-divider: #1e293b;
    --af-ok-bg: rgba(16, 185, 129, 0.12);
    --af-ok-text: #6ee7b7;
    --af-ok-border: rgba(16, 185, 129, 0.35);
    --af-err-bg: rgba(239, 68, 68, 0.12);
    --af-err-text: #fca5a5;
    --af-err-border: rgba(239, 68, 68, 0.35);
    --af-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    color-scheme: dark;
}

.page-content-card.page-report-abuse {
    background: var(--af-surface);
    border-color: var(--af-divider);
}
.page-report-abuse .page-content-body {
    color: var(--af-text);
}

.abuse-lead {
    margin: 0 0 1.5rem;
    color: var(--af-muted);
    line-height: 1.65;
}

/* Messages */
.abuse-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 1.5rem;
    padding: 12px 16px;
    border: 1px solid;
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.5;
}
.abuse-alert svg {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin-top: 1px;
}
.abuse-alert--success { background: var(--af-ok-bg); color: var(--af-ok-text); border-color: var(--af-ok-border); }
.abuse-alert--danger { background: var(--af-err-bg); color: var(--af-err-text); border-color: var(--af-err-border); }

/* Fields */
.abuse-field {
    margin-bottom: 1.25rem;
}
.abuse-label {
    display: block;
    margin: 0 0 6px;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--af-heading);
}
.abuse-req {
    color: #dc2626;
    margin-left: 2px;
}
.abuse-opt {
    margin-left: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--af-muted);
}
.abuse-control {
    display: block;
    width: 100%;
    height: 48px;
    padding: 10px 16px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--af-heading);
    background-color: var(--af-field) !important;
    background-image: none !important;
    border: 1.5px solid var(--af-border) !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.abuse-control::placeholder {
    color: var(--af-muted);
    opacity: 0.8;
}
.abuse-control:focus {
    outline: none;
    border-color: var(--af-primary) !important;
    box-shadow: 0 0 0 3.5px var(--af-ring), 0 1px 3px rgba(15, 23, 42, 0.04) !important;
}
select.abuse-control {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 44px;
    background-image: var(--af-arrow) !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    cursor: pointer;
}
textarea.abuse-control {
    height: auto;
    min-height: 150px;
    padding-top: 12px;
    resize: vertical;
}
.abuse-hint {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 6px 0 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--af-muted);
}
.abuse-count {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
}

/* Verification: reserve the widget height so the button does not jump */
.abuse-verify {
    min-height: 65px;
    margin: 0 0 0.5rem;
    max-width: 100%;
    overflow-x: auto;
}
.abuse-verify-msg {
    margin: 0 0 1rem;
    font-size: 0.88rem;
    color: var(--af-err-text);
}
.abuse-verify-msg[hidden] { display: none; }

.abuse-actions {
    margin-top: 1.25rem;
}
.abuse-submit {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    font-weight: 600 !important;
}
.abuse-submit svg {
    width: 18px;
    height: 18px;
}
.abuse-submit[disabled] {
    opacity: 0.7;
    cursor: progress;
}

/* Information below the form */
.abuse-note {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--af-divider);
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--af-muted);
}
.abuse-note p { margin: 0 0 0.5rem; }
.abuse-note p:last-child { margin-bottom: 0; }
.abuse-note a { color: var(--af-primary); text-decoration: underline; }

/* Honeypot stays out of sight and out of the tab order */
.abuse-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 575.98px) {
    .page-report-abuse .card-body {
        padding: 1.25rem !important;
    }
    .abuse-submit {
        width: 100%;
    }
}
@media (max-width: 380px) {
    #abuse-turnstile {
        transform: scale(0.92);
        transform-origin: 0 0;
    }
}
