/* Fönstria Prisberäknare — Calculator Styles */

/* ── Wrapper ──────────────────────────────────────────────────────────────── */
.fcalc-wrapper {
	font-family: inherit;
	max-width: 900px;
	margin: 0 auto;
	color: inherit;
}

.fcalc-title {
	font-size: 1.5rem;
	font-weight: 700;
	margin: 0 0 1.5rem;
	line-height: 1.25;
}

/* ── Two-column layout: form + visualization ──────────────────────────────── */
.fcalc-layout {
	display: grid;
	grid-template-columns: 1fr 260px;
	gap: 1.25rem;
	align-items: start;
}

@media (max-width: 700px) {
	.fcalc-layout {
		grid-template-columns: 1fr;
	}
}

/* ── Form card ────────────────────────────────────────────────────────────── */
.fcalc-form-card {
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 1.75rem;
	display: flex;
	flex-direction: column;
	gap: 1.375rem;
}

@media (max-width: 480px) {
	.fcalc-form-card {
		padding: 1.25rem;
	}
}

/* ── Visualization card ───────────────────────────────────────────────────── */
.fcalc-viz-card {
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	overflow: hidden;
	position: sticky;
	top: 100px; /* stays visible while scrolling the form */
}

.fcalc-viz-header {
	padding: 0.625rem 1rem;
	border-bottom: 1px solid #f3f4f6;
	background: #f9fafb;
}

.fcalc-viz-label {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #6b7280;
}

/* SVG window canvas */
.fcalc-window-stage {
	padding: 0.5rem;
	background: #f0f4f8;
	display: flex;
	align-items: center;
	justify-content: center;
}

.fcalc-window-stage svg {
	display: block;
	width: 100%;
	height: auto;
	max-height: 200px;
}

/* ── Quantity badges ──────────────────────────────────────────────────────── */
.fcalc-qty-row {
	padding: 0.625rem 1rem;
	border-top: 1px solid #f3f4f6;
	display: flex;
	align-items: center;
	gap: 0.25rem;
	flex-wrap: wrap;
}

.fcalc-qty-badges {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-wrap: wrap;
}

.fcalc-qty-icon {
	display: inline-flex;
}

.fcalc-qty-icon svg {
	width: 22px;
	height: 22px;
	display: block;
	border-radius: 3px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.fcalc-qty-more {
	font-size: 0.8125rem;
	font-weight: 700;
	color: #374151;
	background: #f3f4f6;
	border-radius: 4px;
	padding: 2px 6px;
}

/* ── Visualization summary ────────────────────────────────────────────────── */
.fcalc-viz-summary {
	padding: 0.625rem 1rem;
	font-size: 0.75rem;
	color: #6b7280;
	line-height: 1.5;
	border-top: 1px solid #f3f4f6;
	min-height: 2.5rem;
	word-break: break-word;
}

/* ── Form fields ──────────────────────────────────────────────────────────── */
.fcalc-field {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.fcalc-label {
	font-size: 0.875rem;
	font-weight: 600;
	color: #374151;
	display: flex;
	align-items: center;
	gap: 0.375rem;
}

.fcalc-required {
	color: #b45309;
	font-weight: 700;
}

.fcalc-optional {
	font-size: 0.72rem;
	font-weight: 400;
	color: #6b7280;
	background: #f3f4f6;
	padding: 1px 6px;
	border-radius: 4px;
}

.fcalc-field-desc {
	font-size: 0.8rem;
	color: #6b7280;
	margin: 0;
	line-height: 1.4;
}

/* Custom glasrutor input row */
.fcalc-glasses-custom-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 0.5rem;
}

.fcalc-custom-label {
	font-size: 0.8125rem;
	color: #6b7280;
	white-space: nowrap;
}

/* Innervåg field – give the label a proper pointer */
.fcalc-field--innervag label[for] {
	cursor: pointer;
}

/* ── Select ───────────────────────────────────────────────────────────────── */
.fcalc-select {
	width: 100%;
	padding: 0.5rem 2.5rem 0.5rem 0.75rem;
	border: 1.5px solid #d1d5db;
	border-radius: 8px;
	font-size: 0.9375rem;
	color: #111827;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat right 0.75rem center / 1rem;
	appearance: none;
	cursor: pointer;
	transition: border-color 0.15s;
}

.fcalc-select:focus {
	outline: none;
	border-color: #b45309;
	box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.12);
}

/* ── Stepper ──────────────────────────────────────────────────────────────── */
.fcalc-stepper {
	display: flex;
	align-items: center;
	width: fit-content;
}

