/* =========================================================================
   White Hat Import DR — estilos de la calculadora (whid-front.css)
   =========================================================================
   Todo el estilo va "encapsulado" bajo la clase .whid, para que no choque con
   el resto de la página. Usa variables propias: así se puede recolorear entero
   cambiando solo el bloque :root de abajo. Diseño oscuro y limpio, pensado para
   integrarse en el tema White Hat Motors pero válido en cualquier tema.
   ========================================================================= */

.whid {
	/* Paleta de la calculadora (combinable con el tema). */
	--whid-primary:   #0085FF;
	--whid-primary-2: #0177E3;
	--whid-surface:   #16233f;              /* tarjetas */
	--whid-surface-2: #1e2f52;              /* campos e items */
	--whid-text:      #E7F6FF;
	--whid-muted:     rgba(231, 246, 255, .68);
	--whid-border:    rgba(255, 255, 255, .10);
	--whid-ok:        #2ecc71;
	--whid-err:       #ff6b6b;
	--whid-radius:    12px;

	max-width: 880px;
	margin-inline: auto;
	color: var(--whid-text);
	font-family: inherit; /* hereda la fuente del tema */
	display: grid;
	gap: 20px;
}

/* Tarjetas */
.whid-card {
	background: var(--whid-surface);
	border: 1px solid var(--whid-border);
	border-radius: var(--whid-radius);
	padding: 22px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.whid-card__title {
	margin: 0 0 6px;
	font-size: 1.2rem;
	color: var(--whid-text);
}
.whid-help { margin: 0 0 14px; color: var(--whid-muted); font-size: .95rem; }

/* Rejillas de campos */
.whid-grid { display: grid; gap: 16px; }
.whid-grid--2 { grid-template-columns: repeat(2, 1fr); }
.whid-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* Campos */
.whid-field { display: flex; flex-direction: column; gap: 6px; }
.whid-field__label { font-size: .9rem; color: var(--whid-muted); font-weight: 600; }

.whid-input {
	width: 100%;
	padding: 12px 14px;
	background: var(--whid-surface-2);
	color: var(--whid-text);
	border: 1px solid var(--whid-border);
	border-radius: 8px;
	font: inherit;
	font-size: 1rem;
}
.whid-input:focus { outline: none; border-color: var(--whid-primary); box-shadow: 0 0 0 3px rgba(0, 133, 255, .2); }
.whid-input:disabled { opacity: .55; cursor: not-allowed; }
select.whid-input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--whid-muted) 50%), linear-gradient(135deg, var(--whid-muted) 50%, transparent 50%); background-position: calc(100% - 20px) center, calc(100% - 14px) center; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 38px; }

/* Botones */
.whid-btn {
	display: inline-block;
	padding: 13px 22px;
	background: var(--whid-primary);
	color: #fff;
	border: 0;
	border-radius: 8px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .2s ease;
}
.whid-btn:hover:not(:disabled) { background: var(--whid-primary-2); }
.whid-btn:disabled { opacity: .6; cursor: default; }
.whid-btn--block { width: 100%; margin-top: 18px; padding-block: 16px; font-size: 1.05rem; }

/* Atajo por VIN */
.whid-vin__row { display: flex; gap: 10px; }
.whid-vin__row .whid-input { flex: 1; text-transform: uppercase; }
.whid-vin__status { margin: 10px 0 0; font-size: .92rem; min-height: 1.2em; }
.whid-vin__status.is-ok { color: var(--whid-ok); }
.whid-vin__status.is-error { color: var(--whid-err); }
/* Mensaje de error al calcular (p. ej. sesión caducada). */
.whid-calc-error { margin: 12px 0 0; color: var(--whid-err); font-size: .95rem; }

/* Ficha del vehículo */
.whid-info__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 1.1rem; }
.whid-tag { background: var(--whid-surface-2); border: 1px solid var(--whid-border); border-radius: 999px; padding: 4px 12px; font-size: .82rem; color: var(--whid-muted); }
.whid-attrs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.whid-attrs li { background: var(--whid-surface-2); border-radius: 8px; padding: 10px 12px; font-size: .92rem; }
.whid-attrs__k { color: var(--whid-muted); }
.whid-attrs__v { font-weight: 600; }

/* Retiros de seguridad (recalls) */
.whid-recalls { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--whid-border); }
.whid-recalls__title { margin: 0 0 8px; font-size: 1rem; }
.whid-recalls__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.whid-recalls__list li { background: var(--whid-surface-2); border-left: 3px solid #ffb020; border-radius: 6px; padding: 8px 12px; font-size: .88rem; }
.whid-recalls__list strong { display: block; }
.whid-recalls__src { margin: 8px 0 0; font-size: .78rem; color: var(--whid-muted); }

/* Opciones (TLC, placa) */
.whid-choice { margin: 16px 0; }
.whid-radios { display: flex; gap: 18px; margin-top: 8px; flex-wrap: wrap; }
.whid-radios label, .whid-checkbox { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.whid-checkbox { margin: 14px 0; }

/* Pista de ayuda (?) */
.whid-tip {
	display: inline-flex; align-items: center; justify-content: center;
	width: 18px; height: 18px; margin-left: 4px;
	background: var(--whid-primary); color: #fff;
	border-radius: 50%; font-size: .72rem; font-weight: 700; cursor: help;
}

/* Resumen */
.whid-summary__rate { color: var(--whid-muted); font-size: .9rem; margin-bottom: 12px; }
.whid-summary__list { list-style: none; margin: 0; padding: 0; }
.whid-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--whid-border); flex-wrap: wrap; }
.whid-row__label { color: var(--whid-muted); }
.whid-row__val { font-weight: 600; white-space: nowrap; }
.whid-row.is-strong { font-size: 1.02rem; }
.whid-row.is-strong .whid-row__label, .whid-row.is-strong .whid-row__val { color: var(--whid-text); font-weight: 700; }
.whid-row__note { flex-basis: 100%; color: var(--whid-ok); font-size: .82rem; font-style: normal; }
.whid-summary__total {
	margin-top: 16px; padding: 16px 18px;
	background: linear-gradient(135deg, var(--whid-primary), var(--whid-primary-2));
	color: #fff; border-radius: 10px;
	font-size: 1.25rem; font-weight: 700; text-align: center;
}
.whid-disclaimer, .whid-source { color: var(--whid-muted); font-size: .82rem; margin: 12px 0 0; }
.whid-source { text-align: center; }

/* Responsive */
@media (max-width: 782px) {
	.whid-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
	.whid-grid--4, .whid-grid--2 { grid-template-columns: 1fr; }
	.whid-vin__row { flex-direction: column; }
	.whid-card { padding: 18px; }
}
