/* Farben und Abstände aus dem bisherigen Lovable-Projekt, als reines CSS. */

:root {
	--background: hsl(35 20% 98%);
	--foreground: hsl(20 14% 12%);
	--card: hsl(0 0% 100%);
	--muted: hsl(35 10% 96%);
	--muted-foreground: hsl(35 8% 45%);
	--border: hsl(35 20% 90%);
	--accent: hsl(140 48% 49%);
	--accent-foreground: hsl(0 0% 100%);
	--destructive: hsl(0 84% 60%);
	--orange-warm: hsl(16 85% 55%);
	--orange-light: hsl(16 100% 92%);
	--green-fresh: hsl(140 48% 49%);
	--green-light: hsl(140 40% 95%);
	--gradient-hero: linear-gradient(135deg, var(--orange-light), var(--green-light));
	--shadow-soft: 0 4px 20px -2px hsl(20 14% 12% / 0.1);
	--shadow-warm: 0 10px 30px -5px hsl(16 85% 55% / 0.2);
	--radius: 0.5rem;
}

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

/* Muss die display-Werte der Komponenten unten schlagen, sonst zeigt sich der
   Dialog trotz hidden-Attribut. */
[hidden] {
	display: none !important;
}

/* Hält den Platz des Scrollbalkens dauerhaft frei. Sonst wird die Seite beim
   Öffnen des Dialogs (body overflow: hidden) um dessen Breite breiter und der
   Inhalt dahinter springt. */
html {
	scrollbar-gutter: stable;
}

body {
	margin: 0;
	background: var(--background);
	color: var(--foreground);
	font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	display: block;
}

a {
	color: inherit;
}

.container {
	width: 100%;
	max-width: 1152px;
	margin: 0 auto;
	padding: 0 1rem;
}

.narrow {
	max-width: 896px;
	margin: 0 auto;
}

.center {
	text-align: center;
}

.muted {
	color: var(--muted-foreground);
}

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

/* Kopf- und Fußbereich */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: hsl(35 20% 98% / 0.95);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--border);
}

.site-header .inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-block: 0.75rem;
}

.site-header .brand {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	text-decoration: none;
}

.site-header .brand .icon {
	height: 2rem;
	width: auto;
}

.site-header .brand .wordmark {
	height: 3rem;
	width: auto;
}

.site-header .crest {
	height: 2.25rem;
	width: auto;
}

.site-footer {
	background: var(--foreground);
	color: var(--background);
}

.site-footer .inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 2rem;
	font-size: 0.875rem;
	color: hsl(35 20% 98% / 0.7);
}

.site-footer nav {
	display: flex;
	gap: 1.5rem;
}

.site-footer a {
	text-decoration: none;
}

.site-footer a:hover {
	color: var(--background);
}

/* Flächen */

.hero {
	background: var(--gradient-hero);
}

.section {
	padding-block: 3rem;
}

.section-muted {
	background: hsl(35 10% 96% / 0.5);
}

h1,
h2,
h3 {
	line-height: 1.2;
	margin: 0 0 0.75rem;
}

h1 {
	font-size: 1.75rem;
}

h2 {
	font-size: 1.5rem;
}

.accent {
	color: var(--accent);
}

.orange {
	color: var(--orange-warm);
}

@media (min-width: 1024px) {
	h1 {
		font-size: 3rem;
	}

	h2 {
		font-size: 2.25rem;
	}

	.section {
		padding-block: 5rem;
	}
}

/* Buttons */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	border: 0;
	border-radius: var(--radius);
	padding: 0.625rem 1.25rem;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	background: var(--green-fresh);
	color: #fff;
}

.btn:hover {
	opacity: 0.9;
}

.btn-block {
	width: 100%;
}

/* Abstimmungsseite */

.vote-hero {
	padding-block: 1.5rem;
}

.vote-hero h1 {
	font-size: 1.125rem;
}

.vote-hero .claim {
	margin: 0.5rem 0 0;
	font-weight: 600;
	color: var(--orange-warm);
}

