/*
 * UEK Kalkulator — wizard styling.
 * Wymaga uek-tools.css (base).
 */

.uek-kalkulator {
	max-width: 720px;
}

/* ── Header ── */
.uek-kalkulator__header {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 24px;
}
.uek-kalkulator__icon-circle {
	width: 52px;
	height: 52px;
	border-radius: 12px;
	background: #681539;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.uek-kalkulator__title {
	font-size: 22px;
	font-weight: 700;
	margin: 0;
}
.uek-kalkulator__subtitle {
	font-size: 13px;
	color: #838383;
	margin: 2px 0 0 !important;
}

/* ── Stepper ── */
.uek-kalkulator__stepper {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-bottom: 24px;
	overflow-x: auto;
	padding-bottom: 8px;
}
.uek-kalkulator__stepper-item {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
}
.uek-kalkulator__stepper-badge {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 700;
	background: #e4e0d8;
	color: #838383;
	transition: all 0.2s;
}
.uek-kalkulator__stepper-badge--active {
	background: #501a33 !important;
	color: #fff !important;
}
.uek-kalkulator__stepper-badge--done {
	background: #914a6a !important;
	color: #fff !important;
}
.uek-kalkulator__stepper-label {
	font-size: 11px;
	font-weight: 500;
	color: #838383;
	white-space: nowrap;
}
.uek-kalkulator__stepper-label--active {
	color: #501a33 !important;
}
.uek-kalkulator__stepper-divider {
	width: 16px;
	height: 2px;
	margin: 0 4px;
	background: #e4e0d8;
}
.uek-kalkulator__stepper-divider--done {
	background: #914a6a !important;
}
@media (min-width: 640px) {
	.uek-kalkulator__stepper-divider {
		width: 32px;
	}
}
@media (max-width: 640px) {
	.uek-kalkulator__stepper-label {
		display: none;
	}
}

/* ── Card ── */
.uek-kalkulator__card {
	background: #fff;
	border: 1px solid #e4e0d8;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
	overflow: hidden;
	max-width: 100%;
	box-sizing: border-box;
}
@media (min-width: 1024px) {
	.uek-kalkulator__card {
		padding: 32px;
	}
}

