/*
 * Popup de compra en dos pasos. Antes vivía dentro de course-purchase.css; se separó al
 * rediseñarlo porque el popup lo comparten los tres shortcodes de venta.
 * Los !important son por el tema y Elementor, que estilan botones y enlaces del contenido.
 */

body.opo180-modal-open {
	overflow: hidden;
}

.opo180-course-modal {
	align-items: center;
	display: flex;
	inset: 0;
	justify-content: center;
	overflow-y: auto;
	padding: 20px;
	position: fixed;
	z-index: 9999;
}

.opo180-course-modal[hidden] {
	display: none;
}

.opo180-course-modal__overlay {
	background: rgba(20, 15, 12, 0.55);
	inset: 0;
	position: fixed;
}

/* Dos clases + !important: el tema limita el ancho de los bloques del contenido y gana a
   un selector de una sola clase. */
.opo180-course-modal .opo180-course-modal__content {
	background: #fff;
	border-radius: 24px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
	max-height: calc(100vh - 40px);
	max-width: 680px !important;
	overflow-y: auto;
	padding: 32px;
	position: relative;
	width: 100%;
	/* Algo del tema centra los [role="dialog"] con top/left al 50% + translate(-50%,-50%);
	   como aquí ya centra el flex del contenedor, esos desplazamientos se sumaban y el
	   popup salía descolocado. */
	inset: auto !important;
	transform: none !important;
}

.opo180-course-modal .opo180-course-modal__close {
	background: none !important;
	border: 0 !important;
	color: #2d2d2d !important;
	cursor: pointer !important;
	line-height: 0 !important;
	padding: 4px !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	height: auto !important;
	min-height: 0 !important;
	min-width: 0 !important;
	position: absolute;
	right: 26px;
	top: 28px;
	width: auto !important;
}

.opo180-course-modal .opo180-course-modal__close:hover {
	color: #c1301d !important;
}

.opo180-course-modal__badge {
	background: #fbe0da;
	border-radius: 999px;
	color: #2d2d2d;
	display: inline-block;
	font-family: "Satoshi", Sans-serif;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1.5px;
	line-height: 1.2;
	padding: 9px 18px;
	text-transform: uppercase;
}

.opo180-course-modal__title {
	color: #2d2d2d;
	font-family: "ClashDisplay", Sans-serif;
	font-size: 30px;
	font-weight: 500;
	line-height: 1.2;
	margin: 18px 0 0;
	padding-right: 32px;
}

.opo180-course-modal__product {
	align-items: center;
	background: #fef8e7;
	border-radius: 12px;
	column-gap: 16px;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	margin-top: 18px;
	padding: 16px 20px;
	row-gap: 4px;
}

.opo180-course-modal__product-name {
	color: #2d2d2d;
	font-family: "Satoshi", Sans-serif;
	font-size: 16px;
	font-weight: 700;
}

.opo180-course-modal__product-price {
	color: #c1301d;
	font-family: "Satoshi", Sans-serif;
	font-size: 16px;
	font-weight: 700;
}

.opo180-course-modal .opo180-course-modal__back {
	align-items: center;
	background: none !important;
	border: 0 !important;
	color: #6b6b6b !important;
	cursor: pointer !important;
	display: inline-flex !important;
	font-family: "Satoshi", Sans-serif;
	font-size: 13px !important;
	gap: 6px;
	margin: 18px 0 0 !important;
	padding: 0 !important;
}

.opo180-course-modal .opo180-course-modal__back:hover {
	color: #c1301d !important;
}

.opo180-course-modal__label {
	color: #6b6b6b;
	display: block;
	font-family: "Satoshi", Sans-serif;
	font-size: 14px;
	margin: 20px 0 10px;
}

.opo180-course-modal__list {
	border: 1px solid #e6e6e6;
	border-radius: 12px;
	max-height: 232px;
	overflow-y: auto;
	padding: 4px;
	scrollbar-color: #edb926 transparent;
	scrollbar-width: thin;
}

.opo180-course-modal__list::-webkit-scrollbar {
	width: 10px;
}

.opo180-course-modal__list::-webkit-scrollbar-track {
	background: transparent;
}

.opo180-course-modal__list::-webkit-scrollbar-thumb {
	background: #edb926;
	border: 3px solid #fff;
	border-radius: 999px;
}

.opo180-course-modal__option {
	align-items: center;
	color: #2d2d2d;
	cursor: pointer;
	display: flex;
	font-family: "Satoshi", Sans-serif;
	font-size: 14px;
	gap: 12px;
	line-height: 1.4;
	margin: 0;
	padding: 13px 14px;
	position: relative;
}

.opo180-course-modal__option + .opo180-course-modal__option::before {
	background: #ededed;
	content: "";
	height: 1px;
	left: 14px;
	position: absolute;
	right: 14px;
	top: 0;
}

.opo180-course-modal__option:hover:not(.is-owned):not(.is-locked) {
	background: #fdfaf2;
	border-radius: 8px;
}

.opo180-course-modal__option.is-owned {
	color: #9a9a9a;
	cursor: default;
}

.opo180-course-modal__option input {
	height: 0;
	opacity: 0;
	position: absolute;
	width: 0;
}

.opo180-course-modal__box {
	background: #fff;
	border: 1.5px solid #c9c9c9;
	border-radius: 5px;
	flex-shrink: 0;
	height: 19px;
	position: relative;
	transition:
		background-color 0.15s ease,
		border-color 0.15s ease;
	width: 19px;
}

.opo180-course-modal__option input:checked ~ .opo180-course-modal__box,
.opo180-course-modal__consent input:checked ~ .opo180-course-modal__box {
	background: #edb926;
	border-color: #edb926;
}