.vote-hero figure {
	margin: 1rem 0 0;
	position: relative;
	border-radius: 1rem;
	overflow: hidden;
	border: 1px solid var(--border);
	box-shadow: var(--shadow-soft);
}

.vote-hero figure img {
	width: 100%;
	aspect-ratio: 16 / 9;
	max-height: 160px;
	object-fit: cover;
}

.vote-hero figcaption {
	position: absolute;
	right: 0;
	bottom: 0;
	padding: 0.125rem 0.375rem;
	font-size: 8px;
	line-height: 1.2;
	color: hsl(35 20% 98% / 0.6);
}

@media (min-width: 1024px) {
	.vote-hero {
		padding-block: 4rem;
	}

	.vote-hero h1 {
		font-size: 1.875rem;
	}

	.vote-hero figure img {
		max-height: none;
		height: 18rem;
	}
}

.restaurant-list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.restaurant {
	display: flex;
	width: 100%;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem;
	text-align: left;
	font: inherit;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 0.75rem;
	box-shadow: var(--shadow-soft);
	cursor: pointer;
	transition: transform 0.1s ease, border-color 0.2s ease;
}

.restaurant:active {
	transform: scale(0.97);
}

.restaurant[data-voted='true'] {
	border-color: var(--accent);
}

.restaurant img,
.restaurant .placeholder {
	height: 72px;
	width: 72px;
	flex: 0 0 auto;
	border-radius: 0.5rem;
	object-fit: cover;
	background: var(--muted);
}

.restaurant .text {
	flex: 1 1 auto;
	min-width: 0;
}

.restaurant .name {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.restaurant .prices {
	margin: 0.125rem 0 0;
	font-size: 0.875rem;
	color: var(--muted-foreground);
}

.restaurant .price-new {
	font-weight: 600;
	color: var(--green-fresh);
}

.restaurant .price-old {
	text-decoration: line-through;
}

.restaurant .notify {
	margin: 0.125rem 0 0;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--orange-warm);
	text-decoration: underline;
}

.restaurant .cta {
	flex: 0 0 auto;
	border-radius: 999px;
	background: var(--accent);
	color: var(--accent-foreground);
	padding: 0.375rem 0.75rem;
	font-size: 0.875rem;
	font-weight: 600;
}

.restaurant .check {
	flex: 0 0 auto;
	color: var(--accent);
}

.error {
	color: var(--destructive);
}

/* Dialog */

.overlay {
	position: fixed;
	inset: 0;
	z-index: 50;
	background: rgb(0 0 0 / 0.6);
}

.dialog {
	position: fixed;
	z-index: 51;
	display: flex;
	flex-direction: column;
	max-height: 90dvh;
	overflow: hidden;
	background: var(--background);
	box-shadow: var(--shadow-warm);
	inset: auto 0 0 0;
	border-top: 1px solid var(--border);
	border-radius: 1rem 1rem 0 0;
	animation: slide-up 0.2s ease-out;
}

@media (min-width: 641px) {
	.dialog {
		inset: 50% auto auto 50%;
		transform: translate(-50%, -50%);
		width: calc(100vw - 2rem);
		max-width: 480px;
		border: 1px solid var(--border);
		border-radius: 1rem;
		animation: zoom-in 0.2s ease-out;
	}
}

@keyframes slide-up {
	from {
		transform: translateY(100%);
	}
}

@keyframes zoom-in {
	from {
		transform: translate(-50%, -50%) scale(0.95);
		opacity: 0;
	}
}

.dialog .close {
	position: absolute;
	right: 0.75rem;
	top: 0.75rem;
	z-index: 1;
	border: 0;
	background: none;
	padding: 0.375rem;
	border-radius: 999px;
	color: var(--muted-foreground);
	cursor: pointer;
	line-height: 0;
}

.dialog .body {
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 1rem;
	padding-bottom: calc(1rem + env(safe-area-inset-bottom));
}

/* Der Abstand gehört auf die Kinder von Formular und Bestätigung, nicht auf die
   von .body — dort steht immer nur ein einziges Element. */
.dialog .body p,
.dialog .body h2 {
	margin: 0;
}

