/* Tante Hilde – Einkaufshelfer Dänemark
   Alle Regeln sind unter .thek gekapselt, damit das Theme unberührt bleibt. */

.thek {
	--thek-red: #dd3333;
	--thek-red-text: #c62828;
	--thek-red-dark: #b52626;
	--thek-red-soft: #fceded;
	--thek-ink: #1f2328;
	--thek-muted: #5f6670;
	--thek-line: #e3e6ea;
	--thek-bg: #ffffff;
	--thek-bg-soft: #f6f7f9;
	--thek-ok: #1e7b45;
	--thek-ok-soft: #e8f5ed;
	--thek-warn: #9a5b00;
	--thek-warn-soft: #fff4e0;
	--thek-closed: #b3261e;
	--thek-closed-soft: #fdebea;
	--thek-radius: 14px;
	color: var(--thek-ink);
	font-size: 16px;
	line-height: 1.55;
	margin: 1.5rem 0;
	position: relative;
}

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

.thek [hidden] {
	display: none !important;
}

.thek .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.thek p {
	margin: 0 0 .75rem;
}

.thek ul {
	margin: 0 0 .75rem;
	padding-left: 1.2rem;
}

.thek li {
	margin-bottom: .35rem;
}

/* ---------- Navigation ---------- */
.thek-nav {
	display: flex;
	gap: .4rem;
	overflow-x: auto;
	padding: .25rem 0 .75rem;
	margin-bottom: .5rem;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.thek-nav a {
	flex: 0 0 auto;
	padding: .45rem .8rem;
	border-radius: 999px;
	background: var(--thek-bg-soft);
	border: 1px solid var(--thek-line);
	color: var(--thek-ink);
	text-decoration: none !important;
	font-size: .9rem;
	white-space: nowrap;
}

.thek-nav a:hover,
.thek-nav a:focus-visible {
	border-color: var(--thek-red);
	color: var(--thek-red-text);
}

/* ---------- Karten ---------- */
.thek-card {
	background: var(--thek-bg);
	border: 1px solid var(--thek-line);
	border-top: 4px solid var(--thek-red);
	border-radius: var(--thek-radius);
	padding: 1.1rem 1rem;
	margin-bottom: 1.25rem;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
	scroll-margin-top: 90px;
}

.thek .thek-h {
	font-size: 1.25rem;
	line-height: 1.3;
	margin: 0 0 .75rem;
	padding: 0;
	border: 0;
}

.thek .thek-h4 {
	font-size: 1.05rem;
	margin: 1.1rem 0 .6rem;
	padding: 0;
}

.thek-small {
	font-size: .85rem;
	color: var(--thek-muted);
}

.thek-tip {
	background: var(--thek-bg-soft);
	border-radius: 10px;
	padding: .6rem .8rem;
	font-size: .95rem;
}

/* ---------- Status ---------- */
.thek-status {
	border-radius: 12px;
	padding: .8rem 1rem;
	margin-bottom: .75rem;
	background: var(--thek-bg-soft);
	border-left: 5px solid var(--thek-muted);
}

.thek-status p:last-child {
	margin-bottom: 0;
}

.thek-status__title {
	font-weight: 700;
	font-size: 1.05rem;
}

.thek-status--ok {
	background: var(--thek-ok-soft);
	border-left-color: var(--thek-ok);
}

.thek-status--warn {
	background: var(--thek-warn-soft);
	border-left-color: var(--thek-warn);
}

.thek-status--closed {
	background: var(--thek-closed-soft);
	border-left-color: var(--thek-closed);
}

/* ---------- Aufklapper ---------- */
.thek-details {
	border: 1px solid var(--thek-line);
	border-radius: 12px;
	margin-bottom: .6rem;
	background: var(--thek-bg);
}

.thek-details > summary {
	cursor: pointer;
	padding: .75rem 1rem;
	font-weight: 600;
	list-style: none;
	display: flex;
	align-items: center;
	gap: .5rem;
	min-height: 48px;
	-webkit-tap-highlight-color: transparent;
}

.thek-details > summary::-webkit-details-marker {
	display: none;
}

.thek-details > summary::after {
	content: "▾";
	margin-left: auto;
	color: var(--thek-muted);
	transition: transform .2s;
}

.thek-details[open] > summary::after {
	transform: rotate(180deg);
}

.thek-details__body {
	padding: 0 1rem 1rem;
}

.thek-count {
	font-size: .75rem;
	font-weight: 600;
	color: var(--thek-muted);
	background: var(--thek-bg-soft);
	border-radius: 999px;
	padding: .1rem .5rem;
}

/* ---------- Formulare ---------- */
.thek input[type="text"],
.thek input[type="search"],
.thek input[type="date"] {
	width: 100%;
	min-height: 48px;
	padding: .6rem .8rem;
	font-size: 16px;
	border: 1px solid #c9ced4;
	border-radius: 10px;
	background: #fff;
	color: var(--thek-ink);
	margin: 0;
	box-shadow: none;
}

.thek input:focus {
	outline: 2px solid var(--thek-red);
	outline-offset: 1px;
	border-color: var(--thek-red);
}

.thek-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: .6rem;
	margin-bottom: .75rem;
}

