/* Listing reports — the "Report this listing" trigger + the shared modal.
   One modal per page (printed in wp_footer when any trigger rendered). */

/* ---- trigger: "Need it taken down? Report this event →" ----------------
   Same sentence-with-colored-CTA treatment as the events footer links, on a
   <button> so it never navigates. `.is-plain` = bare label (job board rows). */
.xtra-report-link {
	cursor: pointer;
	border: 0;
	padding: 0;
	background: transparent;
	font: inherit;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--contrast-2);
	text-align: center;
}

.xtra-report-link__cta {
	font-weight: 700;
	color: var(--wp--preset--color--primary);
	white-space: nowrap;
}

.xtra-report-link__arrow {
	display: inline-block;
	margin-left: 0.3em;
	transition: transform var(--wp--custom--transition--fast, 100ms ease);
}

.xtra-report-link:hover .xtra-report-link__cta,
.xtra-report-link:focus-visible .xtra-report-link__cta {
	color: var(--wp--preset--color--navy);
}

.xtra-report-link:hover .xtra-report-link__arrow,
.xtra-report-link:focus-visible .xtra-report-link__arrow {
	transform: translateX(3px);
}

/* ---- job page footer (events use their own .event-report block) ------- */
.xtra-report-foot {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.9rem;
	margin-top: var(--wp--preset--spacing--50);
	padding-top: var(--wp--preset--spacing--40);
	border-top: 1px solid var(--wp--preset--color--border);
	text-align: center;
}

.xtra-report-foot__promote {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--contrast-2);
	text-decoration: none;
}

.xtra-report-foot__promote:hover,
.xtra-report-foot__promote:focus-visible {
	text-decoration: none;
}

.xtra-report-foot__promote .xtra-report-link__cta {
	color: var(--wp--preset--color--primary);
}

.xtra-report-foot__promote:hover .xtra-report-link__cta,
.xtra-report-foot__promote:focus-visible .xtra-report-link__cta {
	color: var(--wp--preset--color--navy);
}

.xtra-report-foot__promote:hover .xtra-report-link__arrow,
.xtra-report-foot__promote:focus-visible .xtra-report-link__arrow {
	transform: translateX(3px);
}

/* ---- modal --------------------------------------------------------------
   House rule: closes only when a click STARTS and ENDS on the backdrop. */
.xtra-report__backdrop {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 1rem;
	background: rgba(15, 23, 42, 0.55);
	opacity: 0;
	transition: opacity 180ms ease;
}

.xtra-report.is-visible .xtra-report__backdrop {
	opacity: 1;
}

.xtra-report-open {
	overflow: hidden;
}

.xtra-report__modal {
	position: relative;
	width: 100%;
	max-width: 30rem;
	max-height: 90vh;
	overflow: auto;
	padding: clamp(1.25rem, 4vw, 1.75rem);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	border-radius: var(--wp--custom--radius--xl);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
	text-align: left;
	transform: translateY(12px);
	transition: transform 180ms ease;
}

.xtra-report.is-visible .xtra-report__modal {
	transform: none;
}

.xtra-report__close {
	position: absolute;
	top: 0.6rem;
	right: 0.75rem;
	cursor: pointer;
	border: 0;
	padding: 0.2rem 0.4rem;
	background: transparent;
	font-size: 1.6rem;
	line-height: 1;
	color: var(--wp--preset--color--contrast-3);
}

.xtra-report__close:hover {
	color: var(--wp--preset--color--contrast);
}

.xtra-report__title {
	margin: 0 0 0.2rem;
	padding-right: 2rem;
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--navy);
}

.xtra-report__listing {
	margin: 0 0 0.75rem;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--contrast-2);
}

.xtra-report__intro {
	margin: 0 0 1rem;
	padding: 0.6rem 0.75rem;
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--border-light);
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--contrast-2);
	line-height: 1.45;
}

.xtra-report__edit-link {
	font-weight: 700;
	color: var(--wp--preset--color--primary);
	text-decoration: none;
	white-space: nowrap;
}

.xtra-report__edit-link:hover {
	color: var(--wp--preset--color--navy);
}

.xtra-report__q {
	margin: 0 0 0.5rem;
	font-weight: 700;
	font-size: var(--wp--preset--font-size--small);
}

.xtra-report__choices {
	display: grid;
	gap: 0.4rem;
	margin-bottom: 1rem;
}

.xtra-report__choice {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.55rem 0.75rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--md);
	cursor: pointer;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.3;
}

.xtra-report__choice:has(input:checked) {
	border-color: var(--wp--preset--color--primary);
	background: color-mix(in srgb, var(--wp--preset--color--primary) 8%, transparent);
	font-weight: 600;
}

.xtra-report__choice input {
	margin: 0;
	flex: 0 0 auto;
	accent-color: var(--wp--preset--color--primary);
}

.xtra-report__label,
.xtra-report__field span {
	display: block;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
	margin-bottom: 0.3rem;
}

.xtra-report__field span em {
	font-style: normal;
	font-weight: 400;
	color: var(--wp--preset--color--contrast-3);
}

.xtra-report__message,
.xtra-report__field input {
	width: 100%;
	box-sizing: border-box;
	font: inherit;
	font-size: var(--wp--preset--font-size--small);
	padding: 0.6rem 0.7rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

.xtra-report__message {
	resize: vertical;
}

.xtra-report__message:focus,
.xtra-report__field input:focus {
	outline: none;
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--primary) 18%, transparent);
}

.xtra-report__message[aria-invalid="true"],
.xtra-report__field input[aria-invalid="true"] {
	border-color: var(--wp--preset--color--error);
}

.xtra-report__contact {
	display: grid;
	gap: 0.6rem;
	margin-top: 0.75rem;
}

.xtra-report__field {
	display: block;
}

.xtra-report__who {
	margin: 0.5rem 0 0;
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--contrast-2);
}

.xtra-report__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.xtra-report__error {
	margin: 0.75rem 0 0;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	color: var(--wp--preset--color--error);
}

.xtra-report__actions {
	display: flex;
	gap: 0.5rem;
	margin-top: 1rem;
}

.xtra-report__submit,
.xtra-report__cancel {
	cursor: pointer;
	font: inherit;
	font-weight: 700;
	font-size: var(--wp--preset--font-size--small);
	padding: 0.6rem 1.2rem;
	border-radius: 999px;
	border: 1px solid var(--wp--preset--color--border);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--navy);
}

.xtra-report__submit {
	flex: 1 1 auto;
	background: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--base);
}

.xtra-report__submit:hover:not(:disabled) {
	background: var(--wp--preset--color--navy);
	border-color: var(--wp--preset--color--navy);
}

.xtra-report__submit:disabled {
	opacity: 0.6;
	cursor: default;
}

.xtra-report__done p {
	margin: 0 0 0.4rem;
}

@media (min-width: 640px) {
	.xtra-report__backdrop {
		align-items: center;
	}

	.xtra-report__contact {
		grid-template-columns: 1fr 1fr;
	}
}
