/**
 * simplydwell/hubspot-form — front-end styles.
 *
 * A CLONE of blocks/contact-band/style.css. The section, header, advisor cards, form panel
 * and responsive rules are copied verbatim, class names included (.cu-*), so the two blocks
 * are the same component with a different form provider underneath. The block ships its own
 * copy rather than depending on contact-band's, because a block stylesheet is only enqueued
 * when that block is on the page — sharing the file would make this block's appearance
 * depend on whether an unrelated block happens to be present, and editing contact-band's
 * file would risk changing contact-band.
 *
 * The only adapted section is the form overrides at the bottom: the selectors are prefixed
 * with THIS block's wrapper class, and HubSpot's structural classes are paired with the
 * Gravity Forms ones so a HubSpot form renders with the identical treatment — underlined
 * text inputs, uppercase micro-labels, the bordered textarea, the chevron select, and the
 * white orange-outlined pill submit. The .cu-right input[type=...] rules already match
 * HubSpot's inputs unchanged, because HubSpot renders real inputs of the same types.
 */

/* ── Section ─────────────────────────────────────────────────────────────── */
.cu-section {
	background: #f5f0e8;
	padding: clamp(48px, 9vw, 120px) clamp(24px, 6vw, 120px);	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 64px;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.cu-header {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 32px;
	text-align: center;
	width: 100%;
	max-width: 794px;
}

.cu-eyebrow {
	margin: 0;
	font-size: 18px;
	line-height: 1.4;
	font-weight: 700;
	letter-spacing: 0.2em;
	color: #c8922a;
	text-transform: uppercase;
}

.cu-headline {
	margin: 0;
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
	font-size: clamp(32px, 3.8vw, 60px);
	font-weight: 800;
	line-height: 1;
}

.cu-headline__plain {
	color: var(--sd-color-dark)
}

.cu-headline__accent {
	background: var(--sd-gradient-brand, linear-gradient(90deg, #ea6e24 0%, #e2bb61 100%));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.cu-divider {
	width: 48px;
	height: 3px;
	background: #c8922a;
}

/* ── Body (two-column) ───────────────────────────────────────────────────── */
.cu-body {
	display: flex;
	flex-direction: row;
	gap: 15%;
	align-items: flex-start;
	width: 100%;
}

/* ── Left — advisors ─────────────────────────────────────────────────────── */
.cu-left {
	flex: 0 0 35%;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.cu-advisors-label {
	margin: 0 0 16px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.18em;
	color: #888;
	text-transform: uppercase;
}

/* Advisor card */
.cu-card {
	background: #ffffff;
	border: 1px solid #e4ddd0;
	border-radius: 6px;
	border-left: 4px solid #c8922a;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px 20px;
	margin-bottom: 16px;
	box-sizing: border-box;
}

.cu-card:last-child {
	margin-bottom: 0;
}

.cu-avatar {
	width: 72px;
	height: 72px;
	border-radius: 4px;
	object-fit: cover;
	flex-shrink: 0;
	background: #d4cfc7;
	filter: grayscale(100%);
}

.cu-avatar-placeholder {
	width: 72px;
	height: 72px;
	border-radius: 4px;
	background: #ccc;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cu-card-info {
	flex: 1;
	min-width: 0;
}

.cu-card-name {
	margin: 0 0 4px;
	font-size: 16px;
	font-weight: 700;
	color: #1e2433;
}

.cu-card-role {
	margin: 0 0 10px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	color: #888;
	text-transform: uppercase;
}

.cu-card-actions {
	display: flex;
	align-items: center;
	gap: 18px;
	flex-wrap: wrap;
}

.cu-card-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #ea6e24;
	text-decoration: none;
	transition: opacity 0.15s ease;
}

.cu-card-link:hover {
	opacity: 0.75;
	text-decoration: underline;
}

.cu-card-link svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}

/* ── Right — form ────────────────────────────────────────────────────────── */
.cu-right {
	flex: 1;
	min-width: 0;
	background: #ffffff;
	border: 1px solid #C8C8C8;
	border-radius: 6px;
	padding: 32px 36px;
	box-sizing: border-box;
}

.cu-form-notice {
	margin: 0;
	font-size: 13px;
	color: #999;
}

/* ── Form overrides (HubSpot, mirroring contact-band's Gravity Forms rules) ─ */
/* Prefix with the WP block class for higher specificity than the vendor sheet  */
.wp-block-simplydwell-hubspot-form .hs-form-html,
.wp-block-simplydwell-hubspot-form .hs-form {
	margin: 0 !important;
}

.wp-block-simplydwell-hubspot-form .hsfc-Step__Content{
	padding: 0 !important;
}

.wp-block-simplydwell-hubspot-form .hs-form-html form {
	margin: 0 !important;
}

/* Field rows — contact-band's .gform_fields gap */
.wp-block-simplydwell-hubspot-form .hs-form-html form > .hs-form-field,
.wp-block-simplydwell-hubspot-form .hs-form-html form > .hs-fieldtype-text,
.wp-block-simplydwell-hubspot-form .hs-form-html form > fieldset {
	margin: 0 0 30px !important;
	padding: 0 !important;
	max-width: none !important;
	width: 100% !important;
}

.wp-block-simplydwell-hubspot-form .hs-form-field {
	margin: 0 0 30px !important;
	padding: 0 !important;
	width: 100% !important;
	float: none !important;
}

/* HubSpot's multi-column fieldsets: one row, contact-band's 28px column gap */
.wp-block-simplydwell-hubspot-form fieldset.form-columns-2,
.wp-block-simplydwell-hubspot-form fieldset.form-columns-3 {
	display: flex !important;
	gap: 0 28px !important;
	max-width: none !important;
}

.wp-block-simplydwell-hubspot-form fieldset .hs-form-field {
	flex: 1 1 0 !important;
	width: auto !important;
}

.wp-block-simplydwell-hubspot-form .input {
	margin: 0 !important;
}

/* Field labels — contact-band's .gfield_label */
.wp-block-simplydwell-hubspot-form .hs-form-field > label,
.wp-block-simplydwell-hubspot-form .hs-form-field > legend {
	display: block !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	letter-spacing: 0.14em !important;
	text-transform: uppercase !important;
	color: #737A87 !important;
	margin: 0 0 6px !important;
}

.wp-block-simplydwell-hubspot-form .hs-form-required {
	color: #ea6e24 !important;
}

.wp-block-simplydwell-hubspot-form .hs-field-desc {
	font-size: 12px !important;
	color: #999 !important;
	margin: 4px 0 0 !important;
	padding: 0 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	font-weight: 400 !important;
}

/* Text / email / tel / number inputs.
   These are contact-band's rules unchanged — HubSpot renders real inputs of the same
   types, so the identical selector styles them without adaptation. */
.wp-block-simplydwell-hubspot-form .cu-right input[type="text"],
.wp-block-simplydwell-hubspot-form .cu-right input[type="email"],
.wp-block-simplydwell-hubspot-form .cu-right input[type="tel"],
.wp-block-simplydwell-hubspot-form .cu-right input[type="number"] {
	background: transparent !important;
	border: none !important;
	border-bottom: 1.5px solid #C8C8C8 !important;
	border-radius: 0 !important;
	padding: 6px 0 !important;
	font-size: 14px !important;
	color: #737A87 !important;
	width: 100% !important;
	box-sizing: border-box !important;
	outline: none !important;
	box-shadow: none !important;
	transition: border-color 0.2s !important;
}

/* Select */
.wp-block-simplydwell-hubspot-form .cu-right select {
	background-color: #fff !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 4px center !important;
	border: 1px solid #C8C8C8 !important;
	border-radius: 3px !important;
	padding: 9px 32px 9px 10px !important;
	font-size: 14px !important;
	color: #737A87 !important;
	width: 100% !important;
	box-sizing: border-box !important;
	outline: none !important;
	box-shadow: none !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	transition: border-color 0.2s !important;
	line-height: 30px;
}

/* Textarea */
.wp-block-simplydwell-hubspot-form .cu-right textarea {
	background: transparent !important;
	border: 1.5px solid #C8C8C8 !important;
	border-radius: 3px !important;
	padding: 10px 12px !important;
	font-size: 14px !important;
	color: #737A87 !important;
	width: 100% !important;
	min-height: 120px !important;
	box-sizing: border-box !important;
	outline: none !important;
	box-shadow: none !important;
	resize: vertical !important;
	transition: border-color 0.2s !important;
}

/* Placeholders */
.wp-block-simplydwell-hubspot-form .cu-right input::placeholder,
.wp-block-simplydwell-hubspot-form .cu-right textarea::placeholder {
	color: #737A87 !important;
}

/* Focus states */
.wp-block-simplydwell-hubspot-form .cu-right input[type="text"]:focus,
.wp-block-simplydwell-hubspot-form .cu-right input[type="email"]:focus,
.wp-block-simplydwell-hubspot-form .cu-right input[type="tel"]:focus,
.wp-block-simplydwell-hubspot-form .cu-right input[type="number"]:focus,
.wp-block-simplydwell-hubspot-form .cu-right select:focus,
.wp-block-simplydwell-hubspot-form .cu-right textarea:focus {
	border-color: #ea6e24 !important;
}

/* Checkboxes / radios — HubSpot's inputs-list, matched to the body type */
.wp-block-simplydwell-hubspot-form .cu-right ul.inputs-list {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.wp-block-simplydwell-hubspot-form .cu-right ul.inputs-list > li {
	margin: 0 0 8px !important;
}

.wp-block-simplydwell-hubspot-form .cu-right ul.inputs-list label {
	display: flex !important;
	align-items: flex-start !important;
	gap: 8px !important;
	font-size: 14px !important;
	line-height: 1.5 !important;
	font-weight: 400 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	color: #737A87 !important;
	margin: 0 !important;
}

.wp-block-simplydwell-hubspot-form .cu-right ul.inputs-list input[type="checkbox"],
.wp-block-simplydwell-hubspot-form .cu-right ul.inputs-list input[type="radio"] {
	width: auto !important;
	margin: 3px 0 0 !important;
	flex-shrink: 0 !important;
	accent-color: #ea6e24;
}

/* Submit button — contact-band's white/orange pill */
.wp-block-simplydwell-hubspot-form .hs-button,
.wp-block-simplydwell-hubspot-form input[type="submit"],
.wp-block-simplydwell-hubspot-form button[type="submit"] {
	display: block !important;
	width: 100% !important;
	padding: 16px !important;
	background: #fff !important;
	border: 2px solid #ea6e24 !important;
	border-radius: 30px !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	letter-spacing: 0.18em !important;
	color: #ea6e24 !important;
	text-transform: uppercase !important;
	cursor: pointer !important;
	text-align: center !important;
	transition: background 0.2s, color 0.2s !important;
	margin-top: 8px !important;
	box-shadow: none !important;
}

.wp-block-simplydwell-hubspot-form .hs-button:hover,
.wp-block-simplydwell-hubspot-form input[type="submit"]:hover,
.wp-block-simplydwell-hubspot-form button[type="submit"]:hover {
	background: #ea6e24 !important;
	color: #fff !important;
}

/* Submit row — contact-band's .gform_footer padding */
.wp-block-simplydwell-hubspot-form .hs_submit {
	margin: 0 !important;
	padding: 0 !important;
}

.wp-block-simplydwell-hubspot-form .hs_submit .actions {
	padding: 30px 0px !important;
	margin: 0 !important;
}

/* Hidden fields must stay hidden even if the vendor CSS is blocked. */
.wp-block-simplydwell-hubspot-form .hs-form-field input[type="hidden"],
.wp-block-simplydwell-hubspot-form .hs_submit input[type="hidden"] {
	display: none !important;
}

/* Validation / error messages — contact-band's .validation_message treatment */
.wp-block-simplydwell-hubspot-form .hs-error-msgs {
	margin: 0 !important;
	padding: 4px 0 0 !important;
	list-style: none !important;
}

.wp-block-simplydwell-hubspot-form .hs-error-msgs label,
.wp-block-simplydwell-hubspot-form .hs-error-msg,
.wp-block-simplydwell-hubspot-form .hs-main-font-element {
	font-size: 12px !important;
	padding: 0 !important;
	font-weight: 400 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	color: #c0392b !important;
}

.wp-block-simplydwell-hubspot-form .hs-form-field.hs-error input,
.wp-block-simplydwell-hubspot-form .hs-form-field.hs-error textarea,
.wp-block-simplydwell-hubspot-form .hs-input.error {
	border-color: #c0392b !important;
}

/* Success message */
.wp-block-simplydwell-hubspot-form .submitted-message,
.wp-block-simplydwell-hubspot-form .hs-form-html .submitted-message {
	margin: 0 !important;
	font-size: 14px !important;
	line-height: 1.6 !important;
	color: #737A87 !important;
}

/* ── Editor preview stand-in (render.php's REST branch) ──────────────────── */
/* Uses the same rules as a real field, so the canvas shows the real design.  */
.cu-mock {
	display: flex;
	flex-direction: column;
	gap: 30px;
}

.cu-mock__label {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #737A87;
	margin: 0 0 6px;
}

.cu-mock__input {
	display: block;
	height: 31px;
	border-bottom: 1.5px solid #C8C8C8;
}

.cu-mock__textarea {
	display: block;
	min-height: 120px;
	border: 1.5px solid #C8C8C8;
	border-radius: 3px;
}

.cu-mock__btn {
	display: block;
	width: 100%;
	padding: 16px;
	background: #fff;
	border: 2px solid #ea6e24;
	border-radius: 30px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.18em;
	color: #ea6e24;
	text-transform: uppercase;
	text-align: center;
	box-sizing: border-box;
	margin-top: 8px;
}

.cu-mock__state {
	margin: 22px 0 0;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #888;
	word-break: break-all;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
	.cu-body {
		flex-direction: column;
		gap: 40px;
	}

	.cu-left {
		flex: none;
		width: 100%;
	}
}

@media (max-width: 640px) {
	.cu-section {
		gap: 40px;
	}

	.cu-headline {
		flex-direction: column;
		gap: 4px;
	}

	.cu-right {
		padding: 24px 20px;
	}

	.wp-block-simplydwell-hubspot-form fieldset.form-columns-2,
	.wp-block-simplydwell-hubspot-form fieldset.form-columns-3 {
		flex-direction: column !important;
		gap: 0 !important;
	}
}
