@layer reset, base, components, utilities, site, states;

@layer components {
	.menu-center.form-client-r.report-dialog {
		--report-accent: #159b70;
		--report-accent-strong: #08795c;
		--report-ink: #18312b;
		--report-on-dark: #fff;
		--report-surface: #fff;

		position: fixed;
		top: 50%;
		left: 50%;
		z-index: 1002;
		flex-direction: column;
		width: min(46rem, calc(100vw - 2rem));
		max-height: min(52rem, calc(100dvh - 2rem));
		margin: 0;
		padding: 0;
		overflow: hidden;
		transform: translate(-50%, -50%);
		border: 1px solid #dce6e2;
		border-radius: 1.1rem;
		background: var(--report-surface);
		box-shadow: 0 1.5rem 4rem rgb(10 35 29 / 26%);
		color: var(--report-ink);
		text-align: left;
	}
	.menu-center.form-client-r.report-dialog > .report-dialog__close {
		position: absolute;
		top: 0.85rem;
		right: 0.85rem;
		z-index: 2;
		display: grid;
		width: 2.5rem;
		height: 2.5rem;
		margin: 0;
		padding: 0;
		place-items: center;
		border: 1px solid rgb(255 255 255 / 18%);
		border-radius: 50%;
		background: rgb(255 255 255 / 10%);
		color: var(--report-on-dark);
		font-size: 1.5rem;
		line-height: 1;
		cursor: pointer;
	}
	.report-dialog__close:hover,
	.report-dialog__close:focus-visible {
		background: rgb(255 255 255 / 20%);
		color: var(--report-on-dark);
	}
	.report-dialog__content {
		display: flex;
		min-height: 0;
		flex: 1;
		flex-direction: column;
	}
	.report-dialog__header {
		display: flex;
		flex: 0 0 auto;
		align-items: flex-start;
		gap: 1rem;
		padding: 1.5rem 4rem 1.4rem 1.5rem;
		background: linear-gradient(135deg, #0d3d32, #126750);
		color: var(--report-on-dark);
	}
	.report-dialog__header h2 {
		margin: 0.15rem 0 0.35rem;
		color: var(--report-on-dark);
		font-size: clamp(1.35rem, 3vw, 1.75rem);
		line-height: 1.15;
	}
	.report-dialog__header p:last-child {
		max-width: 35rem;
		margin: 0;
		color: rgb(255 255 255 / 78%);
		font-size: 0.88rem;
		line-height: 1.5;
	}
	.report-dialog__eyebrow {
		margin: 0;
		color: #54e0ae;
		font-size: 0.7rem;
		font-weight: 800;
		letter-spacing: 0.12em;
	}
	.report-dialog__icon {
		display: grid;
		width: 3rem;
		height: 3rem;
		flex: 0 0 3rem;
		place-items: center;
		border-radius: 0.85rem;
		background: rgb(84 224 174 / 14%);
	}
	.report-dialog__icon svg {
		width: 1.55rem;
		color: #54e0ae;
	}
	.report-dialog__body {
		display: flex;
		min-height: 0;
		flex: 1;
		flex-direction: column;
		gap: 1rem;
		padding: 1.35rem 1.5rem;
		overflow-y: auto;
	}
	.report-field {
		display: flex;
		flex-direction: column;
		gap: 0.45rem;
	}
	.report-field__label,
	.report-capture__heading,
	.report-capture__heading span {
		display: flex;
		align-items: center;
	}
	.report-field__label {
		justify-content: space-between;
		gap: 0.75rem;
	}
	.report-field label,
	.report-contact label {
		color: var(--report-ink);
		font-size: 0.86rem;
		font-weight: 750;
	}
	.report-field textarea {
		width: 100%;
		min-height: 7.5rem;
		resize: vertical;
		padding: 0.9rem 1rem;
		border: 1px solid #cddbd6;
		border-radius: 0.75rem;
		background: var(--report-surface);
		color: var(--report-ink);
		font: inherit;
		line-height: 1.5;
	}
	.report-field textarea:focus,
	.report-contact input:focus {
		border-color: var(--report-accent);
		box-shadow: 0 0 0 0.2rem rgb(21 155 112 / 14%);
	}
	.report-field small,
	.report-capture > small {
		color: #61756f;
		font-size: 0.72rem;
		line-height: 1.45;
	}
	.report-dialog .btn-help {
		display: grid;
		width: 1.45rem;
		min-width: 1.45rem;
		height: 1.45rem;
		margin-left: 0.35rem;
		padding: 0;
		place-items: center;
		border: 1px solid #b9ccc5;
		border-radius: 50%;
		background: #f4f8f6;
		color: #315b50;
		font-size: 0.72rem;
		font-weight: 800;
	}
	.report-capture {
		padding: 1rem;
		border: 1px solid #d8e4e0;
		border-radius: 0.85rem;
		background: #f7faf9;
	}
	.report-capture__heading {
		justify-content: space-between;
		gap: 0.75rem;
		margin-bottom: 0.85rem;
	}
	.report-capture__heading span {
		gap: 0.5rem;
	}
	.report-capture__heading strong {
		font-size: 0.88rem;
	}
	.report-capture__heading em {
		padding: 0.2rem 0.45rem;
		border-radius: 999px;
		background: #e1f7ef;
		color: var(--report-accent-strong);
		font-size: 0.62rem;
		font-style: normal;
		font-weight: 800;
		letter-spacing: 0.04em;
		text-transform: uppercase;
	}
	.report-capture__heading p {
		margin: 0.2rem 0 0;
		color: #61756f;
		font-size: 0.76rem;
	}
	.report-capture__empty {
		display: flex;
		min-height: 7rem;
		align-items: center;
		justify-content: center;
		flex-direction: column;
		gap: 0.45rem;
		border: 1px dashed #b8cbc4;
		border-radius: 0.7rem;
		background: var(--report-surface);
		color: #71847e;
	}
	.report-capture__empty svg {
		width: 2rem;
		color: #8ca19a;
	}
	.report-capture__empty p {
		margin: 0;
		font-size: 0.78rem;
	}
	.report-capture__preview {
		position: relative;
		margin: 0;
		overflow: hidden;
		border: 1px solid #c8d8d2;
		border-radius: 0.7rem;
		background: #17231f;
	}
	.report-capture__preview img {
		display: block;
		width: 100%;
		max-height: 16rem;
		object-fit: contain;
	}
	.report-capture__preview figcaption {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 1rem;
		padding: 0.55rem 0.7rem;
		background: var(--report-surface);
		color: #526861;
		font-size: 0.72rem;
	}
	.report-capture__preview figcaption span {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
	.report-capture__preview figcaption button {
		width: auto;
		margin: 0;
		padding: 0.25rem 0.45rem;
		border: 0;
		background: transparent;
		color: #a13434;
		font: inherit;
		font-weight: 750;
		cursor: pointer;
	}
	.report-capture__actions {
		display: flex;
		flex-wrap: wrap;
		gap: 0.6rem;
		margin: 0.75rem 0 0.45rem;
	}
	.report-button {
		display: inline-flex;
		min-height: 2.65rem;
		width: auto;
		align-items: center;
		justify-content: center;
		gap: 0.45rem;
		margin: 0;
		padding: 0.65rem 1rem;
		border: 1px solid transparent;
		border-radius: 999px;
		font: inherit;
		font-size: 0.8rem;
		font-weight: 750;
		cursor: pointer;
		transition:
			transform 0.15s ease,
			background-color 0.15s ease,
			border-color 0.15s ease;
	}
	.report-button:hover {
		transform: translateY(-1px);
	}
	.report-button:focus-visible {
		outline: 0.16rem solid #20b984;
		outline-offset: 0.15rem;
	}
	.report-button:disabled {
		cursor: wait;
		opacity: 0.62;
		transform: none;
	}
	.report-button svg {
		width: 1.15rem;
		color: currentcolor;
	}
	.report-button--capture {
		border-color: var(--report-accent);
		background: var(--report-accent);
		color: var(--report-on-dark);
	}
	.report-button--capture:hover {
		background: var(--report-accent-strong);
	}
	.report-button--upload,
	.report-button--secondary {
		border-color: #c5d5cf;
		background: var(--report-surface);
		color: #294c43;
	}
	.report-button--upload:hover,
	.report-button--secondary:hover {
		border-color: #8fb4a8;
		background: #f1f7f4;
	}
	.report-button--primary {
		background: #0d5946;
		color: var(--report-on-dark);
		box-shadow: 0 0.35rem 1rem rgb(13 89 70 / 20%);
	}
	.report-button--primary:hover {
		background: #084638;
	}
	.report-contact {
		display: grid;
		grid-template-columns: minmax(10rem, 0.8fr) minmax(18rem, 1.5fr);
		gap: 1rem;
		padding: 1rem;
		border: 1px solid #e1e8e5;
		border-radius: 0.85rem;
	}
	.report-contact strong {
		font-size: 0.86rem;
	}
	.report-contact p {
		margin: 0.2rem 0 0;
		color: #687a74;
		font-size: 0.74rem;
		line-height: 1.4;
	}
	.report-contact__fields {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.65rem;
	}
	.report-contact__fields > div {
		display: flex;
		flex-direction: column;
		gap: 0.35rem;
	}
	.report-contact input {
		width: 100%;
		min-height: 2.6rem;
		padding: 0.55rem 0.7rem;
		border: 1px solid #cddbd6;
		border-radius: 0.6rem;
		font: inherit;
	}
	.report-context-note {
		display: flex;
		align-items: flex-start;
		gap: 0.45rem;
		margin: 0;
		color: #60736d;
		font-size: 0.7rem;
		line-height: 1.45;
	}
	.report-context-note svg {
		width: 1rem;
		flex: 0 0 1rem;
		color: #60736d;
	}
	.report-dialog__message {
		display: none;
		margin: 0;
		padding: 0.7rem 0.85rem;
		border-radius: 0.6rem;
		background: #fff0ee;
		color: #8c3028;
		font-size: 0.78rem;
	}
	.report-dialog__message:not(:empty) {
		display: block;
	}
	.report-dialog__actions {
		display: flex;
		flex: 0 0 auto;
		justify-content: flex-end;
		gap: 0.65rem;
		padding: 1rem 1.5rem;
		border-top: 1px solid #e4ebe8;
		background: #fbfcfc;
	}
	.report-dialog__success {
		display: flex;
		min-height: 28rem;
		align-items: center;
		justify-content: center;
		flex-direction: column;
		padding: 3rem 2rem;
		text-align: center;
	}
	.report-dialog__success > span {
		display: grid;
		width: 4rem;
		height: 4rem;
		margin-bottom: 1.15rem;
		place-items: center;
		border-radius: 50%;
		background: #dff7ed;
		color: var(--report-accent-strong);
		font-size: 2rem;
		font-weight: 800;
	}
	.report-dialog__success h2 {
		margin: 0.25rem 0 0.55rem;
		color: #173c32;
		font-size: 1.65rem;
	}
	.report-dialog__success > p:not(.report-dialog__eyebrow) {
		max-width: 30rem;
		margin: 0 0 1.5rem;
		color: #5d716b;
		line-height: 1.55;
	}

	@media (width <= 640px) {
		.menu-center.form-client-r.report-dialog {
			width: 100%;
			max-height: 100dvh;
			height: 100dvh;
			border: 0;
			border-radius: 0;
		}
		.report-dialog__header {
			padding: 1.2rem 3.75rem 1.15rem 1rem;
		}
		.report-dialog__icon {
			display: none;
		}
		.report-dialog__body {
			padding: 1rem;
		}
		.report-contact,
		.report-contact__fields {
			grid-template-columns: 1fr;
		}
		.report-dialog__actions {
			padding: 0.8rem 1rem calc(0.8rem + env(safe-area-inset-bottom));
		}
		.report-dialog__actions .report-button {
			flex: 1;
		}
	}

	@media (prefers-reduced-motion: reduce) {
		.report-button {
			transition: none;
		}
	}
}
