/* VanHaven Custom Forms - frontend
   Themeable via CSS variables; defaults match VanHaven dark + orange aesthetic. */
.vhcf-wrap {
	--vhcf-accent: #F0651F;
	--vhcf-accent-2: #E8650A;
	--vhcf-bg: #1d1d1f;
	--vhcf-field-bg: #2a2a2d;
	--vhcf-border: #3a3a3e;
	--vhcf-text: #f2f2f2;
	--vhcf-muted: #9a9a9f;
	--vhcf-radius: 8px;
	--vhcf-gap: 18px;
	--vhcf-pad: 28px;
	--vhcf-label-size: 12px;
	--vhcf-input-size: 15px;
	--vhcf-font: inherit;
	--vhcf-label-transform: uppercase;
	--vhcf-btn-text: #ffffff;
	color: var(--vhcf-text);
	box-sizing: border-box;
	font-family: var(--vhcf-font);
}
.vhcf-wrap *,
.vhcf-wrap *::before,
.vhcf-wrap *::after { box-sizing: border-box; }

.vhcf-form { width: 100%; }

/* ---- Layout columns ---- */
.vhcf-cols {
	display: grid;
	grid-template-columns: 1fr;
	gap: 28px;
	background: var(--vhcf-bg);
	border: 1px solid var(--vhcf-border);
	border-radius: var(--vhcf-radius);
	padding: var(--vhcf-pad);
}
.vhcf-layout-form_image .vhcf-cols,
.vhcf-layout-form_text .vhcf-cols {
	grid-template-columns: 1fr 1fr;
	align-items: stretch;
}
.vhcf-image-left .vhcf-col-side { order: -1; }

.vhcf-col-side { display: flex; flex-direction: column; gap: 16px; }
.vhcf-side-image {
	flex: 1;
	min-height: 220px;
	border-radius: var(--vhcf-radius);
	overflow: hidden;
}
.vhcf-side-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vhcf-side-heading {
	font-size: 26px;
	line-height: 1.15;
	margin: 0 0 10px;
	color: var(--vhcf-text);
	text-transform: uppercase;
	letter-spacing: 0.01em;
}
.vhcf-side-text { color: var(--vhcf-muted); font-size: 15px; line-height: 1.6; }
.vhcf-side-text p { margin: 0 0 12px; }

@media ( max-width: 782px ) {
	.vhcf-layout-form_image .vhcf-cols,
	.vhcf-layout-form_text .vhcf-cols { grid-template-columns: 1fr; }
	.vhcf-image-left .vhcf-col-side { order: 0; }
}

/* ---- Split layout: fields divided into left/right columns inside the form ---- */
.vhcf-split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 28px;
	align-items: start;
}
.vhcf-split-left { min-width: 0; }
.vhcf-split-right { min-width: 0; display: flex; flex-direction: column; gap: var(--vhcf-gap); }

/* When stretch is on, the right column matches the left column's height and any
   dropzone inside it expands to fill that height (the Media Upload look). */
.vhcf-split-stretch .vhcf-split { align-items: stretch; }
.vhcf-split-stretch .vhcf-split-right { height: 100%; }
.vhcf-split-stretch .vhcf-split-right .vhcf-field { flex: 1; display: flex; flex-direction: column; }
.vhcf-split-stretch .vhcf-split-right .vhcf-dropzone { flex: 1; }

@media ( max-width: 782px ) {
	.vhcf-split { grid-template-columns: 1fr; }
}

.vhcf-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--vhcf-gap);
}
.vhcf-field.vhcf-col-full { grid-column: 1 / -1; }
.vhcf-field.vhcf-col-half { grid-column: span 1; }

@media ( max-width: 600px ) {
	.vhcf-grid { grid-template-columns: 1fr; }
	.vhcf-field.vhcf-col-half { grid-column: 1 / -1; }
}

.vhcf-label {
	display: block;
	font-size: var(--vhcf-label-size);
	letter-spacing: 0.08em;
	text-transform: var(--vhcf-label-transform);
	color: var(--vhcf-muted);
	margin-bottom: 8px;
	font-weight: 600;
}
.vhcf-req { color: var(--vhcf-accent); }

.vhcf-input {
	width: 100%;
	background: var(--vhcf-field-bg);
	border: 1px solid var(--vhcf-border);
	border-radius: var(--vhcf-radius);
	color: var(--vhcf-text);
	padding: 12px 14px;
	font-size: var(--vhcf-input-size);
	line-height: 1.4;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	font-family: inherit;
}
.vhcf-input::placeholder { color: var(--vhcf-muted); }
.vhcf-input:focus {
	outline: none;
	border-color: var(--vhcf-accent);
	box-shadow: 0 0 0 3px rgba(240, 101, 31, 0.18);
}
textarea.vhcf-input { resize: vertical; min-height: 110px; }

.vhcf-select {
	appearance: none;
	background-image: url( "data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239a9a9f' d='M6 8L0 0h12z'/%3E%3C/svg%3E" );
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 36px;
}

/* Choices (radio / checkbox) styled like the image cards. */
.vhcf-choices { display: flex; flex-direction: column; gap: 8px; }
.vhcf-choice {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--vhcf-field-bg);
	border: 1px solid var(--vhcf-border);
	border-radius: var(--vhcf-radius);
	padding: 12px 14px;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
	position: relative;
}
.vhcf-choice input { position: absolute; opacity: 0; pointer-events: none; }
.vhcf-choice-label { flex: 1; font-size: 15px; }
.vhcf-choice-mark { color: var(--vhcf-accent); opacity: 0; font-weight: 700; }
.vhcf-choice:has( input:checked ) {
	border-color: var(--vhcf-accent);
	background: rgba(240, 101, 31, 0.06);
}
.vhcf-choice:has( input:checked ) .vhcf-choice-mark { opacity: 1; }

