/*
 * Quote estimator: additions the site needs on top of the widget itself.
 *
 * The widget's own CSS (assets/qe.css) and the site mapping (assets/qe-theme.css)
 * both stay untouched by this file. It carries only the three things added here:
 * the quote reference line, the Download/Start-over controls, and the sheet the
 * browser's print-to-PDF output renders.
 *
 * Scoped to .qe-app so nothing leaks onto the rest of the page.
 */

/* ---- Quote reference, under the panel title ---- */
.qe-app .qe-ref-line {
	margin: 0 0 18px;
	padding-bottom: 14px;
	border-bottom: 1px solid rgba(255, 255, 255, .16);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .6);
}

.qe-app .qe-ref-line span {
	display: block;
	margin-top: 6px;
	font-family: "Bricolage Grotesque", sans-serif;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: none;
	color: var(--ig-gold);
}

/* ---- Download the quote / start over ---- */
.qe-app .qe-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 12px;
}

.qe-app .qe-action {
	font-family: "DM Sans", sans-serif;
	cursor: pointer;
}

.qe-app .qe-action-pdf {
	padding: 13px 18px;
	border: 1px solid rgba(255, 255, 255, .3);
	border-radius: 12px;
	background: rgba(255, 255, 255, .08);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	transition: background .15s ease, border-color .15s ease;
}

.qe-app .qe-action-pdf:hover {
	background: rgba(255, 255, 255, .18);
	border-color: rgba(255, 255, 255, .5);
}

.qe-app .qe-action-reset {
	align-self: center;
	padding: 4px 2px;
	border: 0;
	background: none;
	color: rgba(255, 255, 255, .72);
	font-size: 13px;
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.qe-app .qe-action-reset:hover {
	color: #fff;
}

.qe-app .qe-action:focus-visible {
	outline: 2px solid var(--ig-gold);
	outline-offset: 2px;
}

/* ---- Request form, in the navy summary panel ---- */
.qe-app .qe-request-form {
	margin: 20px 0 0;
	padding-top: 18px;
	border-top: 1px solid rgba(255, 255, 255, .16);
}

.qe-app .qe-form-title {
	margin: 0 0 12px;
	font-family: "Bricolage Grotesque", sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .6);
}

.qe-app .qe-field {
	display: block;
	margin-bottom: 10px;
}

.qe-app .qe-field > span {
	display: block;
	margin-bottom: 5px;
	font-size: 12px;
	font-weight: 500;
	color: rgba(255, 255, 255, .72);
}

.qe-app .qe-field > span i {
	margin-left: 4px;
	font-size: 10.5px;
	font-style: normal;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--ig-gold);
}

.qe-app .qe-field input {
	width: 100%;
	padding: 11px 12px;
	border: 1px solid rgba(255, 255, 255, .26);
	border-radius: 10px;
	background: rgba(255, 255, 255, .08);
	color: #fff;
	font-family: "DM Sans", sans-serif;
	font-size: 14px;
}

.qe-app .qe-field input:focus {
	border-color: var(--ig-gold);
	outline: 2px solid var(--ig-gold);
	outline-offset: 1px;
}

/* Bot trap: off-screen, unreachable by keyboard, invisible. */
.qe-app .qe-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.qe-app .qe-request-form .qe-cta {
	margin-top: 6px;
}

.qe-app .qe-cta[disabled] {
	cursor: default;
	filter: none;
	opacity: .55;
}

.qe-app .qe-form-status {
	margin: 10px 0 0;
	font-size: 12.5px;
	line-height: 1.5;
	color: rgba(255, 255, 255, .8);
}

.qe-app .qe-form-status:empty {
	display: none;
}

.qe-app .qe-form-status.qe-ok {
	color: var(--ig-gold);
}

.qe-app .qe-form-status.qe-error {
	color: #ffb4a8;
}

.qe-app .qe-form-status a {
	color: var(--ig-gold);
}

.qe-app .qe-form-alt {
	margin: 12px 0 0;
	font-size: 12px;
	color: rgba(255, 255, 255, .55);
}

.qe-app .qe-form-alt a {
	color: rgba(255, 255, 255, .85);
}

