.bepm-finalize-wrap {
	max-width: 960px;
	margin: 0 auto;
	padding: 2rem 1rem 4rem;
}

.bepm-finalize__title {
	font-size: 1.75rem;
	margin-bottom: 1.5rem;
}

/* Paso 1: shortcode [tutor_login] inline. El link nativo de Tutor se suprime
   en PHP (pre_option_users_can_register). Los estilos visuales del paso 1
   viven ahora dentro del modal de auth (ver bloque .bepm-auth-modal abajo). */

.bepm-register-toggle-row {
	font-size: 0.9rem;
}

.bepm-back-login {
	margin-bottom: 0.5rem;
}

#bepm-show-register:hover,
#bepm-show-register:focus,
#bepm-show-login:hover,
#bepm-show-login:focus {
	background: transparent !important;
	color: #7f23f9 !important;
	border-color: transparent !important;
	box-shadow: none !important;
}

/* Peso normal para los títulos de sección dentro del paso auth */
#bepm-auth-wrap .tutor-fw-medium {
	font-weight: 400 !important;
}

#bepm-login-section label[for="tutor-login-agmnt-1"] {
	font-size: 12px !important;
}

/* ── Formulario de registro: grid 2 columnas en desktop ─────────── */

/* Eliminar estilos propios de Tutor en #tutor-registration-wrap y el <form> */
#bepm-register-section #tutor-registration-wrap {
	padding: 0 !important;
	margin: 0 !important;
	max-width: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

#bepm-register-section #tutor-registration-form {
	padding: 0 !important;
}

#bepm-register-section .tutor-form-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1rem;
	margin-bottom: 0;
}

#bepm-register-section .tutor-form-col-6 {
	width: calc(50% - 0.5rem);
	min-width: 0;
}

#bepm-register-section .tutor-form-col-12 {
	width: 100%;
}

/* Ocultar labels; los placeholders describen cada campo */
#bepm-register-section .tutor-form-group label {
	display: none;
}

#bepm-register-section .tutor-form-group {
	margin-bottom: 1rem;
}

/* Contraseña y confirmación: cada campo ocupa la fila completa (clase añadida por JS) */
#bepm-register-section .bepm-passwords-row .tutor-form-col-6 {
	width: 100% !important;
}

/* Subtítulo de bienvenida en el registro */
.bepm-register-subtitle {
	font-size: 16px;
	line-height: 1.5;
}

/* Tablet y móvil: una sola columna */
@media (max-width: 767px) {
	#bepm-register-section .tutor-form-col-6 {
		width: 100%;
	}
}

.bepm-currency-switcher {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1.75rem;
}

.bepm-currency-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.45rem 0.875rem;
	border-radius: 8px;
	border: 1.5px solid #e5e7eb;
	background: #ffffff;
	text-decoration: none;
	font-size: 0.875rem;
	font-weight: 500;
	color: #374151;
	line-height: 1;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.bepm-currency-btn:hover {
	border-color: #7f23f9;
	color: #7f23f9;
	text-decoration: none;
}

.bepm-currency-btn.is-active {
	border-color: #5240e8;
	color: #5240e8;
}

.bepm-currency-btn__code {
	letter-spacing: 0.02em;
}

.bepm-currency-btn__price {
	font-size: 0.82em;
	opacity: 0.72;
	margin-left: 0.15rem;
}

.bepm-finalize__hint {
	font-size: 0.9rem;
	color: #555;
	margin-bottom: 1.5rem;
}

.bepm-checkout-embed .tutor-checkout-page {
	margin-top: 0;
}

/* ── Paso 2: estilos del checkout de Tutor ──────────────────────── */

.tutor-checkout-container {
	max-width: 1350px !important;
	padding-bottom: 150px !important;
}

.tutor-checkout-course-title {
	font-size: 20px !important;
	font-weight: 600;
}

.tutor-fs-5.tutor-fw-medium.tutor-color-black.tutor-border-bottom.tutor-pb-8 {
	display: none !important;
}

.tutor-checkout-course-plan-badge {
	display: none !important;
}

.tutor-checkout-page .tutor-checkout-course-thumb-title {
	grid-template-columns: 85px 1fr;
}


.tutor-checkout-billing .tutor-billing-fields .tutor-form-control {
	border-radius: 0;
	height: 50px;
}

.tutor-fw-bold {
	font-weight: 500 !important;
}

