/**
 * FIRE calculator — Finansowy Lis Articles
 * Scoped to .fl-calc--fire
 */

.fl-calc.fl-calc--fire {
	--fl-calc-navy: #001a42;
	--fl-calc-orange: #eb7a02;
	--fl-calc-orange-hover: #d46d00;
	--fl-calc-text: #001a42;
	--fl-calc-muted: #6e8299;
	--fl-calc-card: #ffffff;
	--fl-calc-border: #cbd7e3;
	--fl-calc-field-bg: #f3f6fa;
	--fl-calc-radius: 12px;
	--fl-calc-radius-sm: 8px;
	--fl-calc-ok-bg: #f1fff6;
	--fl-calc-ok-border: #a7e3c0;
	--fl-calc-gap-bg: #fff7e9;
	--fl-calc-gap-border: #f5d5a0;

	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	background: transparent;
	color: var(--fl-calc-text);
}

.fl-calc.fl-calc--fire *,
.fl-calc.fl-calc--fire *::before,
.fl-calc.fl-calc--fire *::after {
	box-sizing: border-box;
}

.fl-calc.fl-calc--fire .fl-calc__panel {
	display: block;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 28px;
	border: 1px solid var(--fl-calc-border);
	border-radius: var(--fl-calc-radius);
	background: var(--fl-calc-card);
	box-shadow: 0 8px 24px rgba(0, 26, 66, 0.04);
	overflow: hidden;
	color: var(--fl-calc-text);
}

.fl-calc.fl-calc--fire .fl-calc__form {
	margin: 0;
	width: 100%;
}

.fl-calc.fl-calc--fire .fl-calc__fields--fire {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px 20px;
	width: 100%;
}

.fl-calc.fl-calc--fire .fl-calc__field {
	min-width: 0;
	width: 100%;
}

.fl-calc.fl-calc--fire .fl-calc__label,
.fl-calc.fl-calc--fire label.fl-calc__label {
	display: block;
	margin: 0 0 8px;
	color: #001a42;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.3;
}

.fl-calc.fl-calc--fire .fl-calc__control {
	display: flex;
	align-items: stretch;
	width: 100%;
	min-width: 0;
	overflow: hidden;
	border: 1px solid var(--fl-calc-border);
	border-radius: var(--fl-calc-radius-sm);
	background: var(--fl-calc-field-bg);
}

.fl-calc.fl-calc--fire .fl-calc__input,
.fl-calc.fl-calc--fire input.fl-calc__input {
	flex: 1 1 auto;
	width: 100%;
	min-width: 4.5rem;
	margin: 0;
	padding: 12px 14px;
	border: 0;
	background: transparent;
	color: #001a42;
	font: inherit;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.4;
	appearance: textfield;
	-moz-appearance: textfield;
}

.fl-calc.fl-calc--fire .fl-calc__input::placeholder {
	color: #6e8299;
	opacity: 1;
}

.fl-calc.fl-calc--fire .fl-calc__input::-webkit-outer-spin-button,
.fl-calc.fl-calc--fire .fl-calc__input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.fl-calc.fl-calc--fire .fl-calc__input:focus {
	outline: none;
	color: #001a42;
}

.fl-calc.fl-calc--fire .fl-calc__control:focus-within {
	border-color: var(--fl-calc-orange);
	box-shadow: 0 0 0 3px rgba(235, 122, 2, 0.18);
}

.fl-calc.fl-calc--fire .fl-calc__suffix {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	padding: 0 14px;
	border-left: 1px solid var(--fl-calc-border);
	color: #6e8299;
	font-size: 0.875rem;
	font-weight: 600;
	background: rgba(255, 255, 255, 0.65);
}

.fl-calc.fl-calc--fire .fl-calc__error {
	margin: 14px 0 0;
	padding: 10px 12px;
	border-radius: var(--fl-calc-radius-sm);
	background: #fff1f0;
	border: 1px solid #f5c2c0;
	color: #9b1c1c;
	font-size: 0.875rem;
	line-height: 1.4;
}

.fl-calc.fl-calc--fire .fl-calc__error[hidden],
.fl-calc.fl-calc--fire .fl-calc__empty[hidden],
.fl-calc.fl-calc--fire .fl-calc__output[hidden] {
	display: none !important;
}

