:root {
	--wtcalaf-bg: #f7f3ee;
	--wtcalaf-card: #ffffff;
	--wtcalaf-ink: #24170f;
	--wtcalaf-muted: #74675d;
	--wtcalaf-line: #eaded2;
	--wtcalaf-primary: #9d4f1f;
	--wtcalaf-primary-dark: #6f3615;
	--wtcalaf-soft: #fff5ec;
	--wtcalaf-danger: #9f1d1d;
	--wtcalaf-radius: 22px;
	--wtcalaf-shadow: 0 18px 48px rgba(84, 47, 21, 0.13);
}

.wtcalaf-calculator {
	color: var(--wtcalaf-ink);
	background:
		radial-gradient(circle at 14% 0%, rgba(157, 79, 31, .15), transparent 34%),
		linear-gradient(135deg, #fffaf5 0%, var(--wtcalaf-bg) 100%);
	border: 1px solid rgba(157, 79, 31, .16);
	border-radius: 28px;
	padding: clamp(18px, 3vw, 34px);
	font-family: inherit;
	box-sizing: border-box;
}

.wtcalaf-calculator *,
.wtcalaf-calculator *::before,
.wtcalaf-calculator *::after {
	box-sizing: border-box;
}

.wtcalaf-hero {
	display: flex;
	justify-content: space-between;
	gap: 24px;
	align-items: stretch;
	margin-bottom: 22px;
}

.wtcalaf-eyebrow {
	margin: 0 0 8px;
	font-size: 12px;
	letter-spacing: .12em;
	text-transform: uppercase;
	font-weight: 800;
	color: var(--wtcalaf-primary);
}

.wtcalaf-hero h2 {
	margin: 0;
	font-size: clamp(28px, 4vw, 48px);
	line-height: 1.05;
	letter-spacing: -0.04em;
	color: var(--wtcalaf-ink);
}

.wtcalaf-hero p:not(.wtcalaf-eyebrow) {
	margin: 12px 0 0;
	max-width: 760px;
	color: var(--wtcalaf-muted);
	font-size: 16px;
}

.wtcalaf-hero-badge {
	min-width: 152px;
	border-radius: 24px;
	background: linear-gradient(150deg, var(--wtcalaf-primary), #c77b3c);
	color: #fff;
	padding: 22px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	box-shadow: var(--wtcalaf-shadow);
	text-align: center;
}

.wtcalaf-hero-badge span {
	display: block;
	font-size: 40px;
	line-height: 1;
	font-weight: 900;
}

.wtcalaf-hero-badge small {
	font-size: 12px;
	line-height: 1.2;
	opacity: .9;
}

.wtcalaf-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
	gap: 18px;
	margin-bottom: 18px;
}

.wtcalaf-card {
	background: rgba(255,255,255,.92);
	border: 1px solid var(--wtcalaf-line);
	border-radius: var(--wtcalaf-radius);
	box-shadow: var(--wtcalaf-shadow);
	padding: clamp(18px, 2.4vw, 26px);
}

.wtcalaf-card-title {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 18px;
}

.wtcalaf-card-title span {
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	background: var(--wtcalaf-soft);
	color: var(--wtcalaf-primary);
	font-weight: 900;
}

.wtcalaf-card-title h3 {
	margin: 0;
	font-size: 20px;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.wtcalaf-field {
	display: flex;
	flex-direction: column;
	gap: 7px;
	margin-bottom: 14px;
}

.wtcalaf-field label,
.wtcalaf-check {
	font-size: 13px;
	font-weight: 800;
	color: var(--wtcalaf-ink);
}

.wtcalaf-field small {
	color: var(--wtcalaf-muted);
	font-size: 12px;
}

.wtcalaf-field input,
.wtcalaf-field select {
	width: 100%;
	min-height: 46px;
	border: 1px solid var(--wtcalaf-line);
	border-radius: 14px;
	background: #fff;
	color: var(--wtcalaf-ink);
	padding: 10px 13px;
	font: inherit;
	outline: none;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.wtcalaf-field input:focus,
.wtcalaf-field select:focus {
	border-color: rgba(157,79,31,.7);
	box-shadow: 0 0 0 4px rgba(157,79,31,.12);
}

.wtcalaf-two-cols {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.wtcalaf-product-meta {
	min-height: 24px;
	color: var(--wtcalaf-muted);
	font-size: 12px;
	line-height: 1.45;
}

.wtcalaf-button {
	border: 0;
	border-radius: 14px;
	background: #f3ebe3;
	color: var(--wtcalaf-ink);
	min-height: 44px;
	padding: 10px 16px;
	font-weight: 900;
	cursor: pointer;
	transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.wtcalaf-button:hover {
	transform: translateY(-1px);
	background: #eaded2;
}

.wtcalaf-button-primary {
	width: 100%;
	background: linear-gradient(135deg, var(--wtcalaf-primary), var(--wtcalaf-primary-dark));
	color: #fff;
	box-shadow: 0 12px 24px rgba(111, 54, 21, .22);
}

.wtcalaf-button-primary:hover {
	background: linear-gradient(135deg, #ad5d2a, var(--wtcalaf-primary-dark));
}

.wtcalaf-button-danger {
	color: var(--wtcalaf-danger);
}

.wtcalaf-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	background: var(--wtcalaf-soft);
	border: 1px solid var(--wtcalaf-line);
	border-radius: 14px;
	padding: 12px;
	margin-bottom: 12px;
	line-height: 1.3;
}

.wtcalaf-check input {
	margin-top: 2px;
	accent-color: var(--wtcalaf-primary);
}

.wtcalaf-details {
	margin-top: 10px;
	border: 1px solid var(--wtcalaf-line);
	border-radius: 16px;
	padding: 12px;
	background: #fff;
}

.wtcalaf-details summary {
	cursor: pointer;
	font-weight: 900;
	color: var(--wtcalaf-primary);
	margin-bottom: 10px;
}

.wtcalaf-notice {
	margin-top: 14px;
	border-left: 4px solid var(--wtcalaf-primary);
	background: #fff8f1;
	color: var(--wtcalaf-muted);
	border-radius: 14px;
	padding: 13px 14px;
	font-size: 13px;
	line-height: 1.45;
}

.wtcalaf-results {
	margin-top: 0;
}

.wtcalaf-results-head {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	align-items: center;
	margin-bottom: 8px;
}

.wtcalaf-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.wtcalaf-empty {
	border: 1px dashed rgba(157,79,31,.35);
	border-radius: 18px;
	background: var(--wtcalaf-soft);
	padding: 22px;
	text-align: center;
	color: var(--wtcalaf-muted);
	font-weight: 700;
}

.wtcalaf-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--wtcalaf-line);
	border-radius: 18px;
	background: #fff;
}

.wtcalaf-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 940px;
}

.wtcalaf-table th,
.wtcalaf-table td {
	padding: 13px 12px;
	text-align: left;
	border-bottom: 1px solid var(--wtcalaf-line);
	vertical-align: top;
}

.wtcalaf-table th {
	background: #fff8f1;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--wtcalaf-primary-dark);
}

.wtcalaf-table td {
	font-size: 14px;
}

.wtcalaf-table td span {
	display: block;
	color: var(--wtcalaf-muted);
	font-size: 12px;
	margin-top: 3px;
}

.wtcalaf-table input {
	width: 96px;
	min-height: 38px;
	border: 1px solid var(--wtcalaf-line);
	border-radius: 12px;
	padding: 8px;
}

.wtcalaf-row-remove {
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 12px;
	background: #ffe8e8;
	color: var(--wtcalaf-danger);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.wtcalaf-summary {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 10px;
	margin-top: 16px;
}

.wtcalaf-summary div {
	border: 1px solid var(--wtcalaf-line);
	border-radius: 16px;
	padding: 13px;
	background: #fff;
	min-height: 76px;
}

.wtcalaf-summary span {
	display: block;
	color: var(--wtcalaf-muted);
	font-size: 12px;
	font-weight: 800;
	margin-bottom: 6px;
}

.wtcalaf-summary strong {
	display: block;
	font-size: 18px;
	line-height: 1.1;
	letter-spacing: -0.03em;
}

.wtcalaf-summary .wtcalaf-total {
	background: linear-gradient(135deg, var(--wtcalaf-primary), var(--wtcalaf-primary-dark));
	color: #fff;
	border-color: transparent;
}

.wtcalaf-summary .wtcalaf-total span {
	color: rgba(255,255,255,.8);
}

.wtcalaf-summary .wtcalaf-total strong {
	font-size: 24px;
}

.wtcalaf-foot-metrics {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	margin-top: 13px;
	color: var(--wtcalaf-muted);
	font-size: 13px;
}

.wtcalaf-toast {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 99999;
	background: var(--wtcalaf-ink);
	color: #fff;
	border-radius: 14px;
	box-shadow: var(--wtcalaf-shadow);
	padding: 13px 16px;
	max-width: 360px;
	font-weight: 800;
}

.wtcalaf-calculator.has-zero-price .wtcalaf-results::after {
	content: "Hay al menos una línea con precio 0 en el tramo seleccionado. Revisa la tarifa antes de confirmar.";
	display: block;
	margin-top: 14px;
	padding: 12px 14px;
	border-radius: 14px;
	background: #fff1d6;
	color: #815100;
	font-weight: 800;
	font-size: 13px;
}

@media (max-width: 1040px) {
	.wtcalaf-grid {
		grid-template-columns: 1fr;
	}

	.wtcalaf-summary {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 720px) {
	.wtcalaf-calculator {
		padding: 16px;
		border-radius: 22px;
	}

	.wtcalaf-hero {
		flex-direction: column;
	}

	.wtcalaf-hero-badge {
		align-items: flex-start;
		min-width: 0;
	}

	.wtcalaf-two-cols,
	.wtcalaf-summary {
		grid-template-columns: 1fr;
	}

	.wtcalaf-results-head {
		align-items: flex-start;
		flex-direction: column;
	}

	.wtcalaf-actions {
		width: 100%;
		justify-content: stretch;
	}

	.wtcalaf-actions .wtcalaf-button {
		flex: 1;
	}

	.wtcalaf-table {
		min-width: 0;
	}

	.wtcalaf-table thead {
		display: none;
	}

	.wtcalaf-table,
	.wtcalaf-table tbody,
	.wtcalaf-table tr,
	.wtcalaf-table td {
		display: block;
		width: 100%;
	}

	.wtcalaf-table tr {
		border-bottom: 1px solid var(--wtcalaf-line);
		padding: 10px 0;
	}

	.wtcalaf-table td {
		display: flex;
		justify-content: space-between;
		gap: 14px;
		border-bottom: 0;
		padding: 9px 12px;
	}

	.wtcalaf-table td::before {
		content: attr(data-label);
		font-weight: 900;
		color: var(--wtcalaf-primary-dark);
	}

	.wtcalaf-table td:first-child {
		display: block;
	}

	.wtcalaf-table td:first-child::before {
		display: none;
	}
}

.wtcalaf-breakdown-row td {
	background: #fffaf5;
}

.wtcalaf-breakdown-indent {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	color: var(--wtcalaf-primary-dark) !important;
	font-weight: 800;
	font-size: 13px !important;
}

.wtcalaf-breakdown-muted {
	color: var(--wtcalaf-muted) !important;
	font-size: 12px !important;
	font-weight: 800;
}


.wtcalaf-suggestion-row td {
	background: linear-gradient(135deg, #fff7e8, #fffdf8);
	padding: 12px !important;
}

.wtcalaf-suggestion {
	border: 1px solid rgba(157,79,31,.24);
	border-radius: 16px;
	padding: 14px;
	background: #fff8ef;
}

.wtcalaf-suggestion-title {
	font-size: 14px;
	font-weight: 900;
	color: var(--wtcalaf-primary-dark);
	margin-bottom: 9px;
}

.wtcalaf-suggestion-metrics {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin-bottom: 8px;
}

.wtcalaf-suggestion-metrics span {
	display: inline-flex !important;
	align-items: center;
	gap: 4px;
	margin: 0 !important;
	padding: 7px 10px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid var(--wtcalaf-line);
	font-size: 12px !important;
	color: var(--wtcalaf-ink) !important;
}

.wtcalaf-suggestion-note {
	font-size: 12px;
	font-weight: 800;
	color: var(--wtcalaf-muted);
}

.wtcalaf-suggestion-note-measure {
	margin-top: 5px;
}

@media (max-width: 720px) {
	.wtcalaf-suggestion-row td {
		display: block !important;
	}

	.wtcalaf-suggestion-row td::before {
		display: none !important;
	}
}

.wtcalaf-print-qty {
	display: none !important;
}

@media print {
	@page {
		size: A4;
		margin: 12mm;
	}

	body.wtcalaf-printing * {
		visibility: hidden !important;
	}

	body.wtcalaf-printing .wtcalaf-print-target,
	body.wtcalaf-printing .wtcalaf-print-target * {
		visibility: visible !important;
	}

	body.wtcalaf-printing .wtcalaf-print-target {
		position: absolute !important;
		left: 0 !important;
		top: 0 !important;
		width: 100% !important;
		padding: 0 !important;
		border: 0 !important;
		border-radius: 0 !important;
		box-shadow: none !important;
		background: #fff !important;
		color: #000 !important;
	}

	body.wtcalaf-printing .wtcalaf-grid,
	body.wtcalaf-printing .wtcalaf-actions,
	body.wtcalaf-printing .wtcalaf-hero-badge,
	body.wtcalaf-printing .wtcalaf-row-remove,
	body.wtcalaf-printing .wtcalaf-toast {
		display: none !important;
	}

	body.wtcalaf-printing .wtcalaf-hero {
		display: block !important;
		margin-bottom: 8mm !important;
	}

	body.wtcalaf-printing .wtcalaf-hero h2 {
		font-size: 26px !important;
		letter-spacing: 0 !important;
		color: #000 !important;
	}

	body.wtcalaf-printing .wtcalaf-hero p,
	body.wtcalaf-printing .wtcalaf-eyebrow {
		color: #333 !important;
	}

	body.wtcalaf-printing .wtcalaf-card {
		padding: 0 !important;
		border: 0 !important;
		box-shadow: none !important;
		background: #fff !important;
	}

	body.wtcalaf-printing .wtcalaf-results-head {
		margin-bottom: 5mm !important;
	}

	body.wtcalaf-printing .wtcalaf-card-title span {
		background: #eee !important;
		color: #000 !important;
	}

	body.wtcalaf-printing .wtcalaf-table-wrap {
		overflow: visible !important;
		border: 1px solid #d8d8d8 !important;
		border-radius: 0 !important;
	}

	body.wtcalaf-printing .wtcalaf-table {
		min-width: 0 !important;
		font-size: 10px !important;
	}

	body.wtcalaf-printing .wtcalaf-table th,
	body.wtcalaf-printing .wtcalaf-table td {
		padding: 6px 7px !important;
		border-bottom: 1px solid #e5e5e5 !important;
		color: #000 !important;
	}

	body.wtcalaf-printing .wtcalaf-table th {
		background: #f2f2f2 !important;
		color: #000 !important;
	}

	body.wtcalaf-printing .wtcalaf-table td span,
	body.wtcalaf-printing .wtcalaf-breakdown-indent,
	body.wtcalaf-printing .wtcalaf-breakdown-muted {
		color: #333 !important;
	}

	body.wtcalaf-printing .wtcalaf-suggestion-row td {
		background: #fff !important;
	}

	body.wtcalaf-printing .wtcalaf-suggestion {
		border-radius: 0 !important;
		border-color: #d8d8d8 !important;
		background: #fff !important;
		padding: 7px !important;
	}

	body.wtcalaf-printing .wtcalaf-suggestion-title,
	body.wtcalaf-printing .wtcalaf-suggestion-note {
		color: #000 !important;
	}

	body.wtcalaf-printing .wtcalaf-suggestion-metrics span {
		padding: 3px 0 !important;
		border: 0 !important;
		background: #fff !important;
		color: #000 !important;
	}

	body.wtcalaf-printing .wtcalaf-table input {
		display: none !important;
	}

	body.wtcalaf-printing .wtcalaf-print-qty {
		display: inline !important;
		color: #000 !important;
		font-weight: 800 !important;
	}

	body.wtcalaf-printing .wtcalaf-summary {
		grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
		gap: 6px !important;
		margin-top: 8mm !important;
	}

	body.wtcalaf-printing .wtcalaf-summary div {
		min-height: auto !important;
		padding: 7px !important;
		border-radius: 0 !important;
		background: #fff !important;
		border-color: #d8d8d8 !important;
		color: #000 !important;
	}

	body.wtcalaf-printing .wtcalaf-summary .wtcalaf-total {
		background: #f2f2f2 !important;
		color: #000 !important;
	}

	body.wtcalaf-printing .wtcalaf-summary span,
	body.wtcalaf-printing .wtcalaf-summary .wtcalaf-total span {
		color: #333 !important;
	}

	body.wtcalaf-printing .wtcalaf-summary strong,
	body.wtcalaf-printing .wtcalaf-summary .wtcalaf-total strong {
		font-size: 15px !important;
		color: #000 !important;
	}

	body.wtcalaf-printing .wtcalaf-foot-metrics {
		color: #333 !important;
		font-size: 11px !important;
	}
}