.thek-row--tight {
	grid-template-columns: 1fr auto;
}

.thek-field span {
	display: block;
	font-size: .85rem;
	font-weight: 600;
	margin-bottom: .25rem;
}

.thek-ort {
	display: grid;
	grid-template-columns: 1fr;
	gap: .5rem;
	margin-bottom: .4rem;
}

.thek-search {
	padding: .25rem 0 .5rem;
}

/* ---------- Buttons ---------- */
.thek .thek-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .35rem;
	min-height: 44px;
	padding: .55rem 1rem;
	border-radius: 10px;
	border: 1px solid var(--thek-red);
	background: var(--thek-red);
	color: #fff;
	font-size: .95rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none !important;
	text-transform: none;
	letter-spacing: normal;
}

.thek .thek-btn:hover {
	background: var(--thek-red-dark);
	border-color: var(--thek-red-dark);
	color: #fff;
}

.thek .thek-btn--ghost {
	background: #fff;
	color: var(--thek-red-text);
}

.thek .thek-btn--ghost:hover {
	background: var(--thek-red-soft);
	color: var(--thek-red-dark);
}

.thek .thek-btn--danger {
	background: #fff;
	color: var(--thek-muted);
	border-color: var(--thek-line);
}

.thek .thek-btn--danger.is-armed {
	background: var(--thek-closed);
	border-color: var(--thek-closed);
	color: #fff;
}

.thek .thek-btn--wide {
	width: 100%;
	margin-bottom: .75rem;
}

.thek-chips {
	display: flex;
	flex-wrap: wrap;
	gap: .45rem;
	margin: .5rem 0 .75rem;
}

.thek .thek-chip {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: .5rem .9rem;
	border-radius: 999px;
	border: 1px solid var(--thek-line);
	background: var(--thek-bg-soft);
	color: var(--thek-ink);
	font-size: .95rem;
	font-weight: 500;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none !important;
	text-transform: none;
	letter-spacing: normal;
}

.thek .thek-chip:hover,
.thek .thek-chip:focus-visible,
.thek .thek-chip[aria-expanded="true"] {
	border-color: var(--thek-red);
	background: var(--thek-red-soft);
	color: var(--thek-red-dark);
}

.thek .thek-chip--small {
	min-height: 40px;
	font-size: .9rem;
	padding: .4rem .8rem;
	background: #fff;
}

.thek-sub {
	padding: .6rem;
	margin-top: -.25rem;
	border-radius: 12px;
	background: var(--thek-red-soft);
}

.thek .thek-link {
	background: none;
	border: 0;
	padding: .25rem 0;
	color: var(--thek-red-text);
	font-weight: 600;
	font-size: .9rem;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
	text-transform: none;
	letter-spacing: normal;
}

.thek .thek-icon {
	width: 44px;
	height: 44px;
	flex: 0 0 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	border: 1px solid var(--thek-line);
	background: #fff;
	color: var(--thek-ink);
	font-size: 1.1rem;
	line-height: 1;
	padding: 0;
	cursor: pointer;
}

.thek .thek-icon:hover {
	border-color: var(--thek-red);
}

.thek .thek-icon--add {
	color: var(--thek-red-text);
	font-weight: 700;
	font-size: 1.3rem;
}

.thek .thek-icon--add.is-on {
	background: var(--thek-ok);
	border-color: var(--thek-ok);
	color: #fff;
	font-size: 1.1rem;
}

/* ---------- Feiertage im Zeitraum ---------- */
.thek .thek-days {
	list-style: none;
	padding: 0;
	margin: 0 0 .75rem;
}

.thek-day {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: .1rem .75rem;
	padding: .6rem .75rem;
	border-radius: 10px;
	background: var(--thek-bg-soft);
	margin-bottom: .4rem;
	border-left: 4px solid var(--thek-muted);
}

