/* Hettstedt Live – Gulaschkanone Speiseplan (Kadence-kompatibel, nutzt Kadence-Palette mit Fallbacks) */

.hl-sp {
	--hl-sp-accent: var(--global-palette1, #2b6cb0);
	--hl-sp-text: var(--global-palette4, #1a202c);
	--hl-sp-muted: var(--global-palette5, #4a5568);
	--hl-sp-bg: var(--global-palette9, #ffffff);
	--hl-sp-bg-soft: var(--global-palette8, #f7fafc);
	--hl-sp-border: var(--global-palette7, #e2e8f0);
	--hl-sp-radius: 14px;

	box-sizing: border-box;
	width: 100%;
	color: var(--hl-sp-text);
}
.hl-sp *, .hl-sp *::before, .hl-sp *::after { box-sizing: inherit; }

/* Karten (Hinweis + Kacheln) */
.hl-sp__card {
	background: var(--hl-sp-bg);
	border: 1px solid var(--hl-sp-border);
	border-radius: var(--hl-sp-radius);
	padding: 16px 18px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Hinweiskarte im Browser */
.hl-sp__gate {
	text-align: center;
	border-left: 5px solid var(--hl-sp-accent);
	padding: 22px 20px;
}
.hl-sp__gate[hidden],
.hl-sp__plan[hidden],
.hl-sp__badge[hidden],
.hl-sp__empty[hidden],
.hl-sp__sub[hidden],
.hl-sp__expired[hidden],
.hl-sp__notes[hidden] { display: none !important; }
.hl-sp__gate-icon { font-size: 2rem; line-height: 1; margin-bottom: 8px; }
.hl-sp__gate p { margin: 0; line-height: 1.55; }

/* Kopfzeile mit Datums-Badge */
.hl-sp__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 12px;
	margin-bottom: 12px;
}
.hl-sp__title { margin: 0; font-size: 1.2rem; line-height: 1.3; }
.hl-sp__badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--hl-sp-accent);
	color: #fff;
	font-size: 0.8rem;
	font-weight: 600;
	white-space: nowrap;
}

/* 2x2 Kachel-Grid */
.hl-sp__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}
.hl-sp__tile {
	margin: 0;
	padding: 12px 14px;
	background: var(--hl-sp-bg-soft);
	border: 1px solid var(--hl-sp-border);
	border-radius: var(--hl-sp-radius);
	white-space: pre-line;
	overflow-wrap: anywhere;
	font-size: 0.92rem;
	line-height: 1.5;
}
.hl-sp__tile--wide,
.hl-sp__tile:last-child:nth-child(odd) { grid-column: 1 / -1; }

.hl-sp__tile-title {
	display: block;
	margin-bottom: 4px;
	font-weight: 700;
	color: var(--hl-sp-accent);
}

.hl-sp__empty { margin: 0; text-align: center; color: var(--hl-sp-muted); }

/* Untertitel, Ablauf-Hinweis */
.hl-sp__sub { margin: -4px 0 12px; color: var(--hl-sp-muted); font-size: 0.9rem; }
.hl-sp__expired {
	margin: 0 0 12px;
	border-left: 5px solid #d69e2e;
	font-size: 0.9rem;
	line-height: 1.5;
}

/* Tageskarten */
.hl-sp__grid--days { grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) {
	.hl-sp__grid--days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hl-sp__grid--days .hl-sp__day:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

.hl-sp__day {
	background: var(--hl-sp-bg);
	border: 1px solid var(--hl-sp-border);
	border-radius: var(--hl-sp-radius);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	overflow: hidden;
}
.hl-sp__day.is-today { border-color: var(--hl-sp-accent); box-shadow: 0 0 0 2px var(--hl-sp-accent); }

.hl-sp__day-head {
	display: flex;
	align-items: baseline;
	gap: 8px;
	padding: 10px 14px;
	background: var(--hl-sp-bg-soft);
	border-bottom: 1px solid var(--hl-sp-border);
}
.hl-sp__day-name { font-weight: 700; font-size: 1.02rem; }
.hl-sp__day-date { color: var(--hl-sp-muted); font-size: 0.88rem; }
.hl-sp__today-badge {
	margin-left: auto;
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--hl-sp-accent);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.hl-sp__entry { padding: 10px 14px 12px; }
.hl-sp__entry + .hl-sp__entry { border-top: 1px dashed var(--hl-sp-border); }
.hl-sp__provider {
	margin: 0 0 6px;
	font-size: 0.95rem;
	line-height: 1.3;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 8px;
}
.hl-sp__loc { font-weight: 400; color: var(--hl-sp-muted); font-size: 0.78rem; }
.hl-sp__price { font-weight: 700; font-size: 0.92rem; color: var(--hl-sp-accent); }
.hl-sp__items { display: grid; gap: 8px; }
.hl-sp__item { display: grid; gap: 1px; line-height: 1.45; overflow-wrap: anywhere; }
.hl-sp__label {
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--hl-sp-accent);
}
.hl-sp__item--main .hl-sp__value { font-weight: 600; font-size: 1rem; }
.hl-sp__item--more .hl-sp__value { color: var(--hl-sp-muted); font-size: 0.86rem; }
.hl-sp__item--more .hl-sp__label { color: var(--hl-sp-muted); }

/* Hinweise unter dem Plan */
.hl-sp__notes { margin-top: 12px; display: grid; gap: 8px; }
.hl-sp__note p { margin: 4px 0 0; }
.hl-sp__note-title { font-size: 0.85rem; }
.hl-sp__note--raw p { white-space: pre-line; }
.hl-sp__note {
	margin: 0;
	padding: 10px 14px;
	background: var(--hl-sp-bg-soft);
	border: 1px solid var(--hl-sp-border);
	border-radius: var(--hl-sp-radius);
	font-size: 0.85rem;
	line-height: 1.5;
}

@media (max-width: 340px) {
	.hl-sp__grid { grid-template-columns: 1fr; }
}

/* ---------- Öffentliche Web-Ansicht ---------- */
.hl-sp__public[hidden] { display: none !important; }
@media (display-mode: standalone) { .hl-sp__public { display: none; } }

.hl-sp__today { display: grid; gap: 12px; }
.hl-sp__none { margin: 0; padding: 14px; text-align: center; color: var(--hl-sp-muted); }
.hl-sp__item--closed .hl-sp__value { color: var(--hl-sp-muted); font-style: italic; }

/* PWA-Sperre */
.hl-sp__locks { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.hl-sp__lock {
	flex: 1 1 200px;
	padding: 10px 14px;
	border: 1px solid var(--hl-sp-accent);
	border-radius: 999px;
	background: var(--hl-sp-bg);
	color: var(--hl-sp-accent);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.hl-sp__lock:hover, .hl-sp__lock:focus-visible { background: var(--hl-sp-accent); color: #fff; }

/* Akquise-Box */
.hl-sp__acq {
	margin-top: 16px;
	padding: 12px 14px;
	border: 1px dashed var(--hl-sp-border);
	border-radius: var(--hl-sp-radius);
	background: var(--hl-sp-bg-soft);
	font-size: 0.85rem;
	color: var(--hl-sp-muted);
}
.hl-sp__acq p { margin: 0 0 8px; line-height: 1.5; }
.hl-sp__acq-btn {
	padding: 8px 14px;
	border: 0;
	border-radius: 8px;
	background: var(--hl-sp-accent);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

/* Install-Dialog */
.hl-sp__modal[hidden] { display: none !important; }
.hl-sp__modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, 0.55);
}
.hl-sp__modal-box {
	position: relative;
	width: 100%;
	max-width: 420px;
	padding: 22px 20px 20px;
	border-radius: var(--hl-sp-radius);
	background: var(--hl-sp-bg);
	color: var(--hl-sp-text);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}
.hl-sp__modal-box h4 { margin: 0 24px 8px 0; font-size: 1.1rem; }
.hl-sp__modal-box p { margin: 0 0 12px; line-height: 1.5; }
.hl-sp__modal-close {
	position: absolute;
	top: 8px;
	right: 10px;
	border: 0;
	background: transparent;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	color: var(--hl-sp-muted);
}
.hl-sp__install {
	width: 100%;
	padding: 10px 14px;
	border: 0;
	border-radius: 999px;
	background: var(--hl-sp-accent);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.hl-sp__install[hidden] { display: none; }
.hl-sp__howto { font-size: 0.9rem; color: var(--hl-sp-muted); }
.hl-sp__howto:empty { display: none; }

/* ---------- PWA: feste Werbeplätze ---------- */
.hl-sp__ad {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 250px;
	margin: 4px 0;
	overflow: hidden;
	contain: layout;
}
.hl-sp__ad.is-empty { min-height: 0; margin: 0; }

/* ---------- PWA: Standorte ---------- */
.hl-sp__locs { margin-top: 16px; display: grid; gap: 8px; }
.hl-sp__locs[hidden] { display: none !important; }
.hl-sp__locs-title { margin: 0; font-size: 1.05rem; }
.hl-sp__loc-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 8px 0;
	border-top: 1px solid var(--hl-sp-border);
}
.hl-sp__loc-info { display: grid; gap: 1px; min-width: 0; }
.hl-sp__loc-name { font-weight: 600; }
.hl-sp__loc-addr { font-size: 0.82rem; color: var(--hl-sp-muted); }
.hl-sp__nav {
	flex: 0 0 auto;
	padding: 7px 12px;
	border-radius: 999px;
	background: var(--hl-sp-accent);
	color: #fff;
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

/* ---------- Melden-Dialog ---------- */
.hl-sp__field { display: grid; gap: 4px; margin: 0 0 10px; font-size: 0.88rem; font-weight: 600; }
.hl-sp__field input {
	width: 100%;
	padding: 9px 11px;
	border: 1px solid var(--hl-sp-border);
	border-radius: 8px;
	font: inherit;
	font-weight: 400;
	background: #fff;
	color: #1a202c;
}
.hl-sp__field input.is-invalid { border-color: #c53030; box-shadow: 0 0 0 2px rgba(197, 48, 48, 0.2); }

/* ---------- PWA: Hinweise und Standorte je Tageskachel ---------- */
.hl-sp__daynote {
	margin: 10px 0 0;
	padding: 7px 10px;
	border-left: 3px solid #d69e2e;
	background: rgba(214, 158, 46, 0.1);
	border-radius: 0 8px 8px 0;
	font-size: 0.82rem;
	line-height: 1.45;
}
.hl-sp__stops { list-style: none; margin: 10px 0 0; padding: 0; display: grid; }
.hl-sp__stop {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 5px 0;
	border-top: 1px solid var(--hl-sp-border);
	font-size: 0.88rem;
}
.hl-sp__stop:first-child { border-top: 0; }
.hl-sp__stop-info { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.hl-sp__stop-name { font-weight: 600; }
.hl-sp__stop-state { font-size: 0.72rem; color: #c53030; text-transform: uppercase; letter-spacing: 0.03em; font-weight: 700; }
.hl-sp__stop.is-closed .hl-sp__stop-name { color: var(--hl-sp-muted); font-weight: 500; }
.hl-sp__go {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: 1.5px solid var(--hl-sp-accent);
	border-radius: 50%;
	color: var(--hl-sp-accent);
	background: transparent;
	text-decoration: none;
}
.hl-sp__go:hover, .hl-sp__go:focus-visible { background: var(--hl-sp-accent); color: #fff; }
.hl-sp__go svg { display: block; transform: rotate(0deg); }