.dialog .body form > * + *,
.dialog .body > div > * + * {
	margin-top: 0.875rem;
}

.dialog .body form > button {
	margin-top: 1.25rem;
}

.dialog h2 {
	font-size: 1rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.gift {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	border: 1px solid var(--border);
	background: hsl(35 10% 96% / 0.6);
	border-radius: var(--radius);
	padding: 0.5rem 0.75rem;
}

.gift strong {
	display: block;
	font-size: 0.875rem;
}

.gift span {
	font-size: 0.75rem;
	color: var(--muted-foreground);
}

input[type='email'] {
	width: 100%;
	font: inherit;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--card);
	color: inherit;
}

input[type='email']:focus-visible {
	outline: 2px solid var(--orange-warm);
	outline-offset: 1px;
}

.consent {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-size: 0.75rem;
	color: var(--muted-foreground);
}

.consent input {
	margin: 0.15rem 0 0;
	accent-color: var(--green-fresh);
	width: 1rem;
	height: 1rem;
	flex: 0 0 auto;
}

/* Teilen */

.share {
	margin-top: 3rem;
	text-align: center;
}

.share .icons {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 1rem;
	margin-top: 0.75rem;
}

.share .icons a {
	width: 3rem;
	height: 3rem;
	border-radius: 999px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
}

.share .icons svg {
	width: 1.5rem;
	height: 1.5rem;
}

.share .neutral {
	background: var(--muted);
	border: 1px solid var(--border);
	font-weight: 700;
	font-size: 0.75rem;
}

/* Startseite */

.compare {
	display: grid;
	gap: 1.5rem;
	border: 1px solid hsl(16 85% 55% / 0.2);
	background: hsl(16 85% 55% / 0.06);
	border-radius: 0.75rem;
	padding: 1.5rem;
	margin: 1.5rem 0;
}

@media (min-width: 768px) {
	.compare {
		grid-template-columns: 1fr 1fr;
	}
}

.compare .amount {
	font-size: 1.875rem;
	font-weight: 700;
	margin: 0.5rem 0;
}

.compare .before .amount,
.compare .before .label {
	color: hsl(0 72% 51%);
}

.compare .after .amount,
.compare .after .label {
	color: hsl(142 71% 35%);
}

.compare .label {
	font-weight: 700;
}

.steps {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.steps li {
	background: var(--card);
	border: 1px solid var(--border);
	border-left: 4px solid var(--accent);
	border-radius: var(--radius);
	padding: 1.25rem;
	box-shadow: var(--shadow-soft);
}

.steps h3 {
	margin: 0 0 0.5rem;
	font-size: 1.125rem;
}

.steps p {
	margin: 0;
	color: var(--muted-foreground);
}

.steps .step-no {
	display: inline-block;
	margin-bottom: 0.5rem;
	border: 1px solid var(--accent);
	color: var(--accent);
	border-radius: 999px;
	padding: 0.125rem 0.625rem;
	font-size: 0.75rem;
	font-weight: 600;
}

.two-col {
	display: grid;
	gap: 3rem;
	align-items: center;
}

@media (min-width: 1024px) {
	.two-col {
		grid-template-columns: 1fr 1fr;
	}
}

.badge {
	display: inline-block;
	background: var(--green-light);
	color: hsl(140 60% 20%);
	border-radius: 999px;
	padding: 0.25rem 0.75rem;
	font-size: 0.875rem;
	font-weight: 600;
	margin-bottom: 1rem;
}

details.faq {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1rem 1.5rem;
	box-shadow: var(--shadow-soft);
	margin-bottom: 1rem;
}

details.faq summary {
	font-weight: 600;
	cursor: pointer;
}

details.faq summary:hover {
	color: var(--accent);
}

details.faq p {
	color: var(--muted-foreground);
	margin-bottom: 0;
}

.store-badges {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1rem;
}

.store-badges img {
	height: 12rem;
	width: auto;
}

.hero-image {
	border-radius: 1rem;
	overflow: hidden;
	box-shadow: var(--shadow-warm);
	border: 2px solid hsl(140 48% 49% / 0.2);
}
