/*!
 * QuoteFlow for Elementor — frontend stylesheet
 * Author: Shadin (https://websyner.net/)
 *
 * Sections:
 *   1. Wrapper + section primitives
 *   2. Profile Type radios + note
 *   3. Variation groups + option buttons
 *   4. Action buttons (quote / data sheet)
 *   5. Quote Summary card (contact page)
 *   6. Responsive overrides
 *
 * Visual properties (colors, padding, sizes) are mostly Elementor-controlled;
 * defaults below act as a fallback when no Elementor styles are applied.
 */

/* ============================================================
 * 1. Wrapper + section primitives
 * ============================================================ */

.qfe-wrapper {
	font-family: inherit;
	color: #1a1a1a;
	max-width: 620px;
}

.qfe-section:last-of-type {
	border-bottom: none;
}

.qfe-title {
	font-size: 20px;
	font-weight: 700;
	margin: 0 0 12px;
	line-height: 1.2;
}

.qfe-divider {
	border: 0;
	border-top: 1px solid #e6e6e6;
	height: 0;
	margin: 14px 0;
}

.qfe-empty {
	padding: 12px;
	border: 1px dashed #d9d9d9;
	color: #777;
	font-style: italic;
}

/* ============================================================
 * 2. Profile Type radios + note
 * ============================================================ */

.qfe-radios {
	display: flex;
	gap: 24px;
	flex-wrap: wrap;
}

.qfe-radio {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	user-select: none;
	font-size: 15px;
}

.qfe-radio input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	width: 0;
	height: 0;
}

.qfe-radio-mark {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid #C8102E;
	display: inline-block;
	position: relative;
	flex: 0 0 18px;
	background: #fff;
	transition: border-color .15s ease;
}

.qfe-radio-mark::after {
	content: "";
	position: absolute;
	inset: 3px;
	border-radius: 50%;
	background: transparent;
	transition: background-color .15s ease;
}

.qfe-radio input:checked + .qfe-radio-mark::after {
	background: #C8102E;
}

.qfe-radio input:focus-visible + .qfe-radio-mark {
	outline: 2px solid #1a66ff;
	outline-offset: 2px;
}

.qfe-profile-note {
	margin: 12px 0 0;
	padding: 8px 14px;
	border-left: 3px solid #C8102E;
	background: #fafafa;
	color: #555;
	font-size: 13px;
	line-height: 1.5;
	font-style: italic;
}

/* ============================================================
 * 3. Variation groups + option buttons
 * ============================================================ */

.qfe-group {
	margin-bottom: 16px;
}

.qfe-group:last-child {
	margin-bottom: 0;
}

.qfe-group-label {
	font-size: 15px;
	font-weight: 600;
	margin-bottom: 8px;
	color: #1a1a1a;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: baseline;
}

.qfe-group-name {
	font-weight: 500;
	color: #555;
}

.qfe-group-selected {
	font-weight: 700;
	color: #1a1a1a;
}

.qfe-options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.qfe-option {
	appearance: none;
	-webkit-appearance: none;
	border: 1px solid #d9d9d9;
	background: #f2f2f2;
	color: #333;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	border-radius: 4px;
	cursor: pointer;
	line-height: 1;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
	font-family: inherit;
	min-width: 56px;
	text-align: center;
}

.qfe-option:hover {
	border-color: #b3b3b3;
}

.qfe-option.is-selected {
	background: #102B55;
	border-color: #102B55;
	color: #fff;
}

.qfe-option:focus-visible {
	outline: 2px solid #1a66ff;
	outline-offset: 2px;
}

/* Editor-mode rich-text content (replaces variation buttons) */
.qfe-specs-text-content {
	color: #333;
	font-size: 15px;
	line-height: 1.6;
}

.qfe-specs-text-content > :first-child { margin-top: 0; }
.qfe-specs-text-content > :last-child  { margin-bottom: 0; }

.qfe-specs-text-content p,
.qfe-specs-text-content ul,
.qfe-specs-text-content ol {
	margin: 0 0 12px;
}

.qfe-specs-text-content ul,
.qfe-specs-text-content ol {
	padding-left: 20px;
}

.qfe-specs-text-content h1,
.qfe-specs-text-content h2,
.qfe-specs-text-content h3,
.qfe-specs-text-content h4 {
	margin: 16px 0 8px;
	line-height: 1.3;
}

.qfe-specs-text-content table {
	border-collapse: collapse;
	width: 100%;
	margin: 0 0 12px;
}

.qfe-specs-text-content th,
.qfe-specs-text-content td {
	border: 1px solid #e6e6e6;
	padding: 6px 10px;
	text-align: left;
}

/* ============================================================
 * 4. Action buttons (quote / data sheet)
 * ============================================================ */

.qfe-actions {
	display: flex;
	gap: 16px;
	margin-top: 20px;
	flex-wrap: wrap;
}

.qfe-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 28px;
	font-size: 15px;
	font-weight: 600;
	border-radius: 2px;
	border: 2px solid transparent;
	text-decoration: none;
	cursor: pointer;
	transition: opacity .15s ease, transform .05s ease;
	min-width: 180px;
	text-align: center;
	line-height: 1.2;
	font-family: inherit;
}