/* Twarde ograniczenia szerokości — żadne dziecko nie wyleje się poza kartę */
.uek-kalkulator__card .uek-kalkulator__field,
.uek-kalkulator__card .uek-kalkulator__pills,
.uek-kalkulator__card .uek-kalkulator__panel,
.uek-kalkulator__card .uek-kalkulator__custom,
.uek-kalkulator__card .uek-kalkulator__inline {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	min-width: 0;
}
.uek-kalkulator__step {
	animation: uek-kalkulator-fade 0.3s ease-out;
}
@keyframes uek-kalkulator-fade {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ── Field ── */
.uek-kalkulator__field {
	border: none;
	padding: 0;
	margin: 0 0 24px;
}
.uek-kalkulator__field:last-child {
	margin-bottom: 0;
}
.uek-kalkulator__legend {
	font-size: 13px;
	font-weight: 600;
	color: #501a33;
	margin-bottom: 10px;
	padding: 0;
}

/* ── Pills ── */
.uek-kalkulator__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.uek-kalkulator__pills--vertical {
	flex-direction: column;
	align-items: stretch;
	width: 100%;
}
.uek-kalkulator__pills--inline {
	align-items: center;
}
.uek-kalkulator__pill {
	height: 40px;
	padding: 0 16px;
	border-radius: 9px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	border: 1px solid #e4e0d8;
	background: #fff;
	color: #501a33;
	cursor: pointer;
	transition: all 0.2s;
	white-space: nowrap;
	text-align: left;
	max-width: 100%;
	box-sizing: border-box;
}
.uek-kalkulator__pills--vertical .uek-kalkulator__pill {
	white-space: normal;
	width: 100%;
	max-width: 100%;
	height: auto;
	min-height: 40px;
	padding: 10px 16px;
	line-height: 1.3;
	word-break: break-word;
	overflow-wrap: anywhere;
}
.uek-kalkulator__pill:hover:not(:disabled) {
	border-color: #914a6a;
}
.uek-kalkulator__pill--active {
	background: #501a33 !important;
	color: #fff !important;
	border-color: #501a33 !important;
}

/* ── Select ── */
.uek-kalkulator__select {
	width: 100%;
	height: 48px;
	padding: 0 40px 0 16px;
	border: 1px solid #e4e0d8;
	border-radius: 9px;
	font-family: inherit;
	font-size: 14px;
	color: #000;
	background-color: #fff;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' fill='none' stroke='%23838383' stroke-width='1.5'/></svg>");
	background-repeat: no-repeat;
	background-position: right 16px center;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}
.uek-kalkulator__select:focus {
	outline: none;
	border-color: #914a6a;
}

/* ── Custom inputs ── */
.uek-kalkulator__custom {
	margin-top: 12px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.uek-kalkulator__custom-input {
	width: 120px;
	height: 44px;
	padding: 0 12px;
	border: 1px solid #e4e0d8;
	border-radius: 9px;
	font-family: inherit;
	font-size: 14px;
	text-align: center;
	background: #fff;
}
.uek-kalkulator__custom-input--small {
	width: 72px;
	height: 40px;
	font-size: 13px;
}
.uek-kalkulator__custom-input:focus {
	outline: none;
	border-color: #914a6a;
}
.uek-kalkulator__hint {
	font-size: 11px;
	color: #838383;
	margin: 8px 0 0 !important;
}
.uek-kalkulator__hint--accent {
	color: #914a6a;
}
.uek-kalkulator__hint-inline {
	font-size: 13px;
	color: #838383;
}

/* ── Stepper number ── */
.uek-kalkulator__stepper-num {
	display: flex;
	align-items: center;
	gap: 12px;
}
.uek-kalkulator__num-btn {
	width: 40px;
	height: 40px;
	border-radius: 9px;
	border: 1px solid #e4e0d8;
	background: #fff;
	color: #501a33;
	font-size: 18px;
	font-weight: 700;
	cursor: pointer;
	transition: border-color 0.2s;
}
.uek-kalkulator__num-btn:hover {
	border-color: #914a6a;
}
.uek-kalkulator__num-value {
	font-size: 22px;
	font-weight: 700;
	color: #501a33;
	min-width: 40px;
	text-align: center;
}

/* ── Inline label + input ── */
.uek-kalkulator__inline {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

/* ── Panel (akademik / dofinansowanie) ── */
.uek-kalkulator__panel {
	margin-top: 12px;
	padding: 16px;
	background: #faf8f5;
	border: 1px solid #e4e0d8;
	border-radius: 9px;
	max-width: 100%;
	box-sizing: border-box;
	overflow: hidden;
}
.uek-kalkulator__panel-label {
	font-size: 13px;
	color: #501a33;
	font-weight: 500;
	display: inline-block;
	margin-bottom: 8px;
}

/* ── Custom (inline input + zł) — mobile-safe ── */
.uek-kalkulator__custom,
.uek-kalkulator__inline {
	flex-wrap: wrap;
	max-width: 100%;
	width: 100%;
}
.uek-kalkulator__panel .uek-kalkulator__inline,
.uek-kalkulator__panel .uek-kalkulator__custom,
.uek-kalkulator__panel .uek-kalkulator__slider-row {
	flex-wrap: wrap;
	width: 100%;
}
.uek-kalkulator__panel input[type="number"],
.uek-kalkulator__panel .uek-kalkulator__custom-input {
	flex: 1 1 80px;
	min-width: 0;
	max-width: 100%;
	width: auto;
}
.uek-kalkulator__panel .uek-kalkulator__hint-inline {
	flex-shrink: 0;
	white-space: nowrap;
}
@media (max-width: 480px) {
	.uek-kalkulator__custom-input,
	.uek-kalkulator__custom input[type="number"] {
		flex: 1 1 80px;
		min-width: 0;
		max-width: 100%;
		width: auto;
	}
	.uek-kalkulator__hint-inline {
		flex-shrink: 0;
		white-space: nowrap;
	}
}

/* ── Slider ── */
.uek-kalkulator__slider-row {
	display: flex;
	align-items: center;
	gap: 12px;
}
.uek-kalkulator__slider {
	flex: 1;
	accent-color: #501a33;
}
.uek-kalkulator__slider-value {
	font-size: 18px;
	font-weight: 700;
	color: #501a33;
	width: 60px;
	text-align: right;
}

/* ── Navigation ── */
.uek-kalkulator__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 24px;
	gap: 12px;
}
.uek-kalkulator__nav[hidden] {
	display: none !important;
}

/* ── Result ── */
.uek-kalkulator__step--result {
	display: flex;
	flex-direction: column;
	gap: 24px;
}
.uek-kalkulator__tiles {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}
@media (max-width: 640px) {
	.uek-kalkulator__tiles {
		grid-template-columns: 1fr;
	}
}
.uek-kalkulator__tile {
	background: #faf8f5;
	border: 1px solid #e4e0d8;
	border-radius: 9px;
	padding: 20px;
}
.uek-kalkulator__tile--accent {
	background: #501a33 !important;
	border-color: #914a6a !important;
	color: #fff;
}
.uek-kalkulator__tile-eyebrow {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin: 0 0 12px;
	color: #838383;
}
.uek-kalkulator__tile--accent .uek-kalkulator__tile-eyebrow {
	color: rgba(255, 255, 255, 0.6);
}
.uek-kalkulator__tile-meta {
	font-size: 12px;
	color: #838383;
	margin: 0 0 12px !important;
}
.uek-kalkulator__tile-discount {
	font-size: 11px;
	color: #914a6a;
	margin: 12px 0 4px !important;
}

.uek-kalkulator__rows {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.uek-kalkulator__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 12px;
}
.uek-kalkulator__tile--accent .uek-kalkulator__row {
	color: rgba(255, 255, 255, 0.7);
}
.uek-kalkulator__tile--accent .uek-kalkulator__row span:last-child {
	color: rgba(255, 255, 255, 0.9);
}
.uek-kalkulator__row--total {
	padding-top: 6px;
	margin-top: 4px;
	font-weight: 700;
}
.uek-kalkulator__tile--accent .uek-kalkulator__row--total {
	border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.uek-kalkulator__tile--accent .uek-kalkulator__row--total span {
	color: #fff !important;
}
.uek-kalkulator__tile:not(.uek-kalkulator__tile--accent) .uek-kalkulator__row {
	color: #838383;
}
.uek-kalkulator__tile:not(.uek-kalkulator__tile--accent) .uek-kalkulator__row span:last-child {
	color: #000;
}
.uek-kalkulator__tile:not(.uek-kalkulator__tile--accent) .uek-kalkulator__row--total {
	border-top: 1px solid #e4e0d8;
}
.uek-kalkulator__tile:not(.uek-kalkulator__tile--accent) .uek-kalkulator__row--total span {
	color: #501a33 !important;
}
.uek-kalkulator__row--negative span:last-child {
	color: #1a7a4c !important;
}
.uek-kalkulator__tile--accent .uek-kalkulator__row--negative span:last-child {
	color: #b8e5cc !important;
}

/* ── Table ── */
.uek-kalkulator__table-wrap {
	border: 1px solid #e4e0d8;
	border-radius: 9px;
	overflow: hidden;
}
.uek-kalkulator__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}
.uek-kalkulator__table thead {
	background: #faf8f5;
}
.uek-kalkulator__table th {
	padding: 12px 16px;
	font-weight: 600;
	color: #501a33;
	text-align: left;
}
.uek-kalkulator__td-right {
	text-align: right;
}
.uek-kalkulator__table tbody tr {
	border-bottom: 1px solid #e4e0d8;
}
.uek-kalkulator__table tbody tr:last-child {
	border-bottom: none;
}
.uek-kalkulator__table td {
	padding: 10px 16px;
	color: #501a33;
}
.uek-kalkulator__table tbody td:last-child {
	color: #000;
	font-weight: 500;
}
.uek-kalkulator__table-total {
	background: #501a33;
}
.uek-kalkulator__table-total td {
	color: #fff !important;
	font-weight: 700 !important;
	padding: 12px 16px;
}

/* ── Disclaimer ── */
.uek-kalkulator__disclaimer {
	font-size: 11px;
	color: #838383;
	background: #faf8f5;
	border: 1px solid #e4e0d8;
	border-radius: 9px;
	padding: 16px;
	margin: 0 !important;
	text-align: center !important;
}

/* ── CTA ── */
.uek-kalkulator__cta-block {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.uek-kalkulator__cta-block .uek-tools__btn--xl {
	width: 100%;
}
.uek-kalkulator__cta-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}
@media (max-width: 720px) {
	.uek-kalkulator__cta-grid {
		grid-template-columns: 1fr;
	}
}
.uek-kalkulator__cta-grid .uek-tools__btn {
	height: auto;
	min-height: 42px;
	padding: 10px 12px;
	font-size: 13px;
	width: 100%;
	white-space: normal;
	line-height: 1.25;
	text-align: center;
}
