/**
 * Estilos del popup de aviso de distribuidores.
 * Prefijo .qhm- para no colisionar con el tema ni con otros plugins.
 */

.qhm-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba( 0, 0, 0, 0.65 );
	opacity: 0;
	transition: opacity 0.2s ease;
	box-sizing: border-box;
}

.qhm-overlay.qhm-visible {
	opacity: 1;
}

.qhm-modal {
	position: relative;
	width: 100%;
	max-width: 460px;
	max-height: calc( 100vh - 40px );
	overflow-y: auto;
	background: #fff;
	color: #222;
	border-radius: 12px;
	/* Padding-top amplio para que el texto nunca quede bajo el botón cerrar. */
	padding: 46px 28px 26px;
	box-shadow: 0 20px 60px rgba( 0, 0, 0, 0.3 );
	text-align: center;
	box-sizing: border-box;
	transform: translateY( 8px );
	transition: transform 0.2s ease;
	font-family: inherit;
	line-height: 1.5;
}

.qhm-overlay.qhm-visible .qhm-modal {
	transform: translateY( 0 );
}

/* Reset fuerte para que el tema no pinte la X como un botón con borde/fondo. */
.qhm-modal .qhm-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 0 !important;
	outline: none;
	background: transparent !important;
	box-shadow: none !important;
	-webkit-appearance: none;
	appearance: none;
	color: #999;
	font-size: 26px;
	line-height: 1;
	font-weight: 400;
	text-align: center;
	cursor: pointer;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.15s ease, background 0.15s ease;
}

.qhm-modal .qhm-close:hover,
.qhm-modal .qhm-close:focus {
	color: #222;
	background: rgba( 0, 0, 0, 0.07 ) !important;
}

.qhm-message {
	margin: 4px 0 22px;
	font-size: 16px;
	color: #333;
}

.qhm-distributors {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 18px;
}

.qhm-distributor-btn {
	display: block;
	padding: 13px 16px;
	background: #b8872a; /* Color de marca de Quesos HM. */
	color: #fff !important;
	text-decoration: none;
	font-weight: 600;
	font-size: 15px;
	border-radius: 8px;
	transition: background 0.15s ease, transform 0.05s ease;
	word-break: break-word;
}

.qhm-distributor-btn:hover {
	background: #9a7020;
	color: #fff !important;
}

.qhm-distributor-btn:active {
	transform: translateY( 1px );
}

.qhm-keep-here {
	display: inline-block;
	margin-top: 4px;
	border: 0;
	background: transparent;
	color: #888;
	font-size: 13px;
	text-decoration: underline;
	cursor: pointer;
	padding: 4px 8px;
}

.qhm-keep-here:hover {
	color: #555;
}

@media ( max-width: 480px ) {
	.qhm-modal {
		padding: 28px 18px 20px;
	}

	.qhm-message {
		font-size: 15px;
	}
}