.fl-calc.fl-calc--fire .fl-calc__submit,
.fl-calc.fl-calc--fire button.fl-calc__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin-top: 20px;
	padding: 14px 20px;
	border: 0;
	border-radius: var(--fl-calc-radius-sm);
	background: var(--fl-calc-orange);
	color: #ffffff;
	font: inherit;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.fl-calc.fl-calc--fire .fl-calc__submit:hover {
	background: var(--fl-calc-orange-hover);
	color: #ffffff;
}

.fl-calc.fl-calc--fire .fl-calc__submit:focus-visible {
	outline: 2px solid var(--fl-calc-orange);
	outline-offset: 3px;
}

.fl-calc.fl-calc--fire .fl-calc__results {
	position: relative;
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid var(--fl-calc-border);
	width: 100%;
	min-width: 0;
}

.fl-calc.fl-calc--fire .fl-calc__empty {
	margin: 0;
	color: #6e8299;
	font-size: 0.9375rem;
	line-height: 1.5;
	text-align: center;
}

.fl-calc.fl-calc--fire .fl-calc__output {
	position: relative;
	padding-top: 8px;
}

.fl-calc.fl-calc--fire .fl-calc__output.is-visible {
	display: block;
	animation: fl-calc-fire-fade-in 0.25s ease;
}

.fl-calc.fl-calc--fire .fl-calc__output.is-hiding {
	display: block;
	animation: fl-calc-fire-fade-out 0.18s ease forwards;
	pointer-events: none;
}

@keyframes fl-calc-fire-fade-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes fl-calc-fire-fade-out {
	from {
		opacity: 1;
		transform: none;
	}
	to {
		opacity: 0;
		transform: translateY(4px);
	}
}

.fl-calc.fl-calc--fire .fl-calc__results-close {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--fl-calc-border);
	border-radius: 8px;
	background: #fff;
	color: #001a42;
	font-size: 1.35rem;
	line-height: 1;
	cursor: pointer;
}

.fl-calc.fl-calc--fire .fl-calc__results-close:hover {
	background: var(--fl-calc-field-bg);
}

.fl-calc.fl-calc--fire .fl-calc__results-close:focus-visible {
	outline: 2px solid var(--fl-calc-orange);
	outline-offset: 2px;
}

.fl-calc.fl-calc--fire .fl-calc__status-box {
	margin: 0 44px 16px 0;
	padding: 16px 18px;
	border-radius: var(--fl-calc-radius-sm);
	border: 1px solid var(--fl-calc-border);
}

.fl-calc.fl-calc--fire .fl-calc__status-box--ok {
	background: var(--fl-calc-ok-bg);
	border-color: var(--fl-calc-ok-border);
}

.fl-calc.fl-calc--fire .fl-calc__status-box--gap {
	background: var(--fl-calc-gap-bg);
	border-color: var(--fl-calc-gap-border);
}

.fl-calc.fl-calc--fire .fl-calc__status-title {
	margin: 0;
	color: #001a42;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.4;
}

.fl-calc.fl-calc--fire .fl-calc__status-meta {
	margin: 8px 0 0;
	color: #001a42;
	font-size: 0.9375rem;
	line-height: 1.4;
}

.fl-calc.fl-calc--fire .fl-calc__hero-compare {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 0 44px 16px 0;
}

.fl-calc.fl-calc--fire .fl-calc__progress {
	margin: 0 44px 20px 0;
}

.fl-calc.fl-calc--fire .fl-calc__progress-title {
	margin: 0 0 8px;
	color: #001a42;
	font-size: 0.875rem;
	font-weight: 700;
}

.fl-calc.fl-calc--fire .fl-calc__progress-track {
	width: 100%;
	height: 12px;
	overflow: hidden;
	border-radius: 999px;
	background: var(--fl-calc-field-bg);
	border: 1px solid var(--fl-calc-border);
}

.fl-calc.fl-calc--fire .fl-calc__progress-fill {
	height: 100%;
	width: 0;
	border-radius: 999px;
	background: var(--fl-calc-orange);
	transition: width 0.35s ease;
}

.fl-calc.fl-calc--fire .fl-calc__progress-fill.is-complete {
	background: #16884b;
}

