/*
 * OfficeVision Core component styles: forms, support helper, testimonials,
 * business details and illustrations. Colors follow the active theme's
 * palette tokens when available, with neutral fallbacks.
 */

.ov-form-wrap,
.ov-support,
.ov-testimonials,
.ov-info,
.ov-illustration {
	--ovc-accent: var(--wp--preset--color--accent, #155eef);
	--ovc-accent-strong: var(--wp--preset--color--accent-strong, #0f48c0);
	--ovc-heading: var(--wp--preset--color--contrast, #151b26);
	--ovc-body: var(--wp--preset--color--body, #475467);
	--ovc-surface: var(--wp--preset--color--surface, #f5f7fa);
	--ovc-border: var(--wp--preset--color--border, #dfe3ea);
	--ovc-danger: #b42318;
	--ovc-radius: 8px;
}

/* Buttons used inside components */
.ov-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	min-height: 44px;
	padding: 0.7em 1.25em;
	border: 1px solid var(--ovc-accent, #155eef);
	border-radius: var(--ovc-radius, 8px);
	background: var(--ovc-accent, #155eef);
	color: #fff;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ov-button:hover {
	background: var(--ovc-accent-strong, #0f48c0);
	border-color: var(--ovc-accent-strong, #0f48c0);
	color: #fff;
}

.ov-button:focus-visible {
	outline: 3px solid var(--ovc-accent, #155eef);
	outline-offset: 3px;
}

.ov-button--secondary {
	background: transparent;
	color: var(--ovc-accent-strong, #0f48c0);
}

.ov-button--secondary:hover {
	background: var(--ovc-surface, #f5f7fa);
	color: var(--ovc-accent-strong, #0f48c0);
}

/* Forms */
.ov-form-wrap {
	scroll-margin-top: 112px;
}

.ov-form {
	color: var(--ovc-body);
}

.ov-form__title {
	margin: 0 0 0.25rem;
	color: var(--ovc-heading);
	font-size: 1.375rem;
	line-height: 1.3;
}

.ov-form__intro {
	margin: 0 0 1.5rem;
	font-size: 0.9375rem;
}

.ov-form__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem 1.25rem;
}

.ov-field {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	min-width: 0;
}

.ov-field--message,
.ov-field--service,
.ov-field--description,
.ov-field--subject {
	grid-column: 1 / -1;
}

.ov-field label {
	color: var(--ovc-heading);
	font-size: 0.9375rem;
	font-weight: 600;
}

.ov-req {
	color: var(--ovc-danger);
	margin-left: 0.125rem;
}

.ov-optional {
	color: var(--ovc-body);
	font-weight: 400;
	margin-left: 0.25rem;
}

.ov-field__hint {
	margin: 0;
	font-size: 0.875rem;
}

.ov-field input,
.ov-field select,
.ov-field textarea {
	width: 100%;
	min-height: 46px;
	padding: 0.625rem 0.75rem;
	border: 1px solid #98a2b3;
	border-radius: 6px;
	background: #fff;
	color: var(--ovc-heading);
	font: inherit;
	font-size: 1rem;
	line-height: 1.4;
	box-sizing: border-box;
}

.ov-field textarea {
	min-height: 150px;
	resize: vertical;
}

.ov-field input:focus,
.ov-field select:focus,
.ov-field textarea:focus {
	outline: 3px solid color-mix(in srgb, var(--ovc-accent) 35%, transparent);
	outline-offset: 0;
	border-color: var(--ovc-accent);
}

.ov-field--error input,
.ov-field--error select,
.ov-field--error textarea {
	border-color: var(--ovc-danger);
	border-width: 2px;
}

.ov-field__error {
	margin: 0;
	color: var(--ovc-danger);
	font-size: 0.875rem;
	font-weight: 600;
}

.ov-field__error::before {
	content: "Error: ";
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.ov-form__trap {
	position: absolute !important;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.ov-form__footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 1.5rem;
	margin-top: 1.75rem;
}

.ov-form__note {
	margin: 0;
	font-size: 0.875rem;
	flex: 1 1 16rem;
}

.ov-form-errors {
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem;
	border: 1px solid var(--ovc-danger);
	border-left-width: 4px;
	border-radius: 6px;
	background: #fef3f2;
	color: var(--ovc-heading);
}

.ov-form-errors:focus {
	outline: 3px solid color-mix(in srgb, var(--ovc-danger) 35%, transparent);
	outline-offset: 2px;
}

.ov-form-errors__title {
	margin: 0;
	font-weight: 600;
}

.ov-form-errors ul {
	margin: 0.5rem 0 0;
	padding-left: 1.25rem;
}

.ov-form-errors a {
	color: var(--ovc-danger);
}

.ov-form-success {
	padding: 1.75rem;
	border: 1px solid var(--ovc-border);
	border-left: 4px solid #079455;
	border-radius: var(--ovc-radius);
	background: #fff;
}

.ov-form-success:focus {
	outline: 3px solid color-mix(in srgb, #079455 35%, transparent);
	outline-offset: 2px;
}

.ov-form-success__title {
	margin: 0 0 0.5rem;
	color: var(--ovc-heading);
	font-size: 1.375rem;
}

.ov-form-success__meta {
	font-size: 0.9375rem;
}

.ov-config-notice {
	margin: 0 0 1.5rem;
	padding: 0.75rem 1rem;
	border: 1px dashed #b54708;
	border-radius: 6px;
	background: #fffaeb;
	color: #7a2e0e;
	font-size: 0.9375rem;
}

.ov-notice {
	margin: 0 0 1.25rem;
	padding: 0.75rem 1rem;
	border-radius: 6px;
	background: var(--ovc-surface);
	font-size: 0.9375rem;
}

.ov-notice--warning {
	border-left: 4px solid #dc6803;
	background: #fffaeb;
	color: #7a2e0e;
}

/* Support */
.ov-support {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: start;
	color: var(--ovc-body);
}

.ov-support__title {
	margin: 0 0 0.75rem;
	color: var(--ovc-heading);
	font-size: 1.375rem;
	line-height: 1.3;
}

.ov-support__primary {
	padding: 1.75rem;
	border: 1px solid var(--ovc-border);
	border-radius: var(--ovc-radius);
	background: var(--ovc-surface);
}

.ov-support__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 1.25rem 0;
}

.ov-support__hours {
	margin: 0;
	font-size: 0.9375rem;
}

.ov-support-form__status:not(:empty) {
	margin-top: 1.25rem;
	padding: 0.875rem 1rem;
	border-left: 4px solid var(--ovc-accent);
	border-radius: 6px;
	background: var(--ovc-surface);
	color: var(--ovc-heading);
}

/* Testimonials */
.ov-testimonials__heading {
	margin: 0 0 2rem;
}

.ov-testimonials__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
	gap: 1.5rem;
}

.ov-testimonial {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 1.75rem;
	border: 1px solid var(--ovc-border);
	border-radius: var(--ovc-radius);
	background: #fff;
}

.ov-testimonial--preview {
	border-style: dashed;
	border-color: #dc6803;
}

.ov-testimonial__flag {
	align-self: flex-start;
	margin: 0 0 1rem;
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
	background: #fffaeb;
	color: #7a2e0e;
	font-size: 0.8125rem;
	font-weight: 600;
}

.ov-testimonial__quote {
	flex: 1;
	margin: 0;
	padding: 0;
	border: 0;
	color: var(--ovc-heading);
	font-size: 1.0625rem;
	line-height: 1.6;
}

.ov-testimonial__quote p {
	margin: 0 0 0.75rem;
}

.ov-testimonial__by {
	display: flex;
	flex-direction: column;
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid var(--ovc-border);
	font-size: 0.9375rem;
}

.ov-testimonial__name {
	color: var(--ovc-heading);
	font-weight: 600;
}

/* Business details */
.ov-info {
	margin: 0 0 0.5rem;
}

.ov-info__label {
	display: block;
	font-weight: 600;
}

/* Illustrations */
.ov-illustration svg {
	display: block;
	width: 100%;
	height: auto;
}

@media (max-width: 781px) {
	.ov-support {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 600px) {
	.ov-form__grid {
		grid-template-columns: 1fr;
	}

	.ov-form__footer .ov-button {
		width: 100%;
	}
}

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

/* Support ticket form */
.ov-field--urgent {
	grid-column: 1 / -1;
}

.ov-check {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	cursor: pointer;
}

.ov-field .ov-check input[type="checkbox"] {
	width: 1.15rem;
	height: 1.15rem;
	min-height: 0;
	margin: 0;
	padding: 0;
	accent-color: var(--ovc-accent);
	flex: none;
}
