/* "Report an issue" dialog (Modern.master, Scripts/sw-report-issue.js). Uses the theme's --sw-* tokens. */
#swReportOverlay {
    display: none; position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.5); z-index: 10000;
}
#swReportOverlay.show { display: block; }

#swReportModal {
    display: none; position: fixed; z-index: 10001;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 560px; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px);
    flex-direction: column;
    background: var(--sw-surface, #fff); color: var(--sw-text, #0f172a);
    border: 1px solid var(--sw-border, #e2e8f0); border-radius: 12px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    font-family: var(--sw-font, Inter, system-ui, sans-serif);
}
#swReportModal.show { display: flex; }

.swr-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--sw-border, #e2e8f0);
}
.swr-head h2 { margin: 0; font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.swr-x {
    background: transparent; border: none; border-radius: 6px; padding: 6px; cursor: pointer;
    color: var(--sw-text-muted, #64748b);
}
.swr-x:hover { background: rgba(0, 0, 0, 0.05); }

.swr-body { padding: 16px 20px; overflow-y: auto; }
.swr-foot {
    display: flex; justify-content: flex-end; gap: 8px;
    padding: 12px 20px; border-top: 1px solid var(--sw-border, #e2e8f0);
}

.swr-kinds { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.swr-kind {
    flex: 1 1 200px; display: flex; align-items: center; gap: 8px;
    border: 1px solid var(--sw-border, #e2e8f0); border-radius: 8px; padding: 10px 12px;
    cursor: pointer; font-size: 13px; font-weight: 600;
}
.swr-kind input { accent-color: var(--sw-primary, #059669); }
.swr-kind:has(input:checked) { border-color: var(--sw-primary, #059669); background: rgba(5, 150, 105, 0.06); }

.swr-label { display: block; font-size: 12px; font-weight: 700; color: var(--sw-text-muted, #64748b); margin: 0 0 4px; }
.swr-label .req { color: var(--sw-danger, #dc2626); }
.swr-input, .swr-textarea {
    width: 100%; box-sizing: border-box; font: inherit; font-size: 14px;
    color: var(--sw-text, #0f172a); background: var(--sw-surface, #fff);
    border: 1px solid var(--sw-border, #e2e8f0); border-radius: 8px; padding: 9px 11px;
}
.swr-input:focus, .swr-textarea:focus { outline: 2px solid rgba(5, 150, 105, 0.35); border-color: var(--sw-primary, #059669); }
.swr-input.invalid { border-color: var(--sw-danger, #dc2626); }
.swr-textarea { min-height: 96px; resize: vertical; }
.swr-field { margin-bottom: 14px; }
.swr-hint { font-size: 12px; color: var(--sw-text-muted, #64748b); margin: 4px 0 0; }

.swr-shot { border: 1px solid var(--sw-border, #e2e8f0); border-radius: 8px; padding: 10px; }
.swr-shot img { display: block; width: 100%; max-height: 220px; object-fit: contain; border-radius: 4px; background: #f1f5f9; }
.swr-shot-actions { display: flex; gap: 12px; margin-top: 8px; font-size: 13px; flex-wrap: wrap; }
.swr-link {
    background: none; border: none; padding: 0; cursor: pointer; font: inherit; font-size: 13px;
    color: var(--sw-primary, #059669); font-weight: 600;
}
.swr-link:hover { text-decoration: underline; }
.swr-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

.swr-error {
    margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; font-size: 13px;
    background: #fef2f2; color: #991b1b; border: 1px solid #fecaca;
}
.swr-done { text-align: center; padding: 12px 4px 4px; }
.swr-done .swr-ref {
    display: inline-block; margin: 8px 0; padding: 6px 14px; border-radius: 8px;
    font-size: 18px; font-weight: 700; letter-spacing: 0.04em;
    background: rgba(5, 150, 105, 0.1); color: var(--sw-primary-dark, #047857);
}
.swr-done p { font-size: 13px; color: var(--sw-text-muted, #64748b); margin: 4px 0; }

.swr-btn {
    display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; padding: 9px 16px;
    font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid transparent;
}
.swr-btn-primary { background: var(--sw-primary, #059669); color: #fff; }
.swr-btn-primary:hover { background: var(--sw-primary-dark, #047857); }
.swr-btn-primary:disabled { opacity: 0.6; cursor: wait; }
.swr-btn-light { background: transparent; color: var(--sw-text, #0f172a); border-color: var(--sw-border, #e2e8f0); }
.swr-btn-light:hover { background: rgba(0, 0, 0, 0.04); }
.swr-hidden { display: none !important; }

/* Top-bar button: icon and a short label; icon only on small screens. */
.sw-report-btn { width: auto; padding: 0 10px; gap: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.sw-report-btn[disabled] { opacity: 0.6; cursor: wait; }
/* A report you sent has news (My reports). A dot, not a count: it is about your own one or two reports. */
.sw-report-btn { position: relative; }
.sw-report-news {
    position: absolute; top: 2px; right: 2px; width: 9px; height: 9px; border-radius: 999px;
    background: var(--sw-primary, #16a34a); border: 2px solid #fff;
}
.swr-mine { margin-right: auto; align-self: center; font-size: 13px; font-weight: 600; color: var(--sw-primary, #16a34a); text-decoration: none; }
.swr-mine:hover { text-decoration: underline; }
@media (max-width: 1023px) { .sw-report-btn .sw-report-lbl { display: none; } .sw-report-btn { width: 36px; padding: 0; } }

html.dark .swr-error { background: rgba(220, 38, 38, 0.12); color: #fecaca; border-color: rgba(220, 38, 38, 0.4); }
html.dark .swr-shot img { background: #0f172a; }
html.dark .swr-x:hover, html.dark .swr-btn-light:hover { background: rgba(255, 255, 255, 0.06); }
