/**
 * Custom Enquiry — layout-only styles.
 *
 * Intentionally minimal: inherits fonts, colors, and form styling from the active theme.
 * Only structural rules (positioning, spacing, transitions) are defined here.
 */

/* Trigger button: inherit theme typography; no forced colors or backgrounds. */
.ce-trigger-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font: inherit;
	color: inherit;
	background: transparent;
	border: none;
	padding: 0;
}

/* Overlay */
.ce-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: var(--ce-overlay-z, 99998);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.ce-overlay.ce-visible {
	opacity: 1;
}

/* Slide-out drawer */
.ce-drawer {
	position: fixed;
	top: 0;
	right: 0;
	height: 100%;
	width: min(420px, 100%);
	background: var(--ce-drawer-bg, #fff);
	color: inherit;
	font: inherit;
	z-index: var(--ce-drawer-z, 99999);
	box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
	transform: translateX(100%);
	transition: transform 0.35s ease;
	display: flex;
	flex-direction: column;
}

.ce-drawer.ce-open {
	transform: translateX(0);
}

.ce-drawer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid currentColor;
	border-bottom-color: color-mix(in srgb, currentColor 15%, transparent);
	flex-shrink: 0;
}

.ce-drawer-header h3 {
	margin: 0;
	font: inherit;
	font-weight: inherit;
}

.ce-close {
	background: none;
	border: none;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	color: inherit;
	padding: 0;
	opacity: 0.7;
}

.ce-close:hover,
.ce-close:focus {
	opacity: 1;
}

.ce-drawer-body {
	padding: 1.5rem;
	overflow-y: auto;
	flex: 1;
	-webkit-overflow-scrolling: touch;
}

/* Form layout — no font/color overrides on inputs */
.ce-field {
	margin-bottom: 1rem;
}

.ce-field label {
	display: block;
	margin-bottom: 0.35rem;
	font: inherit;
}

.ce-req {
	opacity: 0.8;
}

.ce-form input,
.ce-form select,
.ce-form textarea {
	width: 100%;
	box-sizing: border-box;
	font: inherit;
	color: inherit;
}

.ce-field.ce-field-invalid input,
.ce-field.ce-field-invalid select,
.ce-field.ce-field-invalid textarea,
.ce-field.ce-field-invalid .ce-checkbox-group {
	outline: 2px solid currentColor;
	outline-offset: 2px;
	border-radius: 2px;
}

/* Category checkboxes — layout only, inherits theme styling */
.ce-checkbox-group {
	border: none;
	margin: 0;
	padding: 0;
	min-width: 0;
}

.ce-checkbox-group legend {
	padding: 0;
	margin-bottom: 0.35rem;
	font: inherit;
	font-weight: inherit;
}

.ce-checkbox-list {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
}

.ce-checkbox-item {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	cursor: pointer;
	font: inherit;
	color: inherit;
	flex: 1 1 calc(50% - 0.5rem);
	min-width: 0;
	max-width: calc(50% - 0.5rem);
	box-sizing: border-box;
}

.ce-checkbox-item input[type="checkbox"] {
	margin: 0.2em 0 0;
	flex-shrink: 0;
	width: auto;
}

.ce-checkbox-item span {
	line-height: 1.4;
}

/* Honeypot — must stay hidden from users */
.ce-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.ce-errors {
	padding: 0.75rem 1rem;
	margin-bottom: 1rem;
	border: 1px solid currentColor;
	border-color: color-mix(in srgb, currentColor 30%, transparent);
}

.ce-submit-btn {
	width: 100%;
	cursor: pointer;
}

.ce-submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.ce-thankyou {
	text-align: center;
	padding: 2.5rem 0.75rem;
}

.ce-thankyou h4 {
	margin-bottom: 0.5rem;
	font: inherit;
}

/* Body scroll lock class (applied via JS) */
body.ce-drawer-open {
	overflow: hidden;
}

/* Responsive: full-width drawer on small screens */
@media (max-width: 600px) {
	.ce-drawer {
		width: 100%;
	}

	.ce-drawer-header,
	.ce-drawer-body {
		padding: 1rem;
	}
}

@media (max-width: 480px) {
	.ce-drawer-header h3 {
		font-size: inherit;
	}
}
