/**
 * Insuregroup Quote Form — front-end styles
 *
 * BEM namespace: .ig-quote
 * Palette: navy #0b2a4a / blue #0b6bcb, on a soft neutral card.
 * Self-contained: no external fonts or frameworks; inherits the theme's
 * base font stack but resets its own box model so it looks consistent
 * inside any WordPress theme.
 */

.ig-quote {
	--ig-navy: #0b2a4a;
	--ig-navy-700: #0e3358;
	--ig-blue: #0b6bcb;
	--ig-blue-600: #0a60b8;
	--ig-blue-050: #eef5fd;
	--ig-ink: #1c2b3a;
	--ig-muted: #5a6b7b;
	--ig-line: #d7dee6;
	--ig-line-soft: #e7edf3;
	--ig-bg: #ffffff;
	--ig-bg-soft: #f6f9fc;
	--ig-error: #c0392b;
	--ig-error-bg: #fdecea;
	--ig-success: #1e7e46;
	--ig-success-bg: #e8f6ee;
	--ig-radius: 12px;
	--ig-radius-sm: 8px;
	--ig-shadow: 0 1px 2px rgba(11, 42, 74, .06), 0 8px 28px rgba(11, 42, 74, .08);
	--ig-focus: 0 0 0 3px rgba(11, 107, 203, .28);

	max-width: 760px;
	margin: 0 auto;
	color: var(--ig-ink);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

.ig-quote *,
.ig-quote *::before,
.ig-quote *::after {
	box-sizing: border-box;
}

.ig-quote [hidden] {
	display: none !important;
}

/* Honeypot — visually removed but still focusable/fillable by bots. */
.ig-quote__hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------- Heading / intro ---------- */

.ig-quote__title {
	margin: 0 0 .35em;
	color: var(--ig-navy);
	font-size: 1.7rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -.01em;
}

.ig-quote__intro {
	margin: 0 0 1.5rem;
	color: var(--ig-muted);
	font-size: 1.02rem;
}

/* ---------- Notice banner (JS-driven) ---------- */

.ig-quote__notice {
	display: none;
	margin: 0 0 1.25rem;
	padding: .85rem 1rem;
	border-radius: var(--ig-radius-sm);
	border: 1px solid var(--ig-line);
	background: var(--ig-bg-soft);
	font-size: .95rem;
}

.ig-quote__notice.is-visible {
	display: block;
}

.ig-quote__notice--info {
	border-color: #c6def8;
	background: var(--ig-blue-050);
	color: var(--ig-navy-700);
}

.ig-quote__notice--success {
	border-color: #bfe6cd;
	background: var(--ig-success-bg);
	color: var(--ig-success);
}

.ig-quote__notice--error {
	border-color: #f3c6c1;
	background: var(--ig-error-bg);
	color: var(--ig-error);
}

/* ---------- Progress ---------- */

.ig-quote__progress {
	margin: 0 0 1.75rem;
}

.ig-quote__progress-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: .5rem .9rem;
	margin: 0 0 .6rem;
}

.ig-quote__step-label {
	font-size: .82rem;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--ig-muted);
}

.ig-quote__step-current {
	color: var(--ig-blue);
}

.ig-quote__step-title-live {
	font-size: .95rem;
	font-weight: 600;
	color: var(--ig-navy);
}

.ig-quote__percent {
	margin-left: auto;
	font-size: .82rem;
	font-weight: 700;
	color: var(--ig-blue);
	font-variant-numeric: tabular-nums;
}

.ig-quote__progress-track {
	height: 8px;
	border-radius: 999px;
	background: var(--ig-line-soft);
	overflow: hidden;
}

.ig-quote__progress-bar {
	height: 100%;
	width: 0;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--ig-blue), var(--ig-navy));
	transition: width .35s cubic-bezier(.4, 0, .2, 1);
}

/* ---------- Card / step ---------- */

.ig-quote__form {
	margin: 0;
}

.ig-quote__step {
	background: var(--ig-bg);
	border: 1px solid var(--ig-line);
	border-radius: var(--ig-radius);
	box-shadow: var(--ig-shadow);
	padding: 1.9rem 1.9rem 1.6rem;
	animation: ig-step-in .28s ease;
}

@keyframes ig-step-in {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	.ig-quote__step { animation: none; }
	.ig-quote__progress-bar { transition: none; }
}