.vhcf-file {
	padding: 10px 14px;
	cursor: pointer;
}
.vhcf-file::file-selector-button {
	background: var(--vhcf-border);
	color: var(--vhcf-text);
	border: 0;
	border-radius: 6px;
	padding: 8px 12px;
	margin-right: 12px;
	cursor: pointer;
}

.vhcf-actions { margin-top: 22px; }
.vhcf-submit {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--vhcf-accent);
	color: var(--vhcf-btn-text);
	border: 0;
	border-radius: var(--vhcf-radius);
	padding: 14px 26px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
	width: 100%;
	justify-content: center;
	transition: background 0.15s ease, transform 0.05s ease;
}
.vhcf-btn-auto .vhcf-submit { width: auto; }
.vhcf-submit:hover { background: var(--vhcf-accent-2); }
.vhcf-submit:active { transform: translateY(1px); }
.vhcf-submit.is-loading { opacity: 0.7; cursor: progress; }
.vhcf-arrow { font-size: 15px; }

.vhcf-message { margin-top: 16px; font-size: 14px; min-height: 1em; }
.vhcf-message.vhcf-success {
	color: #7ee2a8;
	background: rgba(46, 160, 90, 0.1);
	border: 1px solid rgba(46, 160, 90, 0.3);
	padding: 12px 14px; border-radius: var(--vhcf-radius);
}
.vhcf-message.vhcf-error-msg {
	color: #ff9b8a;
	background: rgba(220, 60, 40, 0.1);
	border: 1px solid rgba(220, 60, 40, 0.3);
	padding: 12px 14px; border-radius: var(--vhcf-radius);
}

.vhcf-field.has-error .vhcf-input,
.vhcf-field.has-error .vhcf-choice { border-color: #dc3c28; }
.vhcf-error { display: block; color: #ff9b8a; font-size: 12px; margin-top: 6px; }

/* Honeypot */
.vhcf-hp { position: absolute !important; left: -9999px !important; height: 0; overflow: hidden; }

/* ---- Section headings ---- */
.vhcf-section {
	grid-column: 1 / -1;
	margin: 6px 0 -2px;
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--vhcf-text);
	font-weight: 700;
	opacity: 0.85;
}
.vhcf-section:first-child { margin-top: 0; }

/* ---- Leading icons ---- */
.vhcf-input-row { display: flex; gap: 10px; align-items: stretch; }
.vhcf-input-wrap { position: relative; flex: 1; }
.vhcf-has-icon .vhcf-icon {
	position: absolute;
	left: 13px;
	top: 50%;
	transform: translateY(-50%);
	width: 18px; height: 18px;
	color: var(--vhcf-accent);
	pointer-events: none;
}
.vhcf-has-icon .vhcf-input-wrap .vhcf-input { padding-left: 40px; }

/* ---- Inline button beside field ---- */
.vhcf-inline-btn {
	flex: 0 0 auto;
	background: transparent;
	color: var(--vhcf-text);
	border: 1px solid var(--vhcf-border);
	border-radius: var(--vhcf-radius);
	padding: 0 18px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
	transition: border-color 0.15s ease, color 0.15s ease;
}
.vhcf-inline-btn:hover { border-color: var(--vhcf-accent); color: var(--vhcf-accent); }

/* ---- Drag & drop zone ---- */
.vhcf-dropzone {
	border: 1.5px dashed var(--vhcf-border);
	border-radius: var(--vhcf-radius);
	background: var(--vhcf-field-bg);
	padding: 28px 18px;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
	position: relative;
	min-height: 160px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}
.vhcf-dropzone.is-dragover {
	border-color: var(--vhcf-accent);
	background: rgba(240, 101, 31, 0.06);
}
.vhcf-dropzone-input {
	position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer;
	/* sits behind so our click handler controls it */
	z-index: -1;
}
.vhcf-dropzone-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.vhcf-dropzone-plus {
	width: 44px; height: 44px; border-radius: 50%;
	border: 1.5px solid var(--vhcf-accent);
	background: transparent; color: var(--vhcf-accent);
	display: inline-flex; align-items: center; justify-content: center;
	cursor: pointer;
}
.vhcf-dropzone-plus svg { width: 20px; height: 20px; }
.vhcf-dropzone-text { color: var(--vhcf-muted); font-size: 14px; margin: 0; }
.vhcf-help-text { color: var(--vhcf-muted); font-size: 13px; margin: 8px 0 0; }

.vhcf-dropzone-previews {
	display: flex; flex-wrap: wrap; gap: 10px;
	margin-top: 16px; justify-content: center;
}
.vhcf-dropzone-previews:empty { margin-top: 0; }
.vhcf-preview-item {
	position: relative;
	width: 84px;
	background: var(--vhcf-bg);
	border: 1px solid var(--vhcf-border);
	border-radius: 6px;
	padding: 6px;
	display: flex; flex-direction: column; gap: 4px; align-items: center;
}
.vhcf-preview-item img {
	width: 100%; height: 56px; object-fit: cover; border-radius: 4px; display: block;
}
.vhcf-preview-ext {
	width: 100%; height: 56px; border-radius: 4px;
	display: flex; align-items: center; justify-content: center;
	background: var(--vhcf-field-bg); color: var(--vhcf-accent);
	font-size: 12px; font-weight: 700;
}
.vhcf-preview-name {
	font-size: 10px; color: var(--vhcf-muted);
	max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vhcf-preview-del {
	position: absolute; top: -7px; right: -7px;
	width: 20px; height: 20px; border-radius: 50%;
	background: var(--vhcf-accent); color: #fff; border: 0;
	cursor: pointer; line-height: 1; font-size: 14px;
	display: flex; align-items: center; justify-content: center;
}
