/* ============================================================
   Flowear Reports — front-end modal + admin moderation screen
   ============================================================ */

/* ---------- Report trigger button ---------- */
.fw-report-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, .12);
	color: inherit;
	cursor: pointer;
	opacity: .75;
	transition: background .2s, opacity .2s, color .2s, transform .15s;
}
.fw-report-btn:hover { opacity: 1; background: rgba(239, 68, 68, .16); color: #ef4444; transform: translateY(-1px); }
.fw-report-btn:active { transform: translateY(0); }
.fw-report-btn svg { pointer-events: none; }

/* Light surfaces: give it a subtle border so it stays visible */
.fw-post .fw-report-btn,
.ftsp .fw-report-btn { background: rgba(17, 17, 27, .06); }
.fw-post .fw-report-btn:hover,
.ftsp .fw-report-btn:hover { background: rgba(239, 68, 68, .14); }

/* Inline variant inside the social action bar */
.fw-actbar .fw-act--report { color: inherit; }
.fw-actbar .fw-act--report:hover,
.fw-actbar .fw-act--report:focus-visible { color: #ef4444; }

/* ---------- Modal ---------- */
.fw-report-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483600;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.fw-report-modal.is-open { display: flex; }

.fw-report-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(9, 9, 20, .62);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	animation: fwr-fade .2s ease;
}
@keyframes fwr-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fwr-pop {
	from { opacity: 0; transform: translateY(16px) scale(.97); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

.fw-report-card {
	position: relative;
	width: min(460px, 100%);
	max-height: 92vh;
	overflow-y: auto;
	border-radius: 22px;
	background: #fff;
	color: #14142b;
	box-shadow: 0 30px 80px -20px rgba(20, 10, 60, .55), 0 0 0 1px rgba(255, 255, 255, .06);
	animation: fwr-pop .26s cubic-bezier(.22, 1, .36, 1);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
	.fw-report-card { background: #17172a; color: #f2f2f7; }
}

.fw-report-head {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 20px 22px 16px;
	background: linear-gradient(135deg, #7c3aed, #a855f7 60%, #ec4899);
	color: #fff;
}
.fw-report-head-icon {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: rgba(255, 255, 255, .18);
	flex: none;
}
.fw-report-head-txt { flex: 1; min-width: 0; }
.fw-report-head-txt h3 { margin: 0; font-size: 1.06rem; font-weight: 700; color: #fff; line-height: 1.2; }
.fw-report-head-txt p { margin: 2px 0 0; font-size: .78rem; opacity: .85; }
.fw-report-close {
	position: absolute;
	top: 14px;
	right: 14px;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, .16);
	color: #fff;
	cursor: pointer;
	transition: background .2s;
}
.fw-report-close:hover { background: rgba(255, 255, 255, .3); }

.fw-report-body { padding: 18px 22px 22px; }
.fw-report-target {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
	padding: 10px 12px;
	border-radius: 12px;
	background: #f6f4ff;
	font-size: .8rem;
	color: #5b5480;
}
@media (prefers-color-scheme: dark) { .fw-report-target { background: #211f38; color: #b9b3d6; } }
.fw-report-target [hidden] { display: none; }

.fw-report-question { margin: 0 0 10px; font-size: .86rem; font-weight: 600; }

.fw-report-reasons {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-bottom: 16px;
}
@media (max-width: 420px) { .fw-report-reasons { grid-template-columns: 1fr; } }
.fw-report-reason {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border: 1px solid #e7e5f2;
	border-radius: 12px;
	background: #fbfaff;
	color: inherit;
	font-size: .82rem;
	text-align: left;
	cursor: pointer;
	transition: border-color .18s, background .18s, box-shadow .18s;
}
@media (prefers-color-scheme: dark) {
	.fw-report-reason { border-color: #2d2b45; background: #1d1c30; }
}
.fw-report-reason:hover { border-color: #c4b5fd; }
.fw-report-reason.is-on {
	border-color: #7c3aed;
	background: #f3efff;
	box-shadow: 0 0 0 1px #7c3aed inset;
}
@media (prefers-color-scheme: dark) { .fw-report-reason.is-on { background: #2a2350; } }
.fw-report-dot {
	width: 15px;
	height: 15px;
	border-radius: 999px;
	border: 2px solid #cbc7e0;
	flex: none;
	transition: border-color .18s, background .18s;
}
.fw-report-reason.is-on .fw-report-dot {
	border-color: #7c3aed;
	background: radial-gradient(circle, #7c3aed 0 45%, transparent 46%);
}
.fw-report-reason-label { line-height: 1.25; }

.fw-report-details-label { display: block; margin-bottom: 16px; }
.fw-report-details-label > span { display: block; font-size: .8rem; font-weight: 600; margin-bottom: 6px; }
.fw-report-details {
	width: 100%;
	border: 1px solid #e7e5f2;
	border-radius: 12px;
	padding: 10px 12px;
	font: inherit;
	font-size: .85rem;
	background: #fbfaff;
	color: inherit;
	resize: vertical;
	transition: border-color .18s, box-shadow .18s;
}
@media (prefers-color-scheme: dark) { .fw-report-details { border-color: #2d2b45; background: #1d1c30; } }
.fw-report-details:focus { outline: 0; border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124, 58, 237, .16); }

.fw-report-actions { display: flex; gap: 10px; justify-content: flex-end; }
.fw-report-cancel {
	border: 1px solid #e0ddec;
	background: transparent;
	color: inherit;
	border-radius: 999px;
	padding: 11px 20px;
	font-size: .85rem;
	font-weight: 600;
	cursor: pointer;
	transition: background .2s;
}
.fw-report-cancel:hover { background: #f4f2fb; }
@media (prefers-color-scheme: dark) { .fw-report-cancel:hover { background: #262442; } }

.fw-report-send {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 0;
	border-radius: 999px;
	padding: 11px 22px;
	background: linear-gradient(135deg, #7c3aed, #a855f7);
	color: #fff;
	font-size: .85rem;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 10px 24px -10px rgba(124, 58, 237, .8);
	transition: transform .15s, box-shadow .2s, opacity .2s;
}
.fw-report-send:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 30px -10px rgba(124, 58, 237, .9); }
.fw-report-send:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.fw-report-send.is-loading .fw-report-send-ic { animation: fwr-spin .8s linear infinite; }
@keyframes fwr-spin { to { transform: rotate(360deg); } }

.fw-report-done { padding: 30px 24px 28px; text-align: center; }
.fw-report-done-ic { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 999px; background: #ecfdf3; color: #16a34a; margin-bottom: 14px; }
.fw-report-done h3 { margin: 0 0 6px; font-size: 1.1rem; }
.fw-report-done p { margin: 0 0 18px; font-size: .86rem; color: #6b6785; }
@media (prefers-color-scheme: dark) { .fw-report-done p { color: #a5a1c0; } }

/* ============================================================
   Admin
   ============================================================ */
.flowear-reports-admin { --fwr-primary: #7c3aed; }
.flowear-reports-admin .fwr-title { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.flowear-reports-admin .fwr-title-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #7c3aed, #a855f7); color: #fff; }

.flowear-reports-admin .fwr-stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.flowear-reports-admin .fwr-stat { display: block; min-width: 120px; padding: 12px 18px; border-radius: 12px; background: #fff; border: 1px solid #e2e0ec; text-decoration: none; color: #3c3a52; transition: border-color .2s, transform .15s, box-shadow .2s; }
.flowear-reports-admin .fwr-stat:hover { border-color: #c4b5fd; transform: translateY(-1px); box-shadow: 0 8px 20px -14px rgba(124, 58, 237, .6); }
.flowear-reports-admin .fwr-stat.is-active { border-color: #7c3aed; box-shadow: 0 0 0 1px #7c3aed inset; }
.flowear-reports-admin .fwr-stat strong { display: block; font-size: 26px; line-height: 1.1; color: #1d1b31; }
.flowear-reports-admin .fwr-stat span { font-size: 12px; color: #6b6785; }

.flowear-reports-admin .fwr-filter { display: flex; gap: 8px; align-items: center; margin: 8px 0 14px; }
.flowear-reports-admin .fwr-bulk { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
.flowear-reports-admin .fwr-count { color: #6b6785; font-size: 12px; margin-left: auto; }

.flowear-reports-admin .fwr-table { border-radius: 10px; overflow: hidden; }
.flowear-reports-admin .fwr-type { display: inline-block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #7c3aed; background: #f3efff; border-radius: 6px; padding: 2px 7px; margin-bottom: 6px; }
.flowear-reports-admin .fwr-object { font-size: 14px; font-weight: 600; }
.flowear-reports-admin .fwr-object a { text-decoration: none; }
.flowear-reports-admin .fwr-sub { font-size: 12px; color: #6b6785; margin-top: 2px; }
.flowear-reports-admin .fwr-reason { font-weight: 600; font-size: 13px; }
.flowear-reports-admin .fwr-details { font-size: 12px; color: #6b6785; margin-top: 4px; font-style: italic; }
.flowear-reports-admin .fwr-anon { color: #6b6785; }
.flowear-reports-admin .fwr-date { font-size: 12px; color: #6b6785; white-space: nowrap; }

.flowear-reports-admin .fwr-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: capitalize; }
.flowear-reports-admin .fwr-pill--pending { background: #fef3c7; color: #92400e; }
.flowear-reports-admin .fwr-pill--reviewing { background: #dbeafe; color: #1e40af; }
.flowear-reports-admin .fwr-pill--resolved { background: #dcfce7; color: #166534; }
.flowear-reports-admin .fwr-pill--dismissed { background: #f1f0f5; color: #52525b; }
.flowear-reports-admin .fwr-badge { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.flowear-reports-admin .fwr-badge--banned { background: #fee2e2; color: #b91c1c; }

.flowear-reports-admin .fwr-actions { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.flowear-reports-admin .fwr-act { font-size: 12px; text-decoration: none; color: #2271b1; }
.flowear-reports-admin .fwr-act:hover { text-decoration: underline; }
.flowear-reports-admin .fwr-act--ok { color: #16a34a; font-weight: 600; }
.flowear-reports-admin .fwr-act--danger { color: #b91c1c; }
.flowear-reports-admin .fwr-act--muted { color: #8c8a99; }

.flowear-reports-admin .fwr-empty { text-align: center; padding: 30px 0; color: #6b6785; }
.flowear-reports-admin .fwr-settings { max-width: 720px; }

/* Responsive admin */
@media (max-width: 782px) {
	.flowear-reports-admin .fwr-table .fwr-date,
	.flowear-reports-admin .fwr-table .fwr-actions { display: none; }
}
