/**
 * "Report an error" block: quiet footer button plus its modal dialog.
 */

.bsy-report-error {
	display: flex;
	justify-content: flex-end;
	margin: 24px 0 8px;
}

.bsy-report-error__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	border: 1px solid var(--theme-palette-color-5, #e5e7eb);
	border-radius: 8px;
	background: var(--theme-palette-color-8, #ffffff);
	color: var(--theme-palette-color-4, #475569);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.bsy-report-error__btn:hover,
.bsy-report-error__btn:focus-visible {
	border-color: var(--theme-palette-color-1, #2271b1);
	color: var(--theme-palette-color-1, #2271b1);
	background: var(--theme-palette-color-8, #ffffff);
}

.bsy-report-error__btn:focus-visible {
	outline: 2px solid var(--theme-palette-color-1, #2271b1);
	outline-offset: 2px;
}

.bsy-report-error__btn.is-reported,
.bsy-report-error__btn:disabled {
	cursor: default;
	opacity: 0.7;
}

.bsy-report-error__btn.is-reported:hover {
	border-color: var(--theme-palette-color-5, #e5e7eb);
	color: var(--theme-palette-color-4, #475569);
}

.bsy-report-error__overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(15, 23, 42, 0.55);
}

/* The markup ships with [hidden]; the flex display above must not win. */
.bsy-report-error__overlay[hidden] {
	display: none;
}

.bsy-report-error__panel {
	width: 100%;
	max-width: 480px;
	max-height: 90vh;
	overflow-y: auto;
	padding: 24px;
	border-radius: 12px;
	background: var(--theme-palette-color-8, #ffffff);
	color: var(--theme-palette-color-3, #1e293b);
	box-shadow: 0 18px 48px rgba(15, 23, 42, 0.28);
}

.bsy-report-error__panel:focus {
	outline: none;
}

.bsy-report-error__title {
	margin: 0 0 8px;
	font-size: 20px;
	line-height: 1.3;
}

.bsy-report-error__intro {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--theme-palette-color-4, #475569);
}

.bsy-report-error__label {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 600;
}

.bsy-report-error__optional {
	font-size: 12px;
	font-weight: 400;
	color: var(--theme-palette-color-4, #64748b);
}

.bsy-report-error__note {
	display: block;
	width: 100%;
	min-height: 96px;
	padding: 10px 12px;
	border: 1px solid var(--theme-palette-color-5, #e5e7eb);
	border-radius: 8px;
	background: var(--theme-palette-color-8, #ffffff);
	color: inherit;
	font: inherit;
	font-size: 14px;
	line-height: 1.5;
	resize: vertical;
}

.bsy-report-error__note:focus {
	border-color: var(--theme-palette-color-1, #2271b1);
	outline: 2px solid var(--theme-palette-color-1, #2271b1);
	outline-offset: 1px;
}

/* Honeypot: reachable by bots, invisible and untabbable for people. */
.bsy-report-error__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.bsy-report-error__status {
	min-height: 20px;
	margin: 10px 0 0;
	font-size: 13px;
	line-height: 1.5;
	color: #b91c1c;
}

.bsy-report-error__status.is-thanks {
	color: #15803d;
}

.bsy-report-error__status:empty {
	margin-top: 6px;
}

.bsy-report-error__actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 16px;
}

.bsy-report-error__cancel,
.bsy-report-error__send {
	padding: 9px 18px;
	border-radius: 8px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}

.bsy-report-error__cancel {
	border: 1px solid var(--theme-palette-color-5, #e5e7eb);
	background: transparent;
	color: var(--theme-palette-color-4, #475569);
}

.bsy-report-error__send {
	border: 1px solid var(--theme-palette-color-1, #2271b1);
	background: var(--theme-palette-color-1, #2271b1);
	color: #ffffff;
}

.bsy-report-error__cancel:focus-visible,
.bsy-report-error__send:focus-visible {
	outline: 2px solid var(--theme-palette-color-1, #2271b1);
	outline-offset: 2px;
}

.bsy-report-error__send:disabled,
.bsy-report-error__cancel:disabled {
	cursor: default;
	opacity: 0.6;
}

/* Inline "report it here" link inside the Download unavailable panel. */
.bsy-report-error__inline {
	color: var(--theme-palette-color-1, #2271b1);
	text-decoration: underline;
}

@media (max-width: 600px) {
	.bsy-report-error__overlay {
		padding: 12px;
	}

	.bsy-report-error__panel {
		padding: 18px;
		max-height: 92vh;
	}

	.bsy-report-error__actions {
		flex-direction: column-reverse;
	}

	.bsy-report-error__cancel,
	.bsy-report-error__send {
		width: 100%;
	}
}