.ig-quote__step-head {
	margin: 0 0 1.4rem;
	padding: 0 0 1.1rem;
	border-bottom: 1px solid var(--ig-line-soft);
}

.ig-quote__step-title {
	margin: 0;
	color: var(--ig-navy);
	font-size: 1.28rem;
	font-weight: 700;
	line-height: 1.25;
}

.ig-quote__step-intro {
	margin: .45rem 0 0;
	color: var(--ig-muted);
	font-size: .96rem;
}

/* ---------- Fields ---------- */

.ig-quote__fields {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.ig-quote__field {
	margin: 0;
}

.ig-quote__field.ig-hidden {
	display: none !important;
}

.ig-quote__label {
	display: block;
	margin: 0 0 .4rem;
	color: var(--ig-navy-700);
	font-size: .95rem;
	font-weight: 600;
}

.ig-quote__req {
	margin-left: .15em;
	color: var(--ig-error);
	font-weight: 700;
}

.ig-quote__help {
	margin: -.15rem 0 .5rem;
	color: var(--ig-muted);
	font-size: .86rem;
	line-height: 1.45;
}

/* Inputs */

.ig-quote__input,
.ig-quote__select,
.ig-quote__textarea,
.ig-quote__file {
	width: 100%;
	font: inherit;
	color: var(--ig-ink);
	background: var(--ig-bg);
	border: 1px solid var(--ig-line);
	border-radius: var(--ig-radius-sm);
	padding: .7rem .85rem;
	transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
	appearance: none;
	-webkit-appearance: none;
}

.ig-quote__input::placeholder,
.ig-quote__textarea::placeholder {
	color: #9aa8b5;
}

.ig-quote__input:hover,
.ig-quote__select:hover,
.ig-quote__textarea:hover {
	border-color: #b9c4cf;
}

.ig-quote__input:focus,
.ig-quote__select:focus,
.ig-quote__textarea:focus,
.ig-quote__file:focus,
.ig-quote__file:focus-within {
	outline: none;
	border-color: var(--ig-blue);
	box-shadow: var(--ig-focus);
	/* background-color, not the shorthand: the shorthand resets background-repeat
	   and background-position, which tiles the select caret across the field. */
	background-color: #fff;
}

.ig-quote__textarea {
	min-height: 108px;
	resize: vertical;
	line-height: 1.5;
}

/* Native select caret */
.ig-quote__select {
	padding-right: 2.5rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath fill='none' stroke='%230b2a4a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
	cursor: pointer;
}

/* File input */
.ig-quote__file {
	padding: .55rem .7rem;
	background: var(--ig-bg-soft);
	cursor: pointer;
	font-size: .92rem;
}

.ig-quote__file::-webkit-file-upload-button,
.ig-quote__file::file-selector-button {
	font: inherit;
	font-weight: 600;
	color: var(--ig-navy);
	background: #fff;
	border: 1px solid var(--ig-line);
	border-radius: 6px;
	padding: .4rem .8rem;
	margin-right: .85rem;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease;
}

.ig-quote__file::-webkit-file-upload-button:hover,
.ig-quote__file::file-selector-button:hover {
	background: var(--ig-blue-050);
	border-color: #c6def8;
}

/* ---------- Composite groups (name / address) ---------- */

.ig-quote__composite {
	display: grid;
	gap: .75rem;
}

.ig-quote__composite--name {
	grid-template-columns: 1fr 1fr;
}

/* Street address gets the full first row; suburb + postcode share the second. */
.ig-quote__composite--address {
	grid-template-columns: 1fr 1fr;
}

.ig-quote__composite--address .ig-quote__composite-item:first-child {
	grid-column: 1 / -1;
}

.ig-quote__composite-item {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.ig-quote__sublabel {
	order: 2;
	margin: .35rem 0 0;
	color: var(--ig-muted);
	font-size: .8rem;
}

/* ---------- Inline validation ---------- */

.ig-quote__error {
	display: none;
	margin: .4rem 0 0;
	color: var(--ig-error);
	font-size: .84rem;
	font-weight: 500;
}

.ig-quote__field.has-error .ig-quote__error {
	display: block;
}

.ig-quote__field.has-error .ig-quote__input,
.ig-quote__field.has-error .ig-quote__select,
.ig-quote__field.has-error .ig-quote__textarea {
	border-color: var(--ig-error);
	/* background-color, not the shorthand — see the focus rule above. */
	background-color: #fffdfd;
}

.ig-quote__field.has-error .ig-quote__input:focus,
.ig-quote__field.has-error .ig-quote__select:focus,
.ig-quote__field.has-error .ig-quote__textarea:focus {
	box-shadow: 0 0 0 3px rgba(192, 57, 43, .18);
}

/* ---------- Navigation ---------- */

.ig-quote__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin: 1.75rem 0 0;
	padding: 1.25rem 0 0;
	border-top: 1px solid var(--ig-line-soft);
}

.ig-quote__btn {
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	border-radius: var(--ig-radius-sm);
	padding: .8rem 1.5rem;
	cursor: pointer;
	border: 1px solid transparent;
	transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease, transform .05s ease;
}

.ig-quote__btn:focus-visible {
	outline: none;
	box-shadow: var(--ig-focus);
}

.ig-quote__btn:active {
	transform: translateY(1px);
}

.ig-quote__btn--back {
	color: var(--ig-navy);
	background: #fff;
	border-color: var(--ig-line);
}

.ig-quote__btn--back:hover {
	background: var(--ig-bg-soft);
	border-color: #c1ccd6;
}

.ig-quote__btn--next,
.ig-quote__btn--submit {
	color: #fff;
	background: var(--ig-blue);
	box-shadow: 0 1px 2px rgba(10, 96, 184, .35);
}

.ig-quote__btn--next:hover,
.ig-quote__btn--submit:hover {
	background: var(--ig-blue-600);
}

.ig-quote__btn--submit {
	background: var(--ig-navy);
	padding-left: 1.9rem;
	padding-right: 1.9rem;
}

.ig-quote__btn--submit:hover {
	background: var(--ig-navy-700);
}

.ig-quote__btn[disabled],
.ig-quote__btn.is-busy {
	opacity: .65;
	cursor: default;
	pointer-events: none;
}

/* ---------- Footer tools ---------- */

.ig-quote__footer-tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .5rem 1rem;
	margin: 1.1rem .2rem 0;
}

