/* Nidus Community — report dialog
   Adapts to Community's light/dark themes and uses a calm teal accent. */

.report-overlay,
.report-overlay * {
    box-sizing: border-box;
}

.report-overlay {
    --report-accent: #2dd4bf;
    --report-accent-bright: #5eead4;
    --report-accent-strong: #0f766e;
    --report-accent-soft: rgba(45, 212, 191, 0.15);
    --report-accent-line: rgba(45, 212, 191, 0.4);

    position: fixed;
    inset: 0;
    z-index: 2000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: clamp(12px, 4vw, 32px);

    background:
        radial-gradient(circle at 20% 0%, rgba(45, 212, 191, 0.18), transparent 54%),
        radial-gradient(circle at 85% 100%, rgba(73, 184, 142, 0.14), transparent 55%),
        rgba(3, 10, 8, 0.78);

    backdrop-filter: blur(10px);
    animation: reportFade 0.18s ease both;
}

.report-box {
    position: relative;

    width: min(640px, 100%);
    max-height: min(88vh, 880px);
    overflow: auto;

    background:
        radial-gradient(circle at 100% 0%, var(--report-accent-soft), transparent 46%),
        var(--surface-raised);

    border: 1px solid var(--border);
    border-radius: 20px;

    color: var(--text);

    box-shadow:
        0 34px 100px rgba(0, 0, 0, 0.62),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset,
        0 0 60px rgba(45, 212, 191, 0.07);

    animation: reportRise 0.26s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.report-box::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--report-accent), transparent);
    pointer-events: none;
}

.report-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;

    padding: 24px 24px 0;
}

.report-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;

    width: 48px;
    height: 48px;

    border: 1px solid var(--report-accent-line);
    border-radius: 14px;

    background:
        linear-gradient(145deg, var(--report-accent-soft), rgba(45, 212, 191, 0.04));
    color: var(--report-accent-strong);

    font-size: 19px;

    box-shadow: 0 0 28px rgba(45, 212, 191, 0.16);
}

:root.light .report-icon,
:root:not(.dark):not(.light) .report-icon {
    color: var(--report-accent-strong);
}

.report-heading {
    flex: 1;
    min-width: 0;
}

.report-heading h2 {
    margin: 2px 0 0;

    color: var(--text);

    font-size: 1.38rem;
    font-weight: 760;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.report-heading p {
    margin: 6px 0 0;

    color: var(--muted);

    font-size: 0.84rem;
    line-height: 1.5;
}

.report-close {
    display: grid;
    place-items: center;
    flex: 0 0 auto;

    width: 36px;
    height: 36px;
    padding: 0;

    border: 0;
    border-radius: 10px;

    background: transparent;
    color: var(--muted);

    font-size: 1rem;
    cursor: pointer;

    transition: background 0.15s, color 0.15s;
}

.report-close:hover {
    background: var(--hover, rgba(255, 255, 255, 0.08));
    color: var(--text);
}

.report-body {
    padding: 20px 24px 0;
}

.report-reasons {
    margin: 0;
    padding: 0;
    border: 0;
}

.report-reasons legend,
.report-field-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;

    width: 100%;
    margin: 0 0 10px;

    color: var(--text);

    font-size: 0.84rem;
    font-weight: 680;
}

.report-field-label span {
    color: var(--muted);
    font-size: 0.73rem;
    font-weight: 500;
}

.report-reason-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;

    max-height: 258px;
    overflow: auto;
    padding: 1px 4px 1px 1px;
}

.report-reason {
    display: flex;
    align-items: center;
    gap: 8px;

    min-height: 44px;
    padding: 9px 11px;

    border: 1px solid var(--border);
    border-radius: 11px;

    background: var(--surface-soft);
    color: var(--text);

    font: inherit;
    font-size: 0.79rem;
    line-height: 1.25;
    text-align: left;

    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.report-reason i {
    flex: 0 0 16px;
    color: var(--muted);
    font-size: 0.82rem;
    text-align: center;
}

.report-reason span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.report-reason:hover {
    border-color: var(--report-accent-line);
    background: var(--report-accent-soft);
    transform: translateY(-1px);
}

.report-reason[aria-pressed="true"] {
    border-color: var(--report-accent);
    background: var(--report-accent-soft);
    box-shadow: 0 0 0 1px var(--report-accent) inset;
}

.report-reason[aria-pressed="true"] i {
    color: var(--report-accent-strong);
}

.report-field-label {
    margin-top: 19px;
}

#reportDescription {
    display: block;
    width: 100%;
    min-height: 100px;
    max-height: 190px;

    padding: 12px 14px;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: var(--surface-soft);
    color: var(--text);

    font: inherit;
    font-size: 0.86rem;
    line-height: 1.55;

    resize: vertical;

    transition: border-color 0.15s, box-shadow 0.15s;
}

#reportDescription::placeholder {
    color: var(--muted);
}

#reportDescription:focus {
    outline: none;
    border-color: var(--report-accent);
    box-shadow: 0 0 0 3px var(--report-accent-soft);
}

.report-error {
    min-height: 18px;
    margin: 8px 0 0;

    color: var(--danger, #ef6570);

    font-size: 0.78rem;
    line-height: 1.4;
}

.report-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    padding: 18px 24px 24px;
}

.report-cancel,
.report-done {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 42px;
    padding: 10px 17px;

    border-radius: 11px;

    font: inherit;
    font-size: 0.84rem;
    font-weight: 650;

    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.report-cancel {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
}

.report-cancel:hover {
    background: var(--surface-soft);
    color: var(--text);
}

.report-submit,
.report-done {
    border: 1px solid var(--report-accent);
    background: linear-gradient(135deg, var(--report-accent), var(--report-accent-strong));
    color: #03201b;

    font-weight: 760;

    box-shadow: 0 10px 28px rgba(45, 212, 191, 0.2);
}

.report-submit:hover,
.report-done:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.report-submit:disabled {
    opacity: 0.62;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

.report-success {
    padding: 42px 30px 34px;
    text-align: center;
}

.report-success-icon {
    display: grid;
    place-items: center;

    width: 68px;
    height: 68px;
    margin: 0 auto 18px;

    border: 1px solid var(--report-accent-line);
    border-radius: 50%;

    background: radial-gradient(circle, var(--report-accent-soft), rgba(45, 212, 191, 0.04));
    color: var(--report-accent-strong);

    font-size: 26px;

    box-shadow: 0 0 46px rgba(45, 212, 191, 0.18);
}

.report-success h2 {
    margin: 0 0 8px;

    font-size: 1.42rem;
    letter-spacing: -0.03em;
}

.report-success p {
    max-width: 390px;
    margin: 0 auto 24px;

    color: var(--muted);

    font-size: 0.87rem;
    line-height: 1.65;
}

@keyframes reportFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes reportRise {
    from { opacity: 0; transform: translateY(12px) scale(0.985); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 560px) {
    .report-header {
        padding: 20px 18px 0;
    }

    .report-body {
        padding: 18px 18px 0;
    }

    .report-actions {
        padding: 16px 18px 20px;
    }

    .report-reason-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: 300px;
    }

    .report-heading h2 {
        font-size: 1.22rem;
    }
}

@media (max-width: 400px) {
    .report-reason-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .report-overlay,
    .report-box {
        animation: none;
    }

    .report-reason,
    .report-submit,
    .report-cancel,
    .report-done {
        transition: none;
    }
}