.fl-calc.fl-calc--fire .fl-calc__progress-legend {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 8px;
	color: #6e8299;
	font-size: 0.75rem;
	line-height: 1.3;
}

.fl-calc.fl-calc--fire .fl-calc__summary--fire {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin-bottom: 20px;
}

.fl-calc.fl-calc--fire .fl-calc__stat {
	min-width: 0;
	padding: 12px 14px;
	border: 1px solid var(--fl-calc-border);
	border-radius: var(--fl-calc-radius-sm);
	background: var(--fl-calc-field-bg);
}

.fl-calc.fl-calc--fire .fl-calc__stat--primary {
	background: rgba(235, 122, 2, 0.08);
	border-color: rgba(235, 122, 2, 0.28);
}

.fl-calc.fl-calc--fire .fl-calc__stat-label {
	display: block;
	margin-bottom: 6px;
	color: #6e8299;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.3;
}

.fl-calc.fl-calc--fire .fl-calc__stat-value {
	display: block;
	color: #001a42;
	font-size: clamp(0.9rem, 1.4vw, 1.05rem);
	font-weight: 700;
	line-height: 1.35;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.fl-calc.fl-calc--fire .fl-calc__details {
	margin-bottom: 8px;
}

.fl-calc.fl-calc--fire .fl-calc__details-title {
	margin: 0 0 12px;
	color: #001a42;
	font-size: 1rem;
	font-weight: 700;
}

.fl-calc.fl-calc--fire .fl-calc__details-table-wrap {
	width: 100%;
	overflow-x: auto;
	border: 1px solid var(--fl-calc-border);
	border-radius: var(--fl-calc-radius-sm);
}

.fl-calc.fl-calc--fire .fl-calc__details-table {
	width: 100%;
	min-width: 420px;
	border-collapse: collapse;
	background: #fff;
}

.fl-calc.fl-calc--fire .fl-calc__details-table th,
.fl-calc.fl-calc--fire .fl-calc__details-table td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--fl-calc-border);
	text-align: left;
	font-size: 0.875rem;
	line-height: 1.4;
	color: #001a42;
}

.fl-calc.fl-calc--fire .fl-calc__details-table th {
	width: 58%;
	font-weight: 600;
	color: #6e8299;
	background: var(--fl-calc-field-bg);
}

.fl-calc.fl-calc--fire .fl-calc__details-table td {
	font-weight: 700;
	white-space: nowrap;
}

.fl-calc.fl-calc--fire .fl-calc__details-table tr:last-child th,
.fl-calc.fl-calc--fire .fl-calc__details-table tr:last-child td {
	border-bottom: 0;
}

.fl-calc.fl-calc--fire .fl-calc__reset {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin-top: 16px;
	padding: 10px 16px;
	border: 0;
	border-radius: var(--fl-calc-radius-sm);
	background: transparent;
	color: #001a42;
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.fl-calc.fl-calc--fire .fl-calc__reset:hover {
	color: var(--fl-calc-orange);
}

.fl-calc.fl-calc--fire .fl-calc__reset:focus-visible {
	outline: 2px solid var(--fl-calc-orange);
	outline-offset: 2px;
}

.fl-calc.fl-calc--fire .fl-calc__disclaimer {
	margin: 20px 0 0;
	color: #6e8299;
	font-size: 0.8125rem;
	line-height: 1.5;
}

@media (max-width: 900px) {
	.fl-calc.fl-calc--fire .fl-calc__summary--fire {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.fl-calc.fl-calc--fire .fl-calc__stat-value {
		overflow: visible;
		text-overflow: clip;
		white-space: normal;
	}
}

@media (max-width: 720px) {
	.fl-calc.fl-calc--fire .fl-calc__fields--fire,
	.fl-calc.fl-calc--fire .fl-calc__hero-compare,
	.fl-calc.fl-calc--fire .fl-calc__summary--fire {
		grid-template-columns: 1fr;
	}

	.fl-calc.fl-calc--fire .fl-calc__status-box,
	.fl-calc.fl-calc--fire .fl-calc__hero-compare,
	.fl-calc.fl-calc--fire .fl-calc__progress {
		margin-right: 0;
	}

	.fl-calc.fl-calc--fire .fl-calc__panel {
		padding: 20px;
	}
}
