/**
 * Widget « recherche + pastilles » (vignobles + appellations). Charte La Levée :
 * vert AB #00A651 / #007A3D, fond blanc, pills arrondies.
 * NB : la liste native .gfield_checkbox est masquée EN JS (inline), pas ici → dégradation propre.
 */

/* Champ Appellations masqué tant qu'aucun vignoble n'est coché (piloté par le JS) ;
   ré-affiché en <noscript> (cf. class-appellations-ux.php) si le JS est désactivé. */
.lalevee-appel-fieldhidden {
	display: none !important;
}

/* Vignobles + Appellations CÔTE À CÔTE (grille GF). Le champ vignoble masqué par le
   terroir est en display:none → la grille place le vignoble visible + appellations sur
   la même rangée. Empilé en 1 colonne sous 768px (responsive). */
@media (min-width: 768px) {
	.gform_fields > .lalevee-vignobles,
	.gform_fields > .lalevee-appellations {
		grid-column: span 6 !important;
	}
}

/* Compteur appellations « X / 6 » */
.lalevee-pill-counter {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 8px 0 0;
	padding: 6px 14px;
	border-radius: 999px;
	background: #f1faf4;
	border: 1px solid #d4edda;
	font-size: 13.5px;
	font-weight: 600;
	color: #1a1a1a;
}
.lalevee-pill-counter::before { content: "🍇"; }
.lalevee-pill-counter.is-max {
	background: #fff6ee;
	border-color: #f0c9a8;
	color: #b9521f;
}

/* Conteneur du widget */
.lalevee-pillbox-wrap {
	max-width: 640px;
	margin: 2px 0 6px;
}
/* Sous-conteneur boîte + dropdown : ancre le dropdown sous la BOÎTE (pas sous le compteur) */
.lalevee-pill-field {
	position: relative;
}

/* La « boîte » : pills + champ de recherche, façon tag-input */
.lalevee-pillbox {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	min-height: 42px;
	padding: 6px 10px;
	border: 1px solid #c3c4c7;
	border-radius: 10px;
	background: #fff;
	cursor: text;
}
.lalevee-pillbox:focus-within {
	border-color: #00a651;
	box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.12);
}

/* Pastilles */
.lalevee-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 6px 3px 12px;
	border-radius: 999px;
	background: #e6f5ec;
	border: 1px solid #b7e2c6;
	color: #007a3d;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	white-space: nowrap;
}
/* Bouton × : on NEUTRALISE le style « bouton » du thème (bleu, gros padding) avec
   une spécificité renforcée + !important, sinon il s'affiche en gros carré bleu. */
.lalevee-pillbox .lalevee-pill .lalevee-pill-x {
	-webkit-appearance: none !important;
	appearance: none !important;
	box-sizing: border-box !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex: 0 0 auto !important;
	width: 18px !important;
	height: 18px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: rgba(0, 122, 61, 0.14) !important;
	color: #007a3d !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	box-shadow: none !important;
	text-shadow: none !important;
	cursor: pointer !important;
}
.lalevee-pillbox .lalevee-pill .lalevee-pill-x:hover,
.lalevee-pillbox .lalevee-pill .lalevee-pill-x:focus {
	background: #007a3d !important;
	color: #fff !important;
	outline: none !important;
}

/* Champ de recherche interne (sans bordure) */
.lalevee-pill-search {
	flex: 1 1 140px;
	min-width: 140px;
	border: 0 !important;
	outline: none !important;
	padding: 4px 2px !important;
	margin: 0 !important;
	font-size: 14px;
	background: transparent !important;
	box-shadow: none !important;
}

/* Dropdown des options */
.lalevee-pill-dropdown {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 4px);
	z-index: 60;
	max-height: 280px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid #d6d6da;
	border-radius: 10px;
	box-shadow: 0 8px 26px rgba(20, 17, 31, 0.12);
	padding: 4px;
}
.lalevee-pill-option {
	padding: 8px 12px;
	border-radius: 7px;
	font-size: 14px;
	color: #1a1a1a;
	cursor: pointer;
}
.lalevee-pill-option:hover,
.lalevee-pill-option.is-active {
	background: #e6f5ec;
	color: #007a3d;
}
.lalevee-pill-empty,
.lalevee-pill-msg,
.lalevee-pill-more {
	padding: 8px 12px;
	font-size: 13px;
	color: #6b6358;
}
.lalevee-pill-msg {
	color: #b9521f;
	font-weight: 600;
}
.lalevee-pill-more {
	font-style: italic;
	border-top: 1px solid #f0f0f1;
}