/* Once it is sent, the fields step aside for the confirmation. */
.qe-app .qe-request-form.qe-sent .qe-form-title,
.qe-app .qe-request-form.qe-sent .qe-field,
.qe-app .qe-request-form.qe-sent .qe-hp {
	display: none;
}

/* Hidden on screen — it exists only for the print dialog. */
.qe-print-area {
	display: none;
}

/* ---- Print-to-PDF sheet ---- */
@media print {
	/*
	 * Only the sheet is laid out for paper.
	 *
	 * The sheet is moved to a direct child of <body> when it is built (see
	 * assets/qe.js), so hiding every other child of body leaves nothing behind to
	 * occupy height. Hiding with visibility instead would conceal the page but
	 * still reserve its full document height, which is what printed as a stack of
	 * blank pages after the sheet.
	 */
	html,
	body {
		margin: 0 !important;
		padding: 0 !important;
		height: auto !important;
		overflow: visible !important;
		background: #fff !important;
	}

	body > *:not(.qe-print-area) {
		display: none !important;
	}

	.qe-print-area {
		display: block !important;
		position: static;
		width: auto;
		max-width: none;
		margin: 0;
		padding: 0;
		background: #fff;
		color: #0b2f4a;
		font-family: "DM Sans", Arial, sans-serif;
	}

	/* Keep the header with the table, and never split a row across pages. */
	.qe-print-area .qe-print-head {
		break-after: avoid;
	}

	.qe-print-area .qe-print-table tr {
		break-inside: avoid;
	}

	.qe-print-area .qe-print-head {
		display: flex;
		justify-content: space-between;
		align-items: baseline;
		gap: 24px;
		padding-top: 16px;
		border-top: 3px solid #d4a853;
		border-bottom: 2px solid #07295a;
		padding-bottom: 12px;
		margin-bottom: 22px;
	}

	.qe-print-area .qe-print-brand {
		font-family: "Bricolage Grotesque", Georgia, serif;
		font-size: 20px;
		font-weight: 800;
		letter-spacing: .14em;
		color: #07295a;
	}

	.qe-print-area .qe-print-title {
		font-family: "Bricolage Grotesque", Georgia, serif;
		font-size: 15px;
		font-weight: 700;
		color: #5b6b8c;
	}

	.qe-print-area .qe-print-meta {
		display: flex;
		gap: 48px;
		margin: 0 0 26px;
	}

	.qe-print-area .qe-print-meta div {
		margin: 0;
	}

	.qe-print-area .qe-print-meta dt {
		margin: 0 0 5px;
		font-size: 11px;
		font-weight: 600;
		letter-spacing: .09em;
		text-transform: uppercase;
		color: #5b6b8c;
	}

	.qe-print-area .qe-print-meta dd {
		margin: 0;
		font-size: 15px;
		font-weight: 700;
		color: #07295a;
	}

	.qe-print-area .qe-print-table {
		width: 100%;
		border-collapse: collapse;
		font-size: 13px;
	}

	.qe-print-area .qe-print-table th {
		padding: 0 10px 8px 0;
		border-bottom: 1px solid #e3e9f2;
		font-size: 11px;
		font-weight: 600;
		letter-spacing: .08em;
		text-transform: uppercase;
		text-align: left;
		color: #5b6b8c;
	}

	.qe-print-area .qe-print-table td {
		padding: 11px 10px 11px 0;
		border-bottom: 1px solid #e3e9f2;
		vertical-align: top;
	}

	.qe-print-area .qe-print-table tfoot td {
		padding-top: 13px;
		border-top: 2px solid #07295a;
		border-bottom: 0;
		font-size: 15px;
		font-weight: 700;
		color: #07295a;
	}

	.qe-print-area .qe-print-num {
		text-align: right;
		white-space: nowrap;
	}

	.qe-print-area .qe-print-empty {
		margin: 0 0 26px;
		font-size: 13px;
		color: #5b6b8c;
	}

	.qe-print-area .qe-print-note {
		margin: 24px 0 0;
		font-size: 11px;
		line-height: 1.6;
		color: #5b6b8c;
	}

	.qe-print-area .qe-print-foot {
		display: flex;
		gap: 26px;
		margin-top: 26px;
		padding-top: 14px;
		border-top: 1px solid #e3e9f2;
		font-size: 12px;
		font-weight: 600;
		color: #07295a;
	}

	@page {
		margin: 18mm;
	}
}
