/*
 * VC Helpdesk – front end.
 * The client theme sets the look through these custom properties:
 *   --vc-accent, --vc-on-accent, --vc-ink, --vc-surface, --vc-border, --vc-radius, --vc-focus
 */
.vc-helpdesk {
	--vc-helpdesk-accent: var(--vc-accent, #0f5e63);
	--vc-helpdesk-on-accent: var(--vc-on-accent, #fff);
	--vc-helpdesk-ink: var(--vc-ink, #1b2a2f);
	--vc-helpdesk-surface: var(--vc-surface, #fffbf5);
	--vc-helpdesk-border: var(--vc-border, #1b2a2f);
	--vc-helpdesk-radius: var(--vc-radius, 14px);
	--vc-helpdesk-focus: var(--vc-focus, #b45309);

	box-sizing: border-box;
	color: var(--vc-helpdesk-ink);
	max-width: 46rem;
}

.vc-helpdesk *,
.vc-helpdesk *::before,
.vc-helpdesk *::after {
	box-sizing: border-box;
}

.vc-helpdesk__heading {
	margin: 0 0 0.5rem;
}

.vc-helpdesk__intro {
	margin: 0 0 1rem;
}

.vc-helpdesk__label,
.vc-helpdesk__ticket label,
.vc-helpdesk__reply label {
	display: block;
	font-weight: 700;
	margin: 0 0 0.25rem;
}

.vc-helpdesk__row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.vc-helpdesk__input,
.vc-helpdesk__field {
	background: var(--vc-helpdesk-surface);
	border: 2px solid var(--vc-helpdesk-border);
	border-radius: var(--vc-helpdesk-radius);
	color: inherit;
	font: inherit;
	min-height: 44px;
	padding: 0.5rem 0.875rem;
	width: 100%;
}

.vc-helpdesk__row .vc-helpdesk__input,
.vc-helpdesk__row .vc-helpdesk__field {
	flex: 1 1 14rem;
	width: auto;
}

.vc-helpdesk__field + label,
.vc-helpdesk__ticket label:not(:first-of-type) {
	margin-top: 0.75rem;
}

textarea.vc-helpdesk__field {
	display: block;
	min-height: 6rem;
	resize: vertical;
}

.vc-helpdesk__button,
.vc-helpdesk__btn {
	background: var(--vc-helpdesk-accent);
	border: 2px solid var(--vc-helpdesk-accent);
	border-radius: 999px;
	color: var(--vc-helpdesk-on-accent);
	cursor: pointer;
	font: inherit;
	font-weight: 700;
	min-height: 44px;
	min-width: 44px;
	padding: 0.5rem 1.25rem;
}

.vc-helpdesk__btn--secondary {
	background: transparent;
	color: var(--vc-helpdesk-accent);
}

.vc-helpdesk__button:disabled,
.vc-helpdesk__btn:disabled {
	cursor: wait;
	opacity: 0.65;
}

.vc-helpdesk__input:focus-visible,
.vc-helpdesk__field:focus-visible,
.vc-helpdesk__button:focus-visible,
.vc-helpdesk__btn:focus-visible,
.vc-helpdesk__link:focus-visible,
.vc-helpdesk__close:focus-visible,
.vc-helpdesk a:focus-visible,
.vc-helpdesk [tabindex="-1"]:focus-visible {
	outline: 3px solid var(--vc-helpdesk-focus);
	outline-offset: 2px;
}

.vc-helpdesk [tabindex="-1"]:focus:not(:focus-visible) {
	outline: none;
}

.vc-helpdesk__panel {
	background: #fff;
	border: 1px solid #dce7e6;
	border-radius: var(--vc-helpdesk-radius);
	margin-top: 1rem;
	padding: 1rem 1.25rem;
}

.vc-helpdesk__panel[hidden] {
	display: none;
}

.vc-helpdesk__answer-title,
.vc-helpdesk__ticket-title {
	font-size: 0.8125rem;
	letter-spacing: 0.06em;
	margin: 0 0 0.5rem;
	text-transform: uppercase;
}

.vc-helpdesk__ticket-title {
	font-size: 1.125rem;
	letter-spacing: normal;
	text-transform: none;
}

.vc-helpdesk__answer p,
.vc-helpdesk__answer ul {
	margin: 0 0 0.75rem;
}

.vc-helpdesk__related {
	margin: 0.5rem 0 0.75rem;
}

.vc-helpdesk__related-title {
	font-size: 0.9375rem;
	margin: 0 0 0.25rem;
}

.vc-helpdesk__related-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.vc-helpdesk__link {
	background: none;
	border: 0;
	color: var(--vc-helpdesk-accent);
	cursor: pointer;
	font: inherit;
	font-weight: 700;
	min-height: 44px;
	padding: 0.5rem 0;
	text-align: left;
	text-decoration: underline;
}

.vc-helpdesk__related-list a {
	display: inline-block;
	padding: 0.5rem 0;
}

.vc-helpdesk__feedback {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.5rem;
}

.vc-helpdesk__feedback-q {
	font-weight: 700;
}

.vc-helpdesk__ticket,
.vc-helpdesk__reply {
	border-top: 1px solid #dce7e6;
	margin-top: 1rem;
	padding-top: 1rem;
}

.vc-helpdesk__ticket .vc-helpdesk__btn {
	margin-top: 0.75rem;
}

.vc-helpdesk__check {
	margin-top: 0.75rem;
}

.vc-helpdesk__privacy {
	font-size: 0.875rem;
	margin: 0.75rem 0 0;
}

.vc-helpdesk__error {
	background: #fdecea;
	border-left: 4px solid #b3261e;
	color: #7a1712;
	margin: 0 0 0.75rem;
	padding: 0.5rem 0.75rem;
}

.vc-helpdesk__thanks {
	font-weight: 700;
}

.vc-helpdesk__success {
	background: #e7f2f1;
	border-radius: var(--vc-helpdesk-radius);
	padding: 0.75rem 1rem;
}

.vc-helpdesk__success p {
	margin: 0 0 0.5rem;
}

.vc-helpdesk__fallback {
	margin: 0.75rem 0 0;
	padding-left: 1.25rem;
}

.vc-helpdesk__yours {
	font-size: 0.9375rem;
	margin: 0.75rem 0 0;
}

.vc-helpdesk__yours a {
	display: inline-block;
	padding: 0.5rem 0;
}

/* Honeypot: off-screen, not display:none, so simple bots still fill it. */
.vc-helpdesk__hp {
	height: 1px;
	left: -9999px;
	overflow: hidden;
	position: absolute;
	width: 1px;
}

/* Compact variant: answer opens in a dialog. */
.vc-helpdesk__dialog {
	background: #fff;
	border: 2px solid var(--vc-helpdesk-border);
	border-radius: var(--vc-helpdesk-radius);
	color: var(--vc-helpdesk-ink);
	max-height: 90vh;
	max-width: min(36rem, 94vw);
	overflow: auto;
	padding: 0;
	width: 100%;
}

.vc-helpdesk__dialog::backdrop {
	background: rgba(27, 42, 47, 0.6);
}

.vc-helpdesk__dialog-head {
	align-items: center;
	display: flex;
	gap: 0.5rem;
	justify-content: space-between;
	padding: 0.75rem 1rem 0;
}

.vc-helpdesk__dialog-title {
	font-size: 1.125rem;
	margin: 0;
}

.vc-helpdesk__close {
	background: none;
	border: 2px solid var(--vc-helpdesk-border);
	border-radius: 999px;
	color: inherit;
	cursor: pointer;
	font-size: 1.5rem;
	height: 44px;
	line-height: 1;
	width: 44px;
}

.vc-helpdesk__panel--dialog {
	border: 0;
	margin-top: 0;
}

.vc-helpdesk--compact .vc-helpdesk__label {
	font-size: 0.9375rem;
}

.vc-helpdesk-notice {
	background: #fff8e5;
	border-left: 4px solid #dba617;
	padding: 0.5rem 0.75rem;
}

@media (prefers-reduced-motion: reduce) {
	.vc-helpdesk * {
		animation: none !important;
		scroll-behavior: auto !important;
		transition: none !important;
	}
}
