/* SUNSET BLD – Lever et coucher du soleil
   Styles du plugin (la carte elle-même est stylée par leaflet.css) */

.sblcs-wrap {
	--sblcs-orange: #e8703a;
	--sblcs-orange-dark: #c9541f;
	--sblcs-navy: #1f2a44;
	--sblcs-bg: #fff9f4;
	--sblcs-border: #ecd9cb;
	box-sizing: border-box;
	max-width: 100%;
	margin: 1.5em 0;
	font-family: inherit;
}

.sblcs-wrap *,
.sblcs-wrap *::before,
.sblcs-wrap *::after {
	box-sizing: border-box;
}

/* Leaflet donne à ses contrôles/panneaux internes des z-index élevés (jusqu'à 1000).
   Sans confinement, ces valeurs se comparent directement aux éléments du thème
   (ex. un en-tête sticky en position fixed) et peuvent passer au-dessus au scroll.
   On force ici .sblcs-map à créer son propre contexte d'empilement (position +
   z-index explicites), ce qui garde tout Leaflet contenu à l'intérieur, quel que
   soit le z-index réellement utilisé par le thème. */
.sblcs-map {
	position: relative;
	z-index: 0;
	isolation: isolate;
}

.sblcs-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.sblcs-search {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 10px;
}

.sblcs-search-field {
	flex: 1 1 260px;
	min-width: 0;
}

.sblcs-search-input {
	width: 100%;
	border: 1px solid var(--sblcs-border);
	border-radius: 8px;
	padding: 10px 12px;
	font-size: 14px;
	background: #fff;
	color: var(--sblcs-navy);
}

.sblcs-search-input:focus {
	outline: 2px solid var(--sblcs-orange);
	outline-offset: 1px;
}

.sblcs-search-hint {
	margin: 0 0 10px;
	font-size: 12px;
	color: #948577;
}

.sblcs-search-message {
	margin: 0 0 14px;
	font-size: 13px;
	font-weight: 600;
	color: var(--sblcs-orange-dark);
}

.sblcs-search-message[hidden] {
	display: none;
}

.sblcs-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px;
	margin-bottom: 14px;
}

.sblcs-date-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 13px;
	font-weight: 600;
	color: var(--sblcs-navy);
}

.sblcs-date-input {
	border: 1px solid var(--sblcs-border);
	border-radius: 8px;
	padding: 8px 10px;
	font-size: 14px;
	background: #fff;
	color: var(--sblcs-navy);
}

.sblcs-btn {
	border: none;
	border-radius: 8px;
	padding: 10px 16px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.08s ease, box-shadow 0.15s ease, opacity 0.15s ease;
	line-height: 1.2;
}

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

.sblcs-btn-primary {
	background: linear-gradient(135deg, var(--sblcs-orange), var(--sblcs-orange-dark));
	color: #fff;
	box-shadow: 0 2px 8px rgba(232, 112, 58, 0.35);
}

.sblcs-btn-primary:hover {
	box-shadow: 0 4px 12px rgba(232, 112, 58, 0.45);
}

.sblcs-btn-secondary {
	background: #fff;
	color: var(--sblcs-navy);
	border: 1px solid var(--sblcs-border);
}

.sblcs-btn-secondary:hover {
	background: var(--sblcs-bg);
}

.sblcs-btn[disabled] {
	opacity: 0.6;
	cursor: default;
}

.sblcs-layout {
	display: flex;
	gap: 18px;
	align-items: stretch;
}

.sblcs-map {
	flex: 1 1 60%;
	min-width: 0;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid var(--sblcs-border);
	background: #eee;
}

.sblcs-panel {
	flex: 1 1 34%;
	min-width: 240px;
	background: var(--sblcs-bg);
	border: 1px solid var(--sblcs-border);
	border-radius: 12px;
	padding: 18px;
}

.sblcs-hint {
	margin: 0;
	color: #6b5d54;
	font-size: 14px;
	line-height: 1.5;
}

.sblcs-results[hidden] {
	display: none;
}

.sblcs-results-place {
	font-size: 13px;
	color: #6b5d54;
	margin: 0 0 4px;
}

.sblcs-results-tz {
	font-size: 13px;
	font-weight: 600;
	color: var(--sblcs-navy);
	margin: 0 0 14px;
}

.sblcs-daylength {
	display: inline-block;
	background: #fff;
	border: 1px solid var(--sblcs-border);
	border-radius: 999px;
	padding: 4px 12px;
	font-size: 13px;
	font-weight: 700;
	color: var(--sblcs-orange-dark);
	margin-bottom: 14px;
}

.sblcs-times {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 8px;
}

.sblcs-times li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 10px;
	padding: 7px 0;
	border-bottom: 1px dashed var(--sblcs-border);
	font-size: 14px;
}

.sblcs-times li:last-child {
	border-bottom: none;
}

.sblcs-times .sblcs-label {
	color: #55483f;
}

.sblcs-times .sblcs-value {
	font-weight: 700;
	color: var(--sblcs-navy);
	white-space: nowrap;
}

.sblcs-times li.sblcs-emphasis .sblcs-label,
.sblcs-times li.sblcs-emphasis .sblcs-value {
	color: var(--sblcs-orange-dark);
}

.sblcs-special-message {
	background: #fff4e8;
	border: 1px solid var(--sblcs-orange);
	color: var(--sblcs-orange-dark);
	border-radius: 8px;
	padding: 10px 12px;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 14px;
}

.sblcs-marker-pulse {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--sblcs-orange);
	border: 2px solid #fff;
	box-shadow: 0 0 0 3px rgba(232, 112, 58, 0.35);
}

@media (max-width: 720px) {
	.sblcs-layout {
		flex-direction: column;
	}

	/* En colonne, l'axe principal devient la hauteur : un flex-basis en % (hérité
	   de la mise en page desktop) s'appliquerait à la hauteur et l'emporterait sur
	   la hauteur fixe de la carte (les tuiles Leaflet sont en position absolute et
	   ne comptent pour rien dans la hauteur "de contenu", d'où l'écrasement à
	   quasiment 0px). On repasse donc la carte en taille fixe (sa hauteur inline
	   fait foi) et le panneau en hauteur automatique.
	*/
	.sblcs-map {
		flex: 0 0 auto;
		width: 100%;
	}

	.sblcs-panel {
		flex: 1 1 auto;
		min-width: 0;
	}
}