.tutor-checkout-details-inner {
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
	border-radius: 20px !important;
	padding: 24px !important;
	background-color: #ffffff !important;
}

@media (max-width: 480px) {
	.tutor-checkout-page .tutor-checkout-course-content {
		justify-content: space-between;
		align-items: flex-end;
		display: flex;
		flex-direction: column;
	}
}

/* Cupón: ocultar toggle y mostrar formulario siempre visible */
.tutor-checkout-summary-item.tutor-have-a-coupon {
	display: none !important;
}

.tutor-apply-coupon-form {
	display: flex !important;
	margin-top: 15px !important;
}

/* Botón Pay del dashboard de suscripciones.
 * Selector con specificidad alta (clase tutor-btn duplicada + tutor-btn-outline-primary + atributo)
 * para sobrescribir los estilos de la variante outline-primary de Tutor. */
button.tutor-btn.tutor-btn.tutor-btn-outline-primary[data-tutor-modal-target="payment_gateway_modal"],
.tutor-btn.tutor-btn.tutor-btn-outline-primary[data-tutor-modal-target="payment_gateway_modal"] {
	background-color: #5405bd !important;
	border-color: #5405bd !important;
	color: #ffffff !important;
	font-weight: 500 !important;
}

button.tutor-btn.tutor-btn.tutor-btn-outline-primary[data-tutor-modal-target="payment_gateway_modal"]:hover,
button.tutor-btn.tutor-btn.tutor-btn-outline-primary[data-tutor-modal-target="payment_gateway_modal"]:focus,
.tutor-btn.tutor-btn.tutor-btn-outline-primary[data-tutor-modal-target="payment_gateway_modal"]:hover,
.tutor-btn.tutor-btn.tutor-btn-outline-primary[data-tutor-modal-target="payment_gateway_modal"]:focus {
	background-color: #7f23f9 !important;
	border-color: #7f23f9 !important;
	color: #ffffff !important;
}

.bepm-alert {
	padding: 1rem;
	border-radius: 6px;
}

.bepm-alert--warning {
	background: #fff8e5;
	border: 1px solid #f0d000;
}

/* Dashboard de suscripciones: botones de acción */
.tutor-btn-sm {
	margin-top: 15px !important;
	padding: 5px 12px !important;
	font-size: 16px !important;
}

/* En tablet/mobile: apilar header del detalle de suscripción y desapilar los botones (Pay + Cancelar plan) */
@media (max-width: 991px) {
	.bepm-sub-header {
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 16px;
	}

	.bepm-sub-header > div:first-child {
		width: 100%;
	}

	.bepm-action-btns {
		display: block !important;
	}
}

/* Imagen del método de pago en checkout y modal de pago */
.tutor-checkout-payment-options .tutor-checkout-payment-item .tutor-payment-item-content img {
	max-width: 100px;
}

/* -----------------------------------------------------------------------
 * Free checkout (cupón 100% / total 0 €)
 *
 * El JS añade la clase .bepm-is-free-checkout al #tutor-checkout-form
 * cuando el resumen del pedido indica total = 0. Además mueve el botón
 * "Acceder al curso" dentro de .tutor-checkout-details-inner (junto al
 * resumen del pedido). Aquí ocultamos toda la columna del billing y
 * centramos la del resumen (sin estirarla) para que el card mantenga
 * su ancho original.
 *
 * Fallback para navegadores sin :has(): la primera regla oculta el
 * bloque .tutor-checkout-billing aunque la columna padre siga visible.
 * -------------------------------------------------------------------- */
#tutor-checkout-form.bepm-is-free-checkout .tutor-checkout-billing {
	display: none !important;
}

#tutor-checkout-form.bepm-is-free-checkout .tutor-row > .tutor-col-md-6:has(.tutor-checkout-billing) {
	display: none !important;
}

/* Centrar la columna del resumen en desktop manteniendo su ancho .tutor-col-md-6 (50%). */
@media (min-width: 768px) {
	#tutor-checkout-form.bepm-is-free-checkout .tutor-row > .tutor-col-md-6:has([tutor-checkout-details]),
	#tutor-checkout-form.bepm-is-free-checkout .tutor-row > [tutor-checkout-details].tutor-col-md-6 {
		margin-left: auto !important;
		margin-right: auto !important;
	}
}

/* Botón "Acceder al curso" reubicado dentro del card del resumen. */
#tutor-checkout-pay-now-button.bepm-pay-now-relocated {
	margin-top: 24px;
}

