/*
 * Encabezado de ListingHive (páginas del tema, sobre todo con sesión) con las mismas medidas que el
 * encabezado de visitantes de Elementor: barra de 98 px y logo de 36 px en escritorio; 80 px y 27 px en móvil.
 * El tema estira el logo al 100 % del ancho (el <img> trae width="600"), por eso se fija la altura.
 */

.site-header .header-navbar {
	min-height: 98px;
	padding-top: 0;
	padding-bottom: 0;
	align-items: center;
	box-sizing: border-box;
}

.site-header .header-logo img {
	width: auto !important;
	height: 36px !important;
	max-width: none;
	object-fit: contain;
	object-position: left center;
}

/* El menú tenía margen negativo para ocupar el relleno vertical que ya no existe. */
.site-header .header-navbar__menu {
	margin-top: 0;
	margin-bottom: 0;
}

@media (max-width: 767px) {
	.site-header .header-navbar {
		min-height: 80px;
		padding-left: 18px !important;
		padding-right: 18px !important;
	}

	.site-header .header-navbar__start {
		justify-content: flex-start;
	}

	.site-header .header-logo img {
		height: 27px !important;
		max-width: 140px;
	}
}

/*
 * Formularios de HivePress más legibles (v0.11.1): publicar y editar anuncio, perfil, acceder y crear cuenta.
 * El tema pinta el texto con rgba(15,23,39,.65) y las notas "(opcional)" con .45, que en el celular se ven
 * grises y con poco contraste. Aquí: etiquetas y lo que escribe el vecino en tinta casi negra (#1B1B2F),
 * ayudas en gris oscuro (#3F4152, contraste 10:1 sobre blanco) y notas en #5A5C6E (6,6:1).
 * Los enlaces y los mensajes de error conservan su color.
 */
.hp-form .hp-field__label,
.hp-form .hp-form__field > label {
	color: #1B1B2F;
}

.hp-form .hp-field__label small {
	color: #5A5C6E;
}

.hp-form .hp-field__description,
.hp-form .hp-form__description,
.hp-form .hp-form__footer,
.hp-form .hp-form__action {
	color: #3F4152;
}

.hp-form input,
.hp-form select,
.hp-form textarea,
.hp-form .select2-container--default .select2-selection__rendered {
	color: #1B1B2F;
}

.hp-form ::placeholder {
	color: #5A5C6E;
	opacity: 1;
}

/* "Ocultar" y "Borrar" encima del formulario de editar anuncio. */
.hp-listing__action--hide,
.hp-listing__action--delete {
	color: #1B1B2F;
}

.hp-listing__action--hide i,
.hp-listing__action--delete i {
	color: #3F4152;
}

/*
 * v0.12.6: textos del menú del encabezado en negro (#000000), a petición del responsable del sitio: Inicio, Mi PH y
 * el nombre del usuario, también el elegido (sigue con su raya morada). Solo el primer nivel: el desplegable de la
 * cuenta (Mensajes, Ajustes, Desconectar) no cambia. También en el menú del celular (hamburguesa).
 */
.site-header .header-navbar__menu > .menu > .menu-item > a,
.site-header .header-navbar__menu > .menu > .menu-item > a span,
.site-header .header-navbar__burger > .menu > .menu-item > a,
.site-header .header-navbar__burger > .menu > .menu-item > a span {
	color: #000000 !important;
}

/*
 * v0.12.7: en la página del anuncio, "Añadir a favoritos" va justo a la derecha de las pestañas (Detalles, Editar) y
 * solo con el corazón, a petición del responsable del sitio. El texto sigue en la página para lectores de pantalla.
 * Los márgenes copian los de las pestañas del tema: -16px arriba y abajo desde 768 px; -16px arriba y 16px abajo antes.
 */
.hp-listing--view-page .hp-page__topbar--separate {
	flex-direction: row;
	justify-content: flex-start;
	align-items: stretch;
}

.hp-listing--view-page .hp-page__topbar--separate > .hp-menu--tabbed {
	width: auto;
	flex: 0 1 auto;
}

.hp-listing--view-page .hp-page__topbar--separate .hp-listing__actions--secondary {
	margin: -16px 0 16px 18px;
	align-items: center;
}

@media (min-width: 768px) {
	.hp-listing--view-page .hp-page__topbar--separate .hp-listing__actions--secondary {
		margin: 0 0 0 18px;
		align-self: center;
	}
}

