/* ==========================================================================
   Happy Login: el modal y lo que queda en lugar del precio y del botón.

   Los colores salen de variables que imprime PHP (ver HPL_Modal), así que
   este archivo es fijo y se cachea. El plugin del que viene esto armaba
   toda la hoja en PHP y la metía en línea en cada página: el mismo CSS,
   descargado de nuevo en cada visita y sin poder cachearse nunca.
   ========================================================================== */

.hpl-overlay,
.hpl-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
}

.hpl-overlay {
	background: rgba(0, 0, 0, .55);
	display: none;
}

.hpl-modal {
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.hpl-abierto .hpl-overlay,
.hpl-abierto .hpl-modal {
	display: block;
}

.hpl-abierto .hpl-modal {
	display: flex;
}

/* Con el modal abierto, el fondo no se desplaza. */
body.hpl-bloqueado {
	overflow: hidden;
}

.hpl-card {
	width: min(480px, 100%);
	max-height: 88vh;
	overflow: auto;
	background: var(--hpl-bg, #fff);
	color: var(--hpl-text, #111);
	border-radius: 12px;
	box-shadow: 0 12px 36px rgba(0, 0, 0, .25);
	border-top: var(--hpl-borde-alto, 4px) solid var(--hpl-borde, #e30613);
}

.hpl-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px;
	border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.hpl-titulo {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
}

.hpl-cerrar {
	padding: 6px 10px;
	border: none;
	border-radius: 8px;
	background: transparent;
	color: inherit;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.hpl-cerrar:hover {
	background: rgba(0, 0, 0, .06);
}

.hpl-body {
	padding: 18px;
}

.hpl-logo {
	display: flex;
	justify-content: center;
	margin: 6px 0 14px;
}

.hpl-logo img {
	height: var(--hpl-logo-alto, 40px);
	width: auto;
	object-fit: contain;
}

/* La explicación que viene del panel. Va antes del formulario y con el
   color del texto apagado: es el porqué, no una instrucción. */
.hpl-explicacion {
	margin: 0 0 14px;
	font-size: 13px;
	line-height: 1.45;
	opacity: .8;
}

.hpl-campo {
	display: flex;
	flex-direction: column;
	margin: 12px 0;
}

.hpl-campo label {
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 600;
}

.hpl-campo input {
	padding: 12px;
	border: 1px solid rgba(0, 0, 0, .15);
	border-radius: 8px;
	background: #fff;
	color: #111;
	font-size: 14px;
}

.hpl-campo input:focus {
	border-color: var(--hpl-link, #ff6600);
	outline: none;
	box-shadow: 0 0 0 3px rgba(0, 0, 0, .08);
}

.hpl-acciones {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 12px;
}

.hpl-btn {
	padding: 12px 18px;
	border: none;
	border-radius: 8px;
	background: var(--hpl-btn, #000);
	color: #fff;
	font-weight: 700;
	cursor: pointer;
	transition: background .2s ease;
}

.hpl-btn:hover {
	background: var(--hpl-btn-hover, #666);
}

.hpl-btn[disabled] {
	opacity: .6;
	cursor: not-allowed;
}

.hpl-enlace,
.hpl-enlace-btn {
	color: var(--hpl-link, #ff6600);
	font-size: 13px;
	text-decoration: none;
}

.hpl-enlace-btn {
	appearance: none;
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
	font: inherit;
	font-size: 13px;
	cursor: pointer;
}

.hpl-enlace:hover,
.hpl-enlace-btn:hover {
	color: var(--hpl-link-hover, #cc5200);
}

.hpl-recordarme {
	display: flex;
	align-items: center;
	gap: 8px;
}

.hpl-ayuda {
	margin-top: 6px;
	font-size: 12px;
	opacity: .8;
	white-space: pre-line;
}

.hpl-error,
.hpl-ok {
	display: none;
	margin: 10px 0;
	padding: 10px;
	border-radius: 8px;
}

.hpl-error {
	border: 1px solid #e30613;
	background: #ffe5e7;
	color: #a1000d;
}

.hpl-ok {
	border: 1px solid #28a745;
	background: #e6ffe6;
	color: #006c2e;
}

/* La barra de administración tapa el modal si no se corre. */
@media (min-width: 783px) {
	body.admin-bar .hpl-modal,
	body.admin-bar .hpl-overlay {
		top: 32px;
	}
}

/* --- Lo que queda en lugar del precio y del botón --------------------------
   El precio escondido es un botón sin pinta de botón: tiene que leerse
   como el texto que reemplaza al precio, pero se puede tocar y abre el
   modal. Un <span> con onclick no lo alcanzaría el teclado. */
.hpl-precio-oculto .hpl-abrir {
	padding: 0;
	border: none;
	background: transparent;
	color: var(--hpl-link, #ff6600);
	font: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.hpl-precio-oculto .hpl-abrir:hover {
	color: var(--hpl-link-hover, #cc5200);
}

/* El botón que reemplaza a "Añadir al carrito" lleva la clase .button del
   tema a propósito: así hereda el aspecto del botón de compra del sitio y
   no hay que repintarlo acá. */
.hpl-ficha-login {
	margin: 16px 0;
}
