/*
 * Estilos del frontend del plugin "Buscador de Rutas para Elementor".
 * Todo namespaced con el prefijo .bre- para evitar conflictos de especificidad
 * con el theme activo (sección 9).
 */

.bre-search-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 24px;
}

.bre-search-form__input {
	position: relative;
	display: flex;
	align-items: center;
	background: #ffffff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 4px 12px;
}

.bre-search-form__icon {
	margin-right: 8px;
	opacity: 0.6;
}

.bre-search-input {
	flex: 1;
	border: none;
	outline: none;
	background: transparent;
	padding: 10px 4px;
	font-size: 1rem;
}

.bre-search-form__selects {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.bre-search-form__selects select {
	flex: 1 1 200px;
	padding: 8px 12px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background: #ffffff;
}

.bre-search-form__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.bre-chip {
	cursor: pointer;
	padding: 6px 14px;
	border-radius: 999px;
	border: 1.5px solid #cccccc;
	background: #ffffff;
	font-size: 0.85rem;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.bre-chip.is-active {
	color: #ffffff !important;
	background-color: currentColor;
}

.bre-chip:hover {
	opacity: 0.85;
}

/* --- Grid --- */

.bre-grid {
	--bre-cols-desktop: 3;
	--bre-cols-tablet: 2;
	--bre-cols-mobile: 1;
	display: grid;
	grid-template-columns: repeat( var( --bre-cols-desktop ), 1fr );
	gap: 24px;
}

@media ( max-width: 1024px ) {
	.bre-grid {
		grid-template-columns: repeat( var( --bre-cols-tablet ), 1fr );
	}
}

@media ( max-width: 768px ) {
	.bre-grid {
		grid-template-columns: repeat( var( --bre-cols-mobile ), 1fr );
	}
}

.bre-empty-state {
	grid-column: 1 / -1;
	text-align: center;
	padding: 32px 16px;
	color: #666666;
}

/* --- Tarjeta --- */

.bre-card {
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba( 0, 0, 0, 0.08 );
}

.bre-card__header {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 14px 16px 0;
}

.bre-card__icon {
	font-size: 1.1rem;
}

.bre-card__title {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	text-transform: uppercase;
	line-height: 1.3;
}

.bre-card__map {
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #f2f2f2;
	margin-top: 10px;
}

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

.bre-card__details {
	padding: 12px 16px 0;
	font-size: 0.9rem;
	line-height: 1.5;
}

.bre-card__details p {
	margin: 0 0 6px;
}

.bre-card__actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 14px 16px 16px;
	margin-top: auto;
}

.bre-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 14px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 0.9rem;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: filter 0.15s ease;
}

.bre-btn:hover {
	filter: brightness( 0.95 );
	text-decoration: none;
}

/* Paleta por defecto (sección 9), sobreescribible desde el Style tab de Elementor. */
.bre-btn--maps {
	background-color: #f5c518;
	color: #1b1b1b;
}

.bre-btn--flyer {
	background-color: #1b3a6b;
	color: #ffffff;
}

.bre-btn--whatsapp {
	background-color: #25d366;
	color: #ffffff;
}

.bre-btn--cargar-mas {
	align-self: center;
	background-color: #1b3a6b;
	color: #ffffff;
	margin-top: 16px;
}

.bre-grid-pagination {
	grid-column: 1 / -1;
	display: flex;
	justify-content: center;
}

.bre-grid-container.is-loading .bre-grid {
	opacity: 0.5;
	pointer-events: none;
}

.bre-editor-preview-note {
	padding: 16px;
	background: #f5f5f5;
	border: 1px dashed #cccccc;
	border-radius: 8px;
	font-size: 0.85rem;
	color: #666666;
	text-align: center;
}
