/**
 * Selector de compra única frente a suscripción.
 *
 * @package CodeCrafters\SuscripcionProductos
 */

.spc-purchase-options {
	margin: 0 0 1.5em;
}

.spc-purchase-options__title {
	display: block;
	margin-bottom: .6em;
	font-weight: 600;
}

.spc-purchase-options__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: .5em;
}

.spc-option {
	margin: 0;
	padding: 0;
}

.spc-option > label {
	display: flex;
	align-items: flex-start;
	gap: .7em;
	margin: 0;
	padding: .8em 1em;
	border: 1px solid currentColor;
	border-color: rgba(0, 0, 0, .18);
	border-radius: 6px;
	cursor: pointer;
	font-weight: 400;
}

.spc-option > label:hover {
	border-color: rgba(0, 0, 0, .4);
}

.spc-option input[type="radio"] {
	margin-top: .25em;
	flex: 0 0 auto;
}

.spc-option__body {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: .3em .8em;
	flex: 1 1 auto;
}

.spc-option__label {
	font-weight: 600;
}

.spc-option__every {
	margin-left: .35em;
	font-weight: 400;
	font-size: .875em;
	opacity: .7;
}

.spc-option__price {
	margin-left: auto;
	font-weight: 600;
	white-space: nowrap;
}

.spc-option__savings:not(:empty) {
	flex-basis: 100%;
	font-size: .85em;
	opacity: .85;
}

/* Resalta la opción elegida. En navegadores sin :has() el radio marcado
   sigue siendo la señal visual, así que la regla es puramente aditiva. */
.spc-option > label:has(input[type="radio"]:checked) {
	border-color: rgba(0, 0, 0, .65);
	border-width: 2px;
	padding: calc(.8em - 1px) calc(1em - 1px);
}

.spc-option--unavailable > label {
	opacity: .45;
	cursor: not-allowed;
}

.spc-purchase-options__note {
	margin: .8em 0 0;
	font-size: .85em;
	opacity: .75;
}

.spc-cart-interval {
	display: inline-block;
	font-size: .85em;
	opacity: .75;
}

/* Portal del cliente */

.spc-status {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 12px;
	font-size: .85em;
	font-weight: 600;
	background: rgba(0, 0, 0, .07);
}

.spc-status--active {
	background: #e3f4e6;
	color: #00680f;
}

.spc-status--paused {
	background: #fdf3d9;
	color: #7a5c00;
}

.spc-status--past_due {
	background: #fdeaea;
	color: #a3231f;
}

.spc-status--cancelled,
.spc-status--abandoned {
	background: rgba(0, 0, 0, .08);
	color: #5a5a5a;
}

.spc-actions {
	display: flex;
	flex-wrap: wrap;
	gap: .5em;
	margin: 1.2em 0;
}

.spc-action--danger {
	opacity: .85;
}

.spc-subscriptions-table small {
	opacity: .6;
}

.spc-purchase-options__login {
	margin: .8em 0 0;
	padding: .7em 1em;
	border-left: 3px solid currentColor;
	background: rgba(0, 0, 0, .04);
	font-size: .9em;
}

.spc-purchase-options__login a {
	font-weight: 600;
}
