/**
 * Commercial Insurance Multi-Step Form — theme styles
 * -----------------------------------------------------------------------
 * Palette below is a professional navy + gold combination typical of
 * insurance-industry branding (inferred — I couldn't pull Nation One's
 * exact stylesheet). Swap the CSS custom properties in :root to match
 * their real brand colors/fonts once you have the hex codes / font
 * names, and every component below will follow automatically.
 *
 * If Nation One uses a Google Font (many Elementor sites do), enqueue
 * it alongside this stylesheet in functions.php, e.g.:
 *   wp_enqueue_style( 'cif-font', 'https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Inter:wght@400;500;600&display=swap', array(), null );
 * and update --cif-font-heading / --cif-font-body below to match.
 * -----------------------------------------------------------------------
 */

.cif-wrap {
	--cif-navy:        #0b2545;
	--cif-navy-light:  #163a63;
	--cif-navy-lighter:#f4f7fb;
	--cif-accent:      #c8973f;
	--cif-accent-dark: #a97c2e;
	--cif-bg:          #f4f6f9;
	--cif-card:        #ffffff;
	--cif-border:      #e2e6ee;
	--cif-text:        #17233a;
	--cif-text-muted:  #5c6b7f;
	--cif-success:     #1f8a4c;
	--cif-success-bg:  #eaf7ef;
	--cif-error:       #c0392b;
	--cif-error-bg:    #fdecea;
	--cif-radius:      8px;
	--cif-font-heading: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
	--cif-font-body:    'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
	font-family: var(--cif-font-body);
	color: var(--cif-text);
}

.cif-container {
	max-width: 780px;
	margin: 0 auto;
	background: var(--cif-card);
	border-radius: 12px;
	padding: 40px 44px 48px;
	box-shadow: 0 4px 24px rgba(11, 37, 69, 0.08);
}
@media (max-width: 600px) {
	.cif-container {
		padding: 28px 20px 36px;
		border-radius: 8px;
	}
}

.cif-title {
	font-family: var(--cif-font-heading);
	font-size: 28px;
	font-weight: 700;
	margin: 0 0 8px;
	color: var(--cif-navy);
	letter-spacing: -0.01em;
}
.cif-subtitle {
	color: var(--cif-text-muted);
	margin: 0 0 28px;
	font-size: 15px;
	line-height: 1.5;
}

/* Alerts */
.cif-alert {
	padding: 14px 16px;
	border-radius: 6px;
	margin-bottom: 24px;
	font-size: 14px;
}
.cif-alert-error {
	background: var(--cif-error-bg);
	color: var(--cif-error);
	border: 1px solid #f4c7c1;
}
.cif-alert-success {
	background: var(--cif-success-bg);
	color: var(--cif-success);
	border: 1px solid #bfe6cd;
	font-size: 15px;
}

/* ---------------------------------------------------------------------
 * Progress: label + bar + numbered step dots
 * ------------------------------------------------------------------- */
.cif-progress-wrap {
	margin-bottom: 36px;
}
.cif-progress-label {
	font-family: var(--cif-font-heading);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--cif-navy);
	margin-bottom: 10px;
}
.cif-progress-bar {
	height: 6px;
	background: var(--cif-border);
	border-radius: 4px;
	overflow: hidden;
}
.cif-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--cif-navy), var(--cif-accent));
	width: 14%;
	transition: width 0.35s ease;
}