.opo180-course-modal__option input:checked ~ .opo180-course-modal__box::after,
.opo180-course-modal__consent input:checked ~ .opo180-course-modal__box::after {
	border: solid #fff;
	border-width: 0 2px 2px 0;
	content: "";
	height: 9px;
	left: 6px;
	position: absolute;
	top: 2px;
	transform: rotate(45deg);
	width: 5px;
}

.opo180-course-modal__option input:focus-visible ~ .opo180-course-modal__box,
.opo180-course-modal__consent input:focus-visible ~ .opo180-course-modal__box {
	outline: 2px solid #c1301d;
	outline-offset: 2px;
}

.opo180-course-modal__option-text {
	flex: 1;
}

/* "Curso completo" va en su propia caja, encima del listado de meses: es una decisión
   aparte, no un módulo más, y así no se pierde con el scroll. */
.opo180-course-modal__full {
	border: 1px solid #e6e6e6;
	border-radius: 12px;
	margin-bottom: 10px;
	padding: 4px;
}

.opo180-course-modal__full[hidden] {
	display: none;
}

.opo180-course-modal__option-save {
	color: #6b6b6b;
	font-size: 13px;
	margin-left: auto;
	white-space: nowrap;
}

/* Módulos que quedan marcados y bloqueados por "Curso completo". */
.opo180-course-modal__option.is-locked {
	cursor: default;
}

.opo180-course-modal__option.is-locked:hover {
	background: none;
}

.opo180-course-modal__option-note {
	color: #9a9a9a;
	font-size: 12px;
	font-style: italic;
}

.opo180-course-modal__empty {
	color: #6b6b6b;
	font-family: "Satoshi", Sans-serif;
	font-size: 14px;
	margin: 0;
	padding: 14px;
}

.opo180-course-modal__summary {
	align-items: center;
	background: #fef8e7;
	border-radius: 12px;
	column-gap: 12px;
	display: flex;
	/* Los precios no bajan nunca de línea: si falta sitio, quien se parte es el grupo de
	   la izquierda (recuento y píldora de ahorro). */
	flex-wrap: nowrap;
	font-family: "Satoshi", Sans-serif;
	justify-content: space-between;
	margin-top: 18px;
	padding: 14px 16px;
	row-gap: 8px;
}

.opo180-course-modal__summary[hidden] {
	display: none;
}

.opo180-course-modal__summary-hint,
.opo180-course-modal__summary-count {
	color: #2d2d2d;
	font-size: 14px;
}

.opo180-course-modal__summary-save {
	background: #ebf2ed;
	border-radius: 999px;
	color: #2d2d2d;
	font-size: 13px;
	padding: 5px 12px;
}

.opo180-course-modal__summary-left {
	align-items: center;
	column-gap: 10px;
	display: inline-flex;
	flex-wrap: wrap;
	min-width: 0;
	row-gap: 6px;
}

.opo180-course-modal__summary-prices {
	align-items: baseline;
	display: inline-flex;
	flex-shrink: 0;
	gap: 10px;
}

.opo180-course-modal__summary-prices s {
	color: #9a9a9a;
	font-size: 15px;
}

.opo180-course-modal__summary-total {
	color: #c1301d;
	font-size: 17px;
	font-weight: 700;
}

.opo180-course-modal__consents {
	display: grid;
	gap: 12px;
	margin-top: 16px;
}

.opo180-course-modal__consent {
	align-items: flex-start;
	background: #fef8e7;
	border-radius: 12px;
	color: #2d2d2d;
	cursor: pointer;
	display: flex;
	font-family: "Satoshi", Sans-serif;
	font-size: 13px;
	gap: 12px;
	line-height: 1.5;
	margin: 0;
	padding: 14px 16px;
	position: relative;
}

.opo180-course-modal__consent input {
	height: 0;
	opacity: 0;
	position: absolute;
	width: 0;
}

.opo180-course-modal__consent .opo180-course-modal__box {
	margin-top: 1px;
}

.opo180-course-modal__consent a {
	color: #c1301d !important;
	text-decoration: underline !important;
}

.opo180-course-modal__error {
	color: #c1301d;
	font-family: "Satoshi", Sans-serif;
	font-size: 13px;
	margin: 12px 0 0;
}

.opo180-course-modal__error[hidden] {
	display: none;
}

.opo180-course-modal__actions {
	margin-top: 20px;
}

.opo180-course-modal .opo180-course-modal__submit {
	background: #edb926 !important;
	border: 0 !important;
	border-radius: 999px !important;
	color: #2d2d2d !important;
	cursor: pointer !important;
	display: block !important;
	font-family: "Satoshi", Sans-serif;
	font-size: 15px !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	padding: 17px 24px !important;
	transition: background-color 0.15s ease;
	width: 100% !important;
}

.opo180-course-modal .opo180-course-modal__submit:hover:not(:disabled) {
	background: #d8a71c !important;
}

.opo180-course-modal .opo180-course-modal__submit:disabled {
	background: #f6ddaa !important;
	color: #a08e6a !important;
	cursor: not-allowed !important;
}

.opo180-course-modal .opo180-course-modal__submit[hidden] {
	display: none !important;
}

@media (max-width: 560px) {
	.opo180-course-modal {
		padding: 12px;
	}

	.opo180-course-modal__content {
		border-radius: 20px;
		padding: 24px 20px;
	}

	.opo180-course-modal .opo180-course-modal__close {
		right: 16px;
		top: 20px;
	}

	.opo180-course-modal__title {
		font-size: 24px;
	}

	.opo180-course-modal__product,
	.opo180-course-modal__summary {
		padding: 14px;
	}

	.opo180-course-modal__summary {
		flex-wrap: wrap;
	}
}