.ig-quote__autosave {
	font-size: .84rem;
	color: var(--ig-success);
	font-weight: 500;
	min-height: 1.2em;
}

.ig-quote__resume-link {
	font: inherit;
	font-size: .86rem;
	font-weight: 600;
	color: var(--ig-blue);
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ig-quote__resume-link:hover {
	color: var(--ig-navy);
}

.ig-quote__resume-link:focus-visible {
	outline: none;
	box-shadow: var(--ig-focus);
	border-radius: 4px;
}

.ig-quote__help-note {
	margin: .9rem .2rem 0;
	font-size: .86rem;
	color: var(--ig-muted);
}

.ig-quote__help-note a {
	color: var(--ig-blue);
	font-weight: 600;
}

/* ---------- Success panel ---------- */

.ig-quote__success {
	text-align: center;
	background: var(--ig-bg);
	border: 1px solid var(--ig-line);
	border-radius: var(--ig-radius);
	box-shadow: var(--ig-shadow);
	padding: 2.75rem 2rem;
}

.ig-quote__success-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 62px;
	height: 62px;
	margin: 0 auto 1.1rem;
	border-radius: 50%;
	background: var(--ig-success-bg);
	color: var(--ig-success);
	font-size: 1.9rem;
	line-height: 1;
}

.ig-quote__success h3 {
	margin: 0 0 .5rem;
	color: var(--ig-navy);
	font-size: 1.35rem;
	font-weight: 700;
}

.ig-quote__success p {
	margin: 0 auto;
	max-width: 46ch;
	color: var(--ig-muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 620px) {
	.ig-quote { font-size: 15.5px; }

	.ig-quote__step {
		padding: 1.4rem 1.2rem 1.2rem;
		border-radius: 10px;
	}

	.ig-quote__title { font-size: 1.45rem; }

	.ig-quote__composite--name,
	.ig-quote__composite--address {
		grid-template-columns: 1fr;
	}

	.ig-quote__nav {
		flex-direction: column-reverse;
		align-items: stretch;
	}

	.ig-quote__nav .ig-quote__btn {
		width: 100%;
		text-align: center;
	}

	.ig-quote__nav > span:empty {
		display: none;
	}

	.ig-quote__footer-tools {
		justify-content: center;
		text-align: center;
	}
}