.cif-step-dots {
	display: flex;
	justify-content: space-between;
	margin-top: 18px;
	position: relative;
}
.cif-step-dots::before {
	content: '';
	position: absolute;
	top: 15px;
	left: 15px;
	right: 15px;
	height: 2px;
	background: var(--cif-border);
	z-index: 0;
}
.cif-dot {
	position: relative;
	z-index: 1;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: 2px solid var(--cif-border);
	background: var(--cif-card);
	color: var(--cif-text-muted);
	font-family: var(--cif-font-heading);
	font-size: 12px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: default;
	transition: all 0.2s ease;
	padding: 0;
	flex-shrink: 0;
}
.cif-dot-active {
	border-color: var(--cif-navy);
	background: var(--cif-navy);
	color: #fff;
	box-shadow: 0 0 0 4px rgba(11, 37, 69, 0.12);
}
.cif-dot-done {
	border-color: var(--cif-accent);
	background: var(--cif-accent);
	color: #fff;
	cursor: pointer;
}
.cif-dot-done:hover {
	background: var(--cif-accent-dark);
}
@media (max-width: 600px) {
	.cif-step-dots {
		display: none; /* progress bar + text label carry this on small screens */
	}
}

/* Steps */
.cif-step-title {
	font-family: var(--cif-font-heading);
	font-size: 21px;
	font-weight: 700;
	color: var(--cif-navy);
	margin: 0 0 22px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--cif-navy-lighter);
}
.cif-subsection-title {
	font-family: var(--cif-font-heading);
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--cif-navy-light);
	margin: 26px 0 14px;
}

fieldset.cif-step {
	border: 0;
	padding: 0;
	margin: 0;
	animation: cif-fade-in 0.25s ease;
}
@keyframes cif-fade-in {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* Fields */
.cif-field {
	margin-bottom: 18px;
}
.cif-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--cif-navy);
	margin-bottom: 6px;
}
.cif-field-note {
	font-size: 12px;
	color: var(--cif-text-muted);
	margin: 4px 0 10px;
}
.req {
	color: var(--cif-error);
}

.cif-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}
.cif-row-3 {
	grid-template-columns: 1fr 1fr 1fr;
}
@media (max-width: 600px) {
	.cif-row,
	.cif-row-3 {
		grid-template-columns: 1fr;
	}
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
	width: 100%;
	padding: 13px 14px;
	font-size: 15px;
	font-family: var(--cif-font-body);
	border: 1.5px solid var(--cif-border);
	border-radius: 6px;
	background: #fbfcfe;
	box-sizing: border-box;
	color: var(--cif-text);
	min-height: 46px; /* comfortable touch target */
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea {
	resize: vertical;
	min-height: 90px;
}
input:focus,
select:focus,
textarea:focus {
	outline: none;
	border-color: var(--cif-navy);
	box-shadow: 0 0 0 3px rgba(11, 37, 69, 0.1);
	background: #fff;
}
input::placeholder,
textarea::placeholder {
	color: #9aa5b5;
}

.cif-mt {
	margin-top: 10px;
}

/* Radios / checkboxes */
.cif-radio-group,
.cif-checkbox-group {
	display: flex;
	flex-direction: column;
	gap: 4px;
	background: var(--cif-navy-lighter);
	border: 1.5px solid var(--cif-border);
	border-radius: var(--cif-radius);
	padding: 8px;
}
.cif-radio-group.cif-radio-inline {
	flex-direction: row;
	gap: 8px;
}
.cif-radio-group.cif-radio-inline .cif-radio {
	flex: 1;
	justify-content: center;
}
.cif-radio-group label{
	margin-top: 0.5rem;
}
.cif-radio,
.cif-checkbox {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	font-weight: 500;
	color: var(--cif-text);
	cursor: pointer;
	padding: 0px 5px;
	border-radius: 5px;
	transition: background 0.15s ease;
	min-height: 24px; /* + padding = comfortable tap target */
}
/*.cif-radio:hover,
.cif-checkbox:hover {
	background: #fff;
}*/
.cif-radio input,
.cif-checkbox input {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--cif-navy);
	flex-shrink: 0;
}

.cif-consent {
	background: var(--cif-navy-lighter);
	border: 1.5px solid var(--cif-border);
	border-radius: var(--cif-radius);
	padding: 4px 8px;
}
.cif-consent .cif-checkbox {
	font-weight: 600;
}
.cif-consent .cif-field-note {
	padding: 0 12px 10px;
	margin: 0;
}

