/**
 * Calculadora Técnica 3 en 1 de Líneas, Capacidad de Carrete y Nudos de Pesca.
 * Vanilla CSS modular siguiendo el sistema de diseño de Depesca.
 */

.dp-calc-lines {
	--dp-cl-accent: #ee8e00;
	--dp-cl-accent-dark: #b86a00;
	--dp-cl-border: #f3dcb4;
	position: relative;
	margin: 2.5rem 0;
	padding: 1.5rem;
	color: #1f2937;
	background:
		radial-gradient(120% 80% at 100% 0%, rgba(238, 142, 0, 0.1), transparent 60%),
		linear-gradient(180deg, #fffcf7 0%, #ffffff 50%);
	border: 1px solid var(--dp-cl-border);
	border-radius: 1.5rem;
	box-shadow: 0 20px 40px -28px rgba(120, 70, 0, 0.35);
}

.dp-calc-lines *,
.dp-calc-lines *::before,
.dp-calc-lines *::after {
	box-sizing: border-box;
}

.dp-calc-lines__head {
	text-align: center;
	margin-bottom: 1.5rem;
}

.dp-calc-lines__eyebrow {
	display: inline-block;
	margin-bottom: 0.5rem;
	padding: 0.3rem 0.85rem;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #8a4f00;
	background: #ffe9c2;
	border-radius: 999px;
}

.dp-calc-lines__title {
	margin: 0 0 0.75rem;
	font-size: 1.5rem;
	font-weight: 900;
	color: #111827;
	line-height: 1.25;
}

.dp-calc-lines__desc {
	margin: 0 auto;
	max-width: 42rem;
	font-size: 0.95rem;
	color: #4b5563;
	line-height: 1.5;
}

/* Pestañas de navegación */
.dp-calc-lines__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
	margin: 1.25rem 0 1.5rem;
	border-bottom: 1px dashed #e5e7eb;
	padding-bottom: 1.25rem;
}

.dp-calc-lines__tab-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.65rem 1.15rem;
	font-size: 0.88rem;
	font-weight: 800;
	color: #4b5563;
	background: #ffffff;
	border: 1.5px solid #e5e7eb;
	border-radius: 999px;
	cursor: pointer;
	transition: all 0.18s ease;
}

.dp-calc-lines__tab-btn:hover {
	color: #b86a00;
	border-color: #ee8e00;
	background: #fffaf0;
	transform: translateY(-1px);
}

.dp-calc-lines__tab-btn.is-active {
	color: #ffffff;
	background: #ee8e00;
	background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
	border-color: #d97706;
	box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
}

/* Paneles de Contenido */
.dp-calc-lines__panel {
	display: none;
	animation: dp-cl-fade 0.25s ease both;
}

.dp-calc-lines__panel.is-active {
	display: block;
}

@keyframes dp-cl-fade {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Formularios y Controles */
.dp-calc-lines__form-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
	.dp-calc-lines__form-grid {
		grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	}
}

.dp-calc-lines__field {
	display: flex;
	flex-direction: column;
}

.dp-calc-lines__label {
	font-size: 0.8rem;
	font-weight: 800;
	color: #374151;
	margin-bottom: 0.4rem;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.dp-calc-lines__input,
.dp-calc-lines__select {
	padding: 0.75rem 0.9rem;
	font-size: 0.95rem;
	color: #111827;
	background: #ffffff;
	border: 1.5px solid #d1d5db;
	border-radius: 0.75rem;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.dp-calc-lines__input:focus,
.dp-calc-lines__select:focus {
	border-color: #ee8e00;
	box-shadow: 0 0 0 3px rgba(238, 142, 0, 0.2);
}

/* Tarjeta de Resultados */
.dp-calc-lines__result-box {
	background: #ffffff;
	border: 2px solid #fed7aa;
	border-radius: 1.25rem;
	padding: 1.25rem;
	box-shadow: 0 10px 25px -10px rgba(238, 142, 0, 0.25);
	margin-bottom: 1.5rem;
}

.dp-calc-lines__result-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.75rem;
	margin-bottom: 1rem;
}

@media (min-width: 640px) {
	.dp-calc-lines__result-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

.dp-calc-lines__metric {
	padding: 0.75rem 0.6rem;
	background: #fffcf7;
	border: 1px solid #fde68a;
	border-radius: 0.85rem;
	text-align: center;
}

.dp-calc-lines__metric-label {
	display: block;
	font-size: 0.72rem;
	font-weight: 800;
	text-transform: uppercase;
	color: #78350f;
	margin-bottom: 0.25rem;
}

.dp-calc-lines__metric-val {
	display: block;
	font-size: 1.2rem;
	font-weight: 900;
	color: #9a3412;
	line-height: 1.2;
}

.dp-calc-lines__tip {
	margin: 0;
	padding: 0.75rem 0.95rem;
	font-size: 0.88rem;
	color: #4b5563;
	line-height: 1.45;
	background: #f9fafb;
	border-left: 3px solid #f97316;
	border-radius: 0.4rem;
}

/* Visualizador de Bobina y Backing */
.dp-calc-spool-meter {
	margin: 1.25rem 0;
	padding: 1rem;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 0.85rem;
}

.dp-calc-spool-meter__bar-bg {
	width: 100%;
	height: 1.5rem;
	background: #e2e8f0;
	border-radius: 999px;
	overflow: hidden;
	display: flex;
	margin-top: 0.5rem;
}

.dp-calc-spool-meter__bar-fill-backing {
	background: #94a3b8;
	height: 100%;
	transition: width 0.3s ease;
}

.dp-calc-spool-meter__bar-fill-main {
	background: #f97316;
	height: 100%;
	transition: width 0.3s ease;
}

/* Tarjetas de Nudos */
.dp-calc-knots-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.65rem;
	margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
	.dp-calc-knots-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

.dp-calc-knot-btn {
	padding: 0.75rem 0.85rem;
	text-align: left;
	background: #ffffff;
	border: 1.5px solid #e5e7eb;
	border-radius: 0.85rem;
	cursor: pointer;
	transition: all 0.18s ease;
}

.dp-calc-knot-btn:hover {
	border-color: #ee8e00;
	background: #fffbf4;
	transform: translateY(-1px);
}

.dp-calc-knot-btn.is-active {
	border-color: #ee8e00;
	background: #fff8ed;
	box-shadow: 0 0 0 2px rgba(238, 142, 0, 0.4);
}

.dp-calc-knot-btn__title {
	display: block;
	font-size: 0.9rem;
	font-weight: 800;
	color: #111827;
}

.dp-calc-knot-btn__sub {
	display: block;
	font-size: 0.72rem;
	color: #6b7280;
	margin-top: 0.15rem;
}

/* Monetización de Líneas y Accesorios */
.dp-calc-lines__products-title {
	font-size: 1.05rem;
	font-weight: 800;
	color: #111827;
	margin: 1.75rem 0 0.85rem;
}

.dp-calc-lines__products-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

@media (min-width: 640px) {
	.dp-calc-lines__products-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}