.thek-day__date {
	font-weight: 700;
}

.thek-day__name {
	grid-column: 1;
	font-size: .9rem;
	color: var(--thek-muted);
}

.thek-day__badge {
	grid-column: 2;
	grid-row: 1 / span 2;
	align-self: center;
	font-size: .78rem;
	font-weight: 700;
	padding: .2rem .55rem;
	border-radius: 999px;
	background: #fff;
	white-space: nowrap;
}

.thek-day--closed {
	border-left-color: var(--thek-closed);
}

.thek-day--closed .thek-day__badge {
	color: var(--thek-closed);
}

.thek-day--early {
	border-left-color: var(--thek-warn);
}

.thek-day--early .thek-day__badge {
	color: var(--thek-warn);
}

.thek-day--info {
	border-left-color: var(--thek-ok);
}

.thek-day--info .thek-day__badge {
	color: var(--thek-ok);
}

/* ---------- Märkte ---------- */
.thek-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: .65rem;
}

.thek-market,
.thek-info {
	border: 1px solid var(--thek-line);
	border-radius: 12px;
	padding: .8rem .9rem;
	background: var(--thek-bg);
}

.thek-market header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: .5rem;
	margin-bottom: .35rem;
}

.thek-market p {
	font-size: .92rem;
	color: var(--thek-muted);
	margin-bottom: .35rem;
}

.thek-price {
	font-weight: 700;
	letter-spacing: .05em;
	white-space: nowrap;
}

.thek-price .on {
	color: var(--thek-ok);
}

.thek-price .off {
	color: #cfd4da;
}

.thek-info {
	background: var(--thek-bg-soft);
	border: 0;
}

.thek-info .thek-h4 {
	margin-top: 0;
}

.thek-info ul {
	font-size: .95rem;
}

/* ---------- Dolmetscher ---------- */
.thek .thek-words {
	list-style: none;
	margin: 0;
	padding: 0 .5rem .5rem;
}

.thek-word {
	display: flex;
	align-items: center;
	gap: .5rem;
	padding: .55rem .5rem;
	border-top: 1px solid var(--thek-line);
	margin: 0 !important;
}

.thek-word__text {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.thek-da {
	font-weight: 700;
	font-size: 1.05rem;
}

.thek-de {
	color: var(--thek-ink);
}

.thek-note {
	font-size: .82rem;
	color: var(--thek-muted);
}

.thek-word__actions {
	display: flex;
	gap: .35rem;
	flex: 0 0 auto;
}

/* ---------- Einkaufszettel ---------- */
.thek .thek-list {
	list-style: none;
	padding: 0;
	margin: 0 0 .75rem;
}

.thek-item {
	display: flex;
	align-items: center;
	gap: .5rem;
	border-bottom: 1px solid var(--thek-line);
	padding: .35rem 0;
	margin: 0 !important;
}

.thek-item label {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	gap: .7rem;
	min-height: 44px;
	cursor: pointer;
	margin: 0;
}

.thek-item input[type="checkbox"] {
	width: 24px;
	height: 24px;
	accent-color: var(--thek-ok);
	flex: 0 0 24px;
	margin: 0;
}

.thek-item .thek-de {
	color: var(--thek-muted);
}

.thek-item.is-done label > span {
	text-decoration: line-through;
	opacity: .55;
}

.thek-empty {
	color: var(--thek-muted);
	font-style: italic;
}

.thek-actions {
	display: flex;
	flex-wrap: wrap;
	gap: .45rem;
}

.thek .thek-fab {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 999;
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	padding: .7rem 1rem;
	border-radius: 999px;
	background: var(--thek-red);
	color: #fff;
	font-weight: 700;
	text-decoration: none !important;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}

.thek .thek-fab:hover {
	background: var(--thek-red-dark);
	color: #fff;
}

/* ---------- Größere Bildschirme ---------- */
@media (min-width: 640px) {
	.thek-card {
		padding: 1.4rem 1.5rem;
	}

	.thek-row {
		grid-template-columns: 1fr 1fr;
	}

	.thek-row--tight {
		grid-template-columns: 1fr auto;
	}

	.thek-ort {
		grid-template-columns: 1fr auto;
	}

	.thek-grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (min-width: 960px) {
	.thek-grid:not(.thek-grid--info) {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media print {
	.thek-nav,
	.thek-fab,
	.thek-actions,
	.thek-search,
	.thek-icon {
		display: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.thek-details > summary::after {
		transition: none;
	}
}