/* Errors */
.cif-error {
	display: block;
	color: var(--cif-error);
	font-size: 12px;
	font-weight: 500;
	margin-top: 6px;
	min-height: 14px;
}
.cif-field-invalid input,
.cif-field-invalid select,
.cif-field-invalid textarea,
.cif-field-invalid .cif-radio-group,
.cif-field-invalid .cif-checkbox-group {
	border-color: var(--cif-error) !important;
	background: var(--cif-error-bg) !important;
}

/* Honeypot - hidden from real users */
.cif-honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------------------------------------------------------------------
 * Image upload — dropzone + previews
 * ------------------------------------------------------------------- */
.cif-dropzone {
	border: 2px dashed #c3cadb;
	border-radius: var(--cif-radius);
	background: var(--cif-navy-lighter);
	padding: 40px 20px;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.cif-dropzone:hover,
.cif-dropzone:focus {
	border-color: var(--cif-navy);
	outline: none;
	background: #eef2f8;
}
.cif-dropzone-active {
	border-color: var(--cif-accent);
	background: #fbf5e9;
}
.cif-dropzone-icon {
	color: var(--cif-navy-light);
	margin-bottom: 10px;
}
.cif-dropzone-text {
	margin: 4px 0 2px;
	font-size: 15px;
	color: var(--cif-text);
}
.cif-dropzone-text strong {
	color: var(--cif-navy);
}
.cif-dropzone-sub {
	margin: 0;
	font-size: 12px;
	color: var(--cif-text-muted);
}

.cif-image-previews {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 12px;
	margin-top: 16px;
}
.cif-preview-card {
	position: relative;
	border: 1px solid var(--cif-border);
	border-radius: 6px;
	overflow: hidden;
	background: var(--cif-navy-lighter);
}
.cif-preview-card img {
	width: 100%;
	height: 100px;
	object-fit: cover;
	display: block;
}
.cif-preview-remove {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: none;
	background: rgba(11, 37, 69, 0.75);
	color: #fff;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.cif-preview-remove:hover {
	background: var(--cif-error);
}
.cif-preview-meta {
	font-size: 11px;
	color: var(--cif-text-muted);
	padding: 5px 7px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ---------------------------------------------------------------------
 * Nav buttons — sticky on mobile so Next/Submit is always reachable
 * ------------------------------------------------------------------- */
.cif-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 32px;
	gap: 12px;
}
.cif-btn {
	appearance: none;
	border: none;
	border-radius: 6px;
	padding: 14px 30px;
	font-size: 15px;
	font-family: var(--cif-font-heading);
	font-weight: 600;
	cursor: pointer;
	background: var(--cif-navy);
	color: #fff;
	transition: background 0.15s ease, transform 0.1s ease;
	min-height: 48px; /* touch target */
}
.cif-btn:hover {
	background: var(--cif-navy-light);
}
.cif-btn:active {
	transform: scale(0.98);
}
.cif-btn-secondary {
	background: #fff;
	color: var(--cif-navy);
	border: 1.5px solid var(--cif-border);
}
.cif-btn-secondary:hover {
	background: var(--cif-navy-lighter);
	border-color: var(--cif-navy);
}
.cif-btn-submit {
	background: var(--cif-accent);
	color: #fff;
}
.cif-btn-submit:hover {
	background: var(--cif-accent-dark);
}
.cif-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

@media (max-width: 600px) {
	.cif-nav {
		position: sticky;
		bottom: 0;
		left: 0;
		right: 0;
		background: rgba(255, 255, 255, 0.97);
		backdrop-filter: blur(6px);
		margin: 32px -20px -36px;
		padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
		border-top: 1px solid var(--cif-border);
		z-index: 5;
	}
	.cif-btn {
		flex: 1;
		padding: 14px 16px;
	}
}


form#cif-form {
    text-align: left;
}