/**
 * Las opciones del producto como tarjetas, y el total.
 *
 * Los colores salen del tema (`--c-*` de it-theme) con unos neutros de reserva.
 */

/* El desplegable de WooCommerce sigue ahí, pero no se ve: lo manejan las tarjetas. */
.it-vcards-field {
	position: relative;
}

.it-vcards-field .it-vcards-select {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden;
	clip: rect( 0 0 0 0 );
	border: 0 !important;
	opacity: 0;
	pointer-events: none;
}

.it-vcards {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 12rem, 1fr ) );
	gap: .75rem;
	max-width: 40rem;
}

.it-vcard {
	display: flex;
	gap: .85rem;
	align-items: center;
	width: 100%;
	min-height: 4.25rem;
	padding: .8rem 1rem;
	border: 1px solid var( --c-line-hi, rgb( 127 127 127 / .35 ) );
	border-radius: var( --btn-radius, 6px );
	background: transparent;
	color: var( --c-text, inherit );
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: border-color .15s, box-shadow .15s, background .15s;
}

.it-vcard:hover:not( :disabled ) {
	border-color: var( --c-text-dim, currentColor );
}

.it-vcard[aria-checked="true"] {
	border-color: var( --c-accent, #2271b1 );
	box-shadow: inset 0 0 0 1px var( --c-accent, #2271b1 );
	background: color-mix( in srgb, var( --c-accent, #2271b1 ) 8%, transparent );
}

.it-vcard:focus-visible {
	outline: 2px solid var( --c-accent, #2271b1 );
	outline-offset: 2px;
}

/* Una opción que no combina con lo elegido o sin stock. */
.it-vcard:disabled {
	cursor: not-allowed;
	opacity: .4;
}

.it-vcard__swatch {
	flex: none;
	width: 1.75rem;
	height: 1.75rem;
	border: 1px solid rgb( 127 127 127 / .45 );
	border-radius: 50%;
	background: var( --it-swatch, transparent );
}

.it-vcard__text {
	display: flex;
	flex-direction: column;
	gap: .15rem;
	min-width: 0;
}

.it-vcard__name {
	font-weight: 600;
	line-height: 1.25;
}

.it-vcard__note {
	font-size: .8125rem;
	line-height: 1.3;
	color: var( --c-text-dim, inherit );
	opacity: .9;
}

/* El total. */
.it-vtotal {
	display: flex;
	gap: 1rem;
	align-items: baseline;
	justify-content: space-between;
	max-width: 40rem;
	margin: 0 0 1rem;
	padding-top: 1rem;
	border-top: 1px solid var( --c-line, rgb( 127 127 127 / .25 ) );
}

.it-vtotal[hidden] {
	display: none;
}

.it-vtotal__label {
	font-family: var( --f-ui, inherit );
	font-size: .875rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var( --c-text-dim, inherit );
}

.it-vtotal__value {
	font-family: var( --f-display, inherit );
	font-size: clamp( 1.5rem, 1.2rem + 1.2vw, 2.25rem );
	font-weight: 800;
	line-height: 1;
	color: var( --c-text, inherit );
}

@media ( max-width: 30rem ) {
	.it-vcards {
		grid-template-columns: 1fr;
	}
}