.hp-listing--view-page .hp-listing__action--favorite span {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.hp-listing--view-page .hp-listing__action--favorite i {
	font-size: 20px;
	margin: 0;
}

/*
 * v0.13.0: "Anuncios recomendados" en la columna derecha de la página del anuncio (includes/recomendados.php):
 * foto cuadrada a la izquierda; título, «Reservado», zona y precio a la derecha.
 */
.vph-reco {
	margin-top: 24px;
	font-family: Montserrat, system-ui, sans-serif;
}

.vph-reco .vph-reco__tit {
	margin: 0 0 12px;
	font-size: 16px;
	font-weight: 700;
	color: #1B1B2F;
}

.vph-reco__lista {
	margin: 0;
	padding: 0;
	list-style: none;
	border: 1px solid #E6E3F7;
	border-radius: 12px;
	overflow: hidden;
	background: #FFFFFF;
}

.vph-reco__lista li + li {
	border-top: 1px solid #E6E3F7;
}

.vph-reco .vph-reco__item {
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 12px;
	color: #1B1B2F;
	text-decoration: none;
}

.vph-reco .vph-reco__item:hover {
	background: #F6F5FD;
}

.vph-reco__foto {
	flex: 0 0 72px;
	width: 72px;
	height: 72px;
	border-radius: 10px;
	overflow: hidden;
	background: #EEEBFC;
}

.vph-reco__foto img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.vph-reco__txt {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.vph-reco__nombre {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vph-reco__res {
	align-self: flex-start;
	font-size: 12px;
	color: #8A5A00;
	background: #FFF1C8;
	border-radius: 10px;
	padding: 1px 8px;
}

.vph-reco__zona {
	font-size: 13px;
	color: #5B5D70;
}

.vph-reco__precio {
	font-size: 15px;
	font-weight: 700;
	color: #6147C4;
}

/*
 * v0.13.1: en la tarjeta del vendedor de la página del anuncio, el icono pequeño de mensaje pasa a ser un botón
 * «Escribir al vendedor» en morado de Aladitoo, a petición del responsable del sitio. Abre la misma ventana de
 * HivePress (message_send_modal_<vendedor>). El texto va en ::after; el enlace conserva su title para lectores.
 */
.hp-listing--view-page .hp-vendor--view-block .hp-vendor__actions--primary {
	width: 100%;
	justify-content: center;
}

.hp-listing--view-page .hp-vendor--view-block .hp-vendor__action--message {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 24px;
	border-radius: 28px;
	background: #6147C4;
	color: #FFFFFF !important;
	font: 700 15px/1.2 Montserrat, system-ui, sans-serif;
	text-decoration: none;
	box-shadow: 0 6px 16px rgba(97, 71, 196, 0.28);
	transition: background-color 0.15s ease;
}

.hp-listing--view-page .hp-vendor--view-block .hp-vendor__action--message:hover,
.hp-listing--view-page .hp-vendor--view-block .hp-vendor__action--message:focus-visible {
	background: #4A33A3;
}

.hp-listing--view-page .hp-vendor--view-block .hp-vendor__action--message i {
	margin: 0;
	font-size: 18px;
	color: #FFFFFF !important;
}

.hp-listing--view-page .hp-vendor--view-block .hp-vendor__action--message::after {
	content: "Escribir al vendedor";
}

/*
 * v0.14.1: casilla "Soy mayor de 18 años y acepto los Términos..." al crear cuenta, más marcada y visible, a petición
 * del responsable del sitio: cuadro blanco con borde gris oscuro de 2px y esquinas redondeadas; marcada, en morado con
 * su check blanco. Los enlaces van subrayados. Solo esta casilla (name="vph_acepto").
 * Con !important porque el tema esconde la casilla real y dibuja una falsa muy tenue (span::before), y la página
 * Crear cuenta de Elementor fuerza la casilla del navegador (appearance: checkbox !important).
 */
.hp-form input[type="checkbox"][name="vph_acepto"] {
	-webkit-appearance: none !important;
	appearance: none !important;
	position: static !important;
	visibility: visible !important;
	opacity: 1 !important;
	flex: 0 0 auto;
	width: 22px !important;
	height: 22px !important;
	margin: 0 12px 0 0 !important;
	border: 2px solid #5A5C6E !important;
	border-radius: 5px !important;
	background: #fff center / 14px 14px no-repeat !important;
	cursor: pointer;
	vertical-align: middle;
	transition: background-color .15s, border-color .15s;
}

.hp-form input[type="checkbox"][name="vph_acepto"]:hover {
	border-color: #1B1B2F !important;
}

.hp-form input[type="checkbox"][name="vph_acepto"]:checked {
	border-color: #6147C4 !important;
	background-color: #6147C4 !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E") !important;
}

/* La casilla falsa del tema sobra. */
.hp-form input[type="checkbox"][name="vph_acepto"] + span::before,
.hp-form input[type="checkbox"][name="vph_acepto"] + span::after {
	display: none !important;
}

.hp-form input[type="checkbox"][name="vph_acepto"]:focus-visible {
	outline: 3px solid #A096F0;
	outline-offset: 2px;
}

.hp-form .hp-field--checkbox:has(input[name="vph_acepto"]) {
	display: flex;
	align-items: flex-start;
	color: #3F4152;
	cursor: pointer;
}

.hp-form .hp-field--checkbox:has(input[name="vph_acepto"]) > span {
	padding-top: 1px;
	padding-left: 0 !important;
}

.hp-form .hp-field--checkbox:has(input[name="vph_acepto"]) a {
	color: #1B1B2F;
	text-decoration: underline;
	text-underline-offset: 3px;
}