/* ===========================================================================
 * Modal de autenticación (Paso 1) sobre el checkout (Paso 2)
 * Aparece cuando el usuario llega a /finalizar-compra/ sin sesión.
 * ======================================================================== */

/* Bloqueo de scroll del body mientras el modal está abierto. */
body.bepm-auth-modal-open {
	overflow: hidden;
}

.bepm-auth-modal {
	position: fixed;
	inset: 0;
	background: rgba(58, 54, 78, 0.9);
	z-index: 99999;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	overflow-y: auto;
	padding: 40px 16px;
	-webkit-overflow-scrolling: touch;
}

.bepm-auth-modal__dialog {
	width: 92vw;
	max-width: 520px;
	background: #ffffff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
	margin: auto;
	position: relative;
}

.bepm-auth-modal__banner {
	position: relative;
	height: 160px;
	background-image: url("https://bepm.academy/wp-content/uploads/2026/05/bepm-banners-4.webp");
	background-size: cover;
	background-position: center bottom;
	background-repeat: no-repeat;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bepm-auth-modal__logo {
	height: 55px;
	max-width: 50%;
	width: auto;
	display: block;
}

.bepm-auth-modal__close {
	position: absolute;
	top: 10px;
	right: 12px;
	background: transparent;
	border: 0;
	color: #ffffff;
	font-size: 32px;
	line-height: 1;
	padding: 4px 10px;
	cursor: pointer;
	font-weight: 300;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.bepm-auth-modal__close:hover,
.bepm-auth-modal__close:focus,
.bepm-auth-modal__close:active {
	background: transparent !important;
	color: #ffffff !important;
	opacity: 1 !important;
	outline: none;
	box-shadow: none !important;
}

.bepm-auth-modal__tabs {
	display: flex;
	width: 100%;
	background: #ece8f1;
}

.bepm-auth-modal__tab {
	flex: 1 1 50%;
	padding: 14px 12px;
	font-size: 15px;
	font-weight: 500;
	color: #5a5570;
	background: #ece8f1;
	border: 0;
	cursor: pointer;
}

.bepm-auth-modal__tab:hover,
.bepm-auth-modal__tab:focus,
.bepm-auth-modal__tab:active {
	background: #ece8f1 !important;
	color: #5a5570 !important;
	outline: none;
	box-shadow: none !important;
}

.bepm-auth-modal__tab.is-active,
.bepm-auth-modal__tab.is-active:hover,
.bepm-auth-modal__tab.is-active:focus,
.bepm-auth-modal__tab.is-active:active {
	background: #ffffff !important;
	color: #5405bd !important;
	font-weight: 600;
}

.bepm-auth-modal__tab sup {
	font-size: 0.65em;
	margin-left: 1px;
}

.bepm-auth-modal__body {
	padding: 28px 28px 32px;
	max-height: calc(100vh - 280px);
	overflow-y: auto;
	background: #ffffff;
}

/* El shortcode [tutor_login] dentro del modal: las tabs reemplazan al toggle
   interno y al botón "Volver a iniciar sesión", así que los ocultamos. */
.bepm-auth-modal .bepm-register-toggle-row,
.bepm-auth-modal .bepm-back-login {
	display: none !important;
}

/* Quitar bordes/sombras propias de la página de login dentro del modal. */
.bepm-auth-modal #bepm-auth-wrap,
.bepm-auth-modal #bepm-login-section,
.bepm-auth-modal #bepm-register-section,
.bepm-auth-modal .tutor-template-segment,
.bepm-auth-modal .tutor-login-wrap,
.bepm-auth-modal .tutor-login-form-wrapper {
	background: transparent;
	box-shadow: none;
	border: 0;
	padding: 0;
	margin: 0;
	max-width: none;
}

/* Responsive */
@media (max-width: 480px) {
	.bepm-auth-modal {
		padding: 16px 8px;
	}

	.bepm-auth-modal__dialog {
		width: 96vw;
		border-radius: 12px;
	}

	.bepm-auth-modal__banner {
		height: 120px;
	}

	.bepm-auth-modal__logo {
		max-height: 52px;
	}

	.bepm-auth-modal__tab {
		font-size: 13px;
		padding: 12px 6px;
	}

	.bepm-auth-modal__body {
		padding: 20px 18px 24px;
		max-height: calc(100vh - 200px);
	}
}