.fcalc-stepper-btn {
	width: 2.25rem;
	height: 2.25rem;
	border: 1.5px solid #d1d5db;
	background: #f9fafb;
	color: #374151;
	font-size: 1.1rem;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.fcalc-stepper-btn:first-child {
	border-radius: 8px 0 0 8px;
	border-right: none;
}

.fcalc-stepper-btn:last-child {
	border-radius: 0 8px 8px 0;
	border-left: none;
}

.fcalc-stepper-btn:hover {
	background: #fffbeb;
	border-color: #b45309;
	color: #b45309;
}

.fcalc-stepper-input {
	width: 3.5rem;
	height: 2.25rem;
	border: 1.5px solid #d1d5db;
	text-align: center;
	font-size: 0.9375rem;
	font-weight: 600;
	color: #111827;
	background: #fff;
	-moz-appearance: textfield;
}

.fcalc-stepper-input::-webkit-outer-spin-button,
.fcalc-stepper-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
}

.fcalc-stepper-input:focus {
	outline: none;
	border-color: #b45309;
}

/* ── Button groups ────────────────────────────────────────────────────────── */
.fcalc-btn-group {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.fcalc-opt-btn {
	flex: 1 1 auto;
	min-width: 70px;
	padding: 0.5rem 0.625rem;
	border: 1.5px solid #d1d5db;
	border-radius: 8px;
	background: #fff;
	color: #374151;
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.2rem;
	transition: border-color 0.15s, background 0.15s, color 0.15s;
	line-height: 1.3;
}

.fcalc-opt-btn:hover {
	border-color: #b45309;
	background: #fffbeb;
}

.fcalc-opt-btn.is-active {
	border-color: #b45309;
	background: #b45309;
	color: #fff;
}

.fcalc-opt-title {
	font-weight: 600;
}

.fcalc-opt-sub {
	font-size: 0.72rem;
	opacity: 0.75;
}

.fcalc-opt-btn.is-active .fcalc-opt-sub {
	opacity: 0.9;
}

.fcalc-custom-number {
	margin-top: 0.375rem;
	padding: 0.5rem 0.75rem;
	border: 1.5px solid #d1d5db;
	border-radius: 8px;
	font-size: 0.9375rem;
	width: 100%;
	max-width: 150px;
	color: #111827;
	background: #fff;
}

.fcalc-custom-number:focus {
	outline: none;
	border-color: #b45309;
	box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.12);
}

/* ── Checkbox ─────────────────────────────────────────────────────────────── */
.fcalc-checkbox-row {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	cursor: pointer;
	font-size: 0.9375rem;
	color: #1f2937;
	font-weight: 500;
}

.fcalc-checkbox {
	width: 1.1rem;
	height: 1.1rem;
	accent-color: #b45309;
	cursor: pointer;
	flex-shrink: 0;
}

.fcalc-checkbox-text {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.fcalc-price-badge {
	font-size: 0.78rem;
	background: #fef3c7;
	color: #92400e;
	border: 1px solid #fde68a;
	border-radius: 20px;
	padding: 1px 8px;
	font-weight: 600;
}

/* ── Result panel ─────────────────────────────────────────────────────────── */
.fcalc-result {
	margin-top: 1.25rem;
	border-radius: 12px;
	background: #1c1917;
	color: #fff;
	overflow: hidden;
}

.fcalc-result-inner {
	padding: 1.75rem 2rem;
	text-align: center;
}

.fcalc-result-label {
	font-size: 0.8125rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #a8a29e;
	margin-bottom: 0.5rem;
}

.fcalc-result-price {
	font-size: 2.5rem;
	font-weight: 800;
	color: #57534e;
	line-height: 1;
	transition: color 0.25s;
}

.fcalc-result-price.fcalc-has-price {
	color: #fbbf24;
}

.fcalc-result-vat {
	margin-top: 0.375rem;
	font-size: 0.8125rem;
	color: #a8a29e;
}

.fcalc-notice {
	display: flex;
	align-items: flex-start;
	gap: 0.625rem;
	padding: 0.875rem 1.5rem;
	border-top: 1px solid rgba(255,255,255,0.08);
}

.fcalc-notice--info {
	background: rgba(251, 191, 36, 0.07);
}

.fcalc-notice-icon {
	width: 1rem;
	height: 1rem;
	flex-shrink: 0;
	margin-top: 0.125rem;
	color: #fbbf24;
}

.fcalc-notice p {
	margin: 0;
	font-size: 0.8125rem;
	color: #d6d3d1;
	line-height: 1.5;
}

.fcalc-cta-text {
	margin: 0;
	padding: 0.875rem 1.5rem;
	font-size: 0.8125rem;
	color: #a8a29e;
	border-top: 1px solid rgba(255,255,255,0.08);
	text-align: center;
}
