/* ============================================================
   YG Widget Buscar — Estilos del widget frontend
   ============================================================ */

.yg-filter-widget {
	font-family: inherit;
}

/* Contador de resultados */
.yg-filter-count {
	font-size: 0.82em;
	color: #666;
	margin-bottom: 12px;
	min-height: 1em;
}

/* Grupo de filtro */
.yg-filter-group {
	margin-bottom: 18px;
}

/* Cabecera del grupo */
.yg-filter-header {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-bottom: 8px;
}

.yg-filter-label {
	font-weight: 600;
	font-size: 0.85em;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* Badge AND / OR */
.yg-logic-badge {
	display: inline-block;
	font-size: 0.62em;
	font-weight: 700;
	padding: 2px 7px;
	border-radius: 3px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	vertical-align: middle;
}

.yg-logic-badge[data-logic="AND"] {
	background: #2196f3;
	color: #fff;
}

.yg-logic-badge[data-logic="OR"] {
	background: #67b346;
	color: #fff;
}

/* ── Checkboxes ─────────────────────────────────────── */

.yg-filter-checkboxes {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.yg-filter-option {
	display: flex;
	align-items: center;
	gap: 7px;
	cursor: pointer;
	font-size: 0.9em;
	user-select: none;
}

.yg-filter-option input[type="checkbox"] {
	cursor: pointer;
	margin: 0;
	accent-color: #0073aa;
}

/* ── Select ─────────────────────────────────────────── */

.yg-filter-select {
	width: 100%;
	min-height: 90px;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 4px;
	font-size: 0.9em;
}

.yg-select-hint {
	display: block;
	margin-top: 4px;
	font-size: 0.75em;
	color: #999;
}

/* ── Botones / Pills ────────────────────────────────── */

.yg-filter-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.yg-filter-btn {
	padding: 5px 13px;
	border: 1px solid #ccc;
	border-radius: 20px;
	background: #fff;
	cursor: pointer;
	font-size: 0.82em;
	line-height: 1.4;
	transition: border-color 0.15s, background 0.15s, color 0.15s;
	color: inherit;
}

.yg-filter-btn:hover {
	border-color: #0073aa;
	color: #0073aa;
}

.yg-filter-btn.active {
	background: #0073aa;
	border-color: #0073aa;
	color: #fff;
}

/* ── Campo de texto ─────────────────────────────────── */

.yg-text-search-group .yg-filter-label {
	display: block;
	margin-bottom: 6px;
}

.yg-search-input-wrap {
	position: relative;
}

.yg-text-search {
	width: 100%;
	padding: 8px 34px 8px 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 0.9em;
	box-sizing: border-box;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.yg-text-search:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.18);
}

.yg-search-icon {
	position: absolute;
	right: 9px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 0.9em;
	pointer-events: none;
	opacity: 0.45;
}

/* ── Acciones ───────────────────────────────────────── */

.yg-filter-actions {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid #eee;
}

.yg-reset-btn {
	background: none;
	border: 1px solid #ccc;
	border-radius: 4px;
	padding: 6px 12px;
	cursor: pointer;
	font-size: 0.82em;
	color: #666;
	width: 100%;
	transition: border-color 0.15s, color 0.15s;
}

.yg-reset-btn:hover {
	border-color: #cc0000;
	color: #cc0000;
}

/* ── Loading ────────────────────────────────────────── */

.yg-loading {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 8px 0;
	font-size: 0.82em;
	color: #888;
}

.yg-spinner {
	display: inline-block;
	width: 15px;
	height: 15px;
	border: 2px solid #ddd;
	border-top-color: #0073aa;
	border-radius: 50%;
	animation: yg-spin 0.7s linear infinite;
	flex-shrink: 0;
}

@keyframes yg-spin {
	to { transform: rotate(360deg); }
}

/* ── Admin: sortable placeholder ────────────────────── */

.yg-sort-placeholder {
	border: 2px dashed #0073aa;
	background: #e8f4fb;
	border-radius: 3px;
	height: 40px;
	margin-bottom: 6px;
	list-style: none;
}

/* ── Lista desplegable (single select) ──────────────── */

.yg-filter-dropdown {
	width: 100%;
	padding: 7px 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 0.9em;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.15s;
}

.yg-filter-dropdown:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.18);
}

/* ── Sin resultados ─────────────────────────────────── */

.yg-no-results {
	padding: 16px;
	background: #f8f8f8;
	border: 1px solid #eee;
	border-radius: 4px;
	font-size: 0.9em;
	color: #555;
	text-align: center;
}