.qfe-btn:hover {
	opacity: .9;
}

.qfe-btn:active {
	transform: translateY(1px);
}

.qfe-btn-quote {
	background: #111;
	color: #fff;
	border-color: #111;
}

.qfe-btn-ds {
	background: transparent;
	color: #C8102E;
	border-color: #C8102E;
}

/* ============================================================
 * 5. Quote Summary card (contact page)
 * ============================================================ */

.qfe-qs {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid #e6e6e6;
	background: #fff;
	font-family: inherit;
	color: #1a1a1a;
}

.qfe-qs thead th {
	text-align: left;
	background: #f5f5f5;
	color: #6B1A1A;
	font-weight: 600;
	font-size: 14px;
	padding: 14px 18px;
	border-bottom: 1px solid #e6e6e6;
}

/*
 * Column widths and cell alignment are driven by Elementor controls.
 * Selectors below stay specificity-equal to {{WRAPPER}} .qfe-qs-* so the
 * editor's inline styles always win.
 */
.qfe-qs-th-qty,
.qfe-qs-td-qty {
	text-align: center;
}

.qfe-qs tbody td {
	padding: 18px;
	vertical-align: middle;
	border-top: 1px solid #e6e6e6;
}

.qfe-qs tbody tr:first-child td {
	border-top: none;
}

.qfe-qs-image {
	display: inline-block;
	vertical-align: middle;
	width: 72px;
	height: 72px;
	object-fit: cover;
	border: 1px solid #e6e6e6;
	background: #fafafa;
}

.qfe-qs-image-placeholder {
	display: inline-block;
	background: #f0f0f0;
}

.qfe-qs-title {
	font-size: 17px;
	font-weight: 600;
	color: #111;
	margin-bottom: 4px;
	display: block;
}

.qfe-qs-title-link {
	text-decoration: none;
	transition: color .15s ease;
}

.qfe-qs-title-link:hover,
.qfe-qs-title-link:focus {
	text-decoration: underline;
	color: #C8102E;
}

.qfe-qs-specs {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	margin-top: 6px;
	font-size: 14px;
	line-height: 1.4;
}

.qfe-qs-spec {
	display: inline-flex;
	gap: 4px;
	white-space: nowrap;
}

.qfe-qs-spec-label {
	color: #777;
	font-weight: 400;
}

.qfe-qs-spec-value {
	color: #111;
	font-weight: 700;
}

/* Editor-mode rich content inside the contact summary card */
.qfe-qs-specs-html {
	font-size: 13px;
	line-height: 1.5;
	color: #333;
	margin-top: 6px;
}

.qfe-qs-specs-html > :first-child { margin-top: 0; }
.qfe-qs-specs-html > :last-child  { margin-bottom: 0; }

.qfe-qs-specs-html p,
.qfe-qs-specs-html ul,
.qfe-qs-specs-html ol {
	margin: 0 0 6px;
}

.qfe-qs-specs-html ul,
.qfe-qs-specs-html ol {
	padding-left: 18px;
}

.qfe-qs-qty-input {
	width: 70px;
	height: 38px;
	padding: 8px 10px;
	border: 1px solid #d9d9d9;
	border-radius: 3px;
	background: #fff;
	font: inherit;
	text-align: center;
	appearance: auto;
	-moz-appearance: auto;
	-webkit-appearance: auto;
}

.qfe-qs-qty-input:focus {
	outline: 2px solid #1a66ff;
	outline-offset: 1px;
}

.qfe-qs-empty {
	padding: 16px 20px;
	border: 1px dashed #d9d9d9;
	color: #666;
	background: #fafafa;
	font-style: italic;
}

/* ============================================================
 * 6. Responsive overrides
 * ============================================================ */

@media (max-width: 480px) {
	.qfe-actions {
		flex-direction: column;
	}
	.qfe-btn {
		width: 100%;
		min-width: 0;
	}
}

@media (max-width: 600px) {
	.qfe-qs,
	.qfe-qs thead,
	.qfe-qs tbody,
	.qfe-qs tr,
	.qfe-qs th,
	.qfe-qs td {
		display: block;
		width: 100%;
	}
	.qfe-qs thead {
		display: none;
	}
	.qfe-qs tbody td {
		position: relative;
		padding: 12px 16px 12px 110px;
		border-top: 1px solid #e6e6e6;
		min-height: 56px;
	}
	.qfe-qs tbody td:first-child {
		border-top: none;
	}
	.qfe-qs tbody td[data-label]::before {
		content: attr(data-label);
		position: absolute;
		left: 16px;
		top: 12px;
		width: 86px;
		font-size: 12px;
		font-weight: 600;
		color: #6B1A1A;
		text-transform: uppercase;
		letter-spacing: .03em;
	}
	.qfe-qs-th-qty,
	.qfe-qs-td-qty,
	.qfe-qs-th-image,
	.qfe-qs-td-image {
		width: 100%;
		text-align: left;
	}
	.qfe-qs-specs {
		flex-direction: column;
		gap: 4px;
	}
}
