/* Frühstückscafé Vorbestellung – Farben zentral hier ändern */
.fc-vb {
	--fc-accent: #464646;
	--fc-accent-hover: #2e2e2e;
	--fc-on-accent: #ffffff;
	--fc-ink: #1b1b1b;
	--fc-muted: #5c6166;
	--fc-line: #dadde2;
	--fc-surface: #ffffff;
	--fc-soft: #f3f5f5;
	--fc-error: #b3261e;
	--fc-radius: 6px;

	color: var(--fc-ink);
	/* Schrift des Themes (liegt auf dem eigenen Server, kein Google-Fonts-Abruf) */
	font-family: var(--wp--preset--font-family--manrope, -apple-system), "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;

	/* Weiße Karte in der Mitte, etwas breiter als die Theme-Spalte, mind. 16 px Rand */
	box-sizing: border-box;
	width: min(752px, 100vw - 32px);
	margin-block: 8px 48px;
	background: var(--fc-surface);
	border-radius: var(--fc-radius);
	box-shadow: 0 0 32px rgba(42, 42, 42, .1);
	overflow: clip;
}

/* Block-Themes (z. B. Twenty Twenty-Five) begrenzen Inhalte mit !important auf die
   Spaltenbreite. Für das Bestellformular gezielt aufheben. */
body .fc-vb {
	max-width: none !important;
	margin-left: calc(50% - min(376px, 50vw - 16px)) !important;
	margin-right: calc(50% - min(376px, 50vw - 16px)) !important;
}

/* ---------- Seite: farbiger Hintergrund wie bei Jotform ---------- */
body.fc-vb-page {
	background: #464646 !important;
}
body.fc-vb-page .wp-site-blocks { background: transparent !important; }
body.fc-vb-page header,
body.fc-vb-page footer,
body.fc-vb-page header a,
body.fc-vb-page footer a,
body.fc-vb-page .wp-block-site-title a,
body.fc-vb-page .wp-block-navigation a { color: #ffffff !important; }
/* Das Titelbild ersetzt den Seitentitel */
body.fc-vb-page .wp-block-post-title { display: none; }

/* ---------- Titelbild ---------- */
.fc-vb-hero {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 16px;
	padding: 28px 32px 0 36px;
	/* etwas heller als der Seitenhintergrund, damit sich die Karte abhebt */
	background: #5c5c5c;
	color: var(--fc-on-accent);
}
.fc-vb-hero-text { display: flex; flex-direction: column; gap: 6px; padding-bottom: 28px; }
.fc-vb .fc-vb-hero-title {
	margin: 0;
	color: var(--fc-on-accent);
	font-family: inherit;
	font-size: 32px;
	font-weight: 300;
	line-height: 1.15;
	letter-spacing: .01em;
	text-transform: uppercase;
	text-wrap: balance;
}
.fc-vb .fc-vb-hero-sub {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: rgba(255, 255, 255, .85);
}
.fc-vb-hero-media {
	align-self: end;
	width: 240px;
	aspect-ratio: 1;
	overflow: hidden;
}
.fc-vb-hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Titelbild mit Foto: Foto als Hintergrund, schwarz abgedunkelt wie auf der Startseite */
.fc-vb-hero.has-image {
	position: relative;
	overflow: hidden;
	grid-template-columns: 1fr;
	align-items: end; /* Text unten, damit oben im Foto z. B. der Schriftzug frei bleibt */
	min-height: 260px;
	padding: 32px 36px;
	background: #000000;
}
.fc-vb-hero-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.fc-vb-hero-dim { position: absolute; inset: 0; background: #000000; opacity: .7; }
.fc-vb-hero.has-image .fc-vb-hero-text { position: relative; z-index: 1; padding-bottom: 0; }

/* ---------- Inhalt der Karte ---------- */
.fc-vb-sheet { padding: 28px 36px 36px; }
.fc-vb *,
.fc-vb *::before,
.fc-vb *::after { box-sizing: border-box; }
.fc-vb [hidden] { display: none !important; }

.fc-vb-form { display: flex; flex-direction: column; }
.fc-vb-step { display: flex; flex-direction: column; gap: 20px; }

.fc-vb-intro {
	margin: 0 0 20px;
	padding: 10px 14px;
	background: var(--fc-soft);
	border-left: 4px solid var(--fc-accent);
	color: var(--fc-ink);
	border-radius: 4px;
	font-weight: 600;
}

.fc-vb .fc-vb-cat {
	margin: 8px 0 0;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--fc-line);
	font-family: inherit;
	font-size: 17px;
	font-weight: 700;
	color: var(--fc-ink);
}

/* ---------- Produktkarten ---------- */
.fc-vb-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}
.fc-vb-card {
	display: flex;
	flex-direction: column;
	background: var(--fc-surface);
	border: 1px solid var(--fc-line);
	border-radius: 4px;
	overflow: hidden;
	transition: border-color .15s, box-shadow .15s;
}
.fc-vb-card.is-selected {
	border-color: var(--fc-accent);
	box-shadow: 0 0 0 1px var(--fc-accent);
}
/* Bild immer im festen Format zuschneiden, egal ob Hoch- oder Querformat */
.fc-vb-img { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--fc-soft); }
.fc-vb-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* To-go-Zeichen oben rechts im Produktbild */
.fc-vb-img img.fc-vb-togo {
	inset: 3px 3px auto auto;
	width: 52px;
	height: 52px;
	object-fit: contain;
	filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .25));
}
.fc-vb-body { display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 14px; flex: 1; }
.fc-vb .fc-vb-name { margin: 0; font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--fc-ink); }
.fc-vb-desc { margin: 0; font-size: 13.5px; color: var(--fc-muted); }
.fc-vb-buy {
	margin-top: auto;
	padding-top: 6px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.fc-vb-price { font-size: 16px; font-weight: 700; color: var(--fc-accent); font-variant-numeric: tabular-nums; }

/* ---------- Mengenwahl ---------- */
.fc-vb-qty { display: inline-flex; align-items: center; gap: 4px; }
.fc-vb-qty button {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid var(--fc-accent);
	background: var(--fc-surface);
	color: var(--fc-accent);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}
.fc-vb-qty .fc-vb-plus { background: var(--fc-accent); color: var(--fc-on-accent); }
.fc-vb-qty button:hover { background: var(--fc-accent-hover); border-color: var(--fc-accent-hover); color: var(--fc-on-accent); }
.fc-vb-qty button:disabled { opacity: .35; cursor: default; background: var(--fc-surface); color: var(--fc-accent); border-color: var(--fc-accent); }
.fc-vb-count { min-width: 28px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Kleiner Hinweis mit Stern über dem Freitextfeld */
.fc-vb-footnote { margin: 0 0 -8px; font-size: 13px; color: var(--fc-muted); }
.fc-vb-footnote sup { font-size: 9px; margin-right: 2px; }

/* ---------- Felder ---------- */
.fc-vb-field { display: flex; flex-direction: column; gap: 6px; }
.fc-vb-field label { font-weight: 700; }
.fc-vb-opt { font-weight: 400; color: var(--fc-muted); }
.fc-vb-req { color: var(--fc-error); }
.fc-vb-field input,
.fc-vb-field select,
.fc-vb-field textarea {
	font: inherit;
	color: var(--fc-ink);
	background: var(--fc-surface);
	border: 1px solid #bdbdbd;
	border-radius: 8px;
	padding: 10px 12px;
	width: 100%;
}
.fc-vb-field textarea { resize: vertical; min-height: 84px; }
.fc-vb-field input:focus,
.fc-vb-field select:focus,
.fc-vb-field textarea:focus { outline: 2px solid var(--fc-accent); outline-offset: 1px; border-color: var(--fc-accent); }
.fc-vb-field .is-invalid { border-color: var(--fc-error); }

/* Honeypot unsichtbar */
.fc-vb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Buttons ---------- */
.fc-vb-btn {
	font: inherit;
	font-weight: 700;
	font-size: 17px;
	background: var(--fc-accent);
	color: var(--fc-on-accent);
	border: 0;
	border-radius: 999px;
	padding: 13px 28px;
	cursor: pointer;
	transition: background .15s;
}
.fc-vb-btn:hover { background: var(--fc-accent-hover); }
.fc-vb-btn:disabled { background: #9e9e9e; cursor: not-allowed; }
.fc-vb-btn:focus-visible,
.fc-vb-qty button:focus-visible,
.fc-vb-back:focus-visible,
.fc-vb-cart-toggle:focus-visible { outline: 3px solid var(--fc-accent); outline-offset: 3px; }
.fc-vb-btn.is-loading { opacity: .7; cursor: progress; }

/* ---------- Warenkorb-Leiste (klebt unten, solange das Formular sichtbar ist) ---------- */
.fc-vb-cart {
	position: sticky;
	bottom: 0;
	z-index: 20;
	background: var(--fc-surface);
	border: 1px solid var(--fc-accent);
	border-radius: var(--fc-radius) var(--fc-radius) 0 0;
	box-shadow: 0 -6px 20px rgba(0, 0, 0, .08);
	padding-bottom: env(safe-area-inset-bottom, 0px);
}
/* Hinweis „heute nicht mehr möglich“ direkt über dem Button */
.fc-vb-cart-closed {
	margin: 0;
	padding: 12px 16px;
	background: var(--fc-accent);
	color: var(--fc-on-accent);
	border-radius: calc(var(--fc-radius) - 1px) calc(var(--fc-radius) - 1px) 0 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.45;
}
.fc-vb-form.is-closed .fc-vb-cart-count { visibility: hidden; }

.fc-vb-cart-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 12px 10px 16px;
}
.fc-vb-cart-toggle {
	font: inherit;
	background: none;
	border: 0;
	padding: 4px 0;
	color: var(--fc-ink);
	text-align: left;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	line-height: 1.3;
}
.fc-vb-cart-toggle:disabled { cursor: default; }
.fc-vb-cart-count { font-size: 14px; color: var(--fc-muted); }
.fc-vb-cart-count::after { content: ""; }
.fc-vb-cart-toggle[aria-expanded="false"]:not(:disabled) .fc-vb-cart-count::after { content: " ▴"; }
.fc-vb-cart-toggle[aria-expanded="true"] .fc-vb-cart-count::after { content: " ▾"; }
.fc-vb-cart-total { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fc-vb-cart-list {
	border-bottom: 1px solid var(--fc-line);
	padding: 8px 16px;
	max-height: 40vh;
	overflow-y: auto;
}
.fc-vb-cart-row {
	display: grid;
	grid-template-columns: 1fr auto auto;
	align-items: center;
	gap: 12px;
	padding: 6px 0;
	border-top: 1px solid var(--fc-line);
	font-size: 15px;
}
.fc-vb-cart-row:first-child { border-top: 0; }
.fc-vb-cart-row .fc-vb-qty button { width: 30px; height: 30px; font-size: 16px; }
.fc-vb-cart-row .fc-vb-line { font-variant-numeric: tabular-nums; min-width: 70px; text-align: right; }

/* ---------- Schritt 2 ---------- */
.fc-vb-back {
	align-self: flex-start;
	font: inherit;
	background: none;
	border: 0;
	padding: 0;
	color: var(--fc-ink);
	text-decoration: underline;
	cursor: pointer;
}
.fc-vb-summary {
	background: var(--fc-soft);
	border-radius: var(--fc-radius);
	padding: 16px;
}
.fc-vb-summary h3 { margin: 0 0 8px; font-size: 18px; }
.fc-vb-summary-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.fc-vb-summary-table td,
.fc-vb-summary-table th { padding: 6px 0; border-top: 1px solid var(--fc-line); text-align: left; font-weight: 400; }
.fc-vb-summary-table tbody tr:first-child td { border-top: 0; }
.fc-vb-summary-table td:first-child { width: 48px; font-weight: 700; }
.fc-vb-summary-table td:last-child { text-align: right; white-space: nowrap; }
.fc-vb-summary-table tfoot th,
.fc-vb-summary-table tfoot td { border-top: 2px solid var(--fc-ink); font-weight: 700; font-size: 18px; }
.fc-vb-summary-table tfoot td { text-align: right; }
.fc-vb-summary-notes { margin: 12px 0 0; font-size: 14px; white-space: pre-wrap; }
.fc-vb-summary-notes strong { display: block; }

.fc-vb-hint {
	margin: 0;
	padding: 12px 16px;
	border-left: 4px solid var(--fc-accent);
	background: var(--fc-soft);
	font-weight: 600;
}
.fc-vb-error {
	margin: 0;
	padding: 12px 16px;
	border-radius: 8px;
	background: #fdecea;
	color: var(--fc-error);
	font-weight: 600;
}
.fc-vb-submit { align-self: flex-start; min-width: 220px; }
.fc-vb-legal { margin: 0; font-size: 13px; color: var(--fc-muted); }
.fc-vb-legal a { color: inherit; }
.fc-vb-empty { padding: 24px; background: var(--fc-soft); border-radius: var(--fc-radius); }

/* ---------- Danke-Pop-up ---------- */
.fc-vb-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(0, 0, 0, .55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.fc-vb-modal-box {
	width: 100%;
	max-width: 420px;
	background: var(--fc-surface);
	border-radius: var(--fc-radius);
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
	animation: fc-vb-pop .2s ease-out;
}
.fc-vb-modal-head { background: var(--fc-accent); color: var(--fc-on-accent); padding: 18px 20px; }
.fc-vb-modal-head h3 { margin: 0; font-size: 21px; color: inherit; }
.fc-vb-modal-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 16px; }
.fc-vb-modal-text { margin: 0; }
.fc-vb-modal-close { align-self: flex-end; }

@keyframes fc-vb-pop { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
	.fc-vb-modal-box { animation: none; }
	.fc-vb-card { transition: none; }
}

@media (max-width: 700px) {
	.fc-vb-hero { padding: 20px 16px 0 20px; }
	.fc-vb-hero-text { padding-bottom: 20px; }
	.fc-vb .fc-vb-hero-title { font-size: 24px; }
	.fc-vb .fc-vb-hero-sub { font-size: 15px; }
	.fc-vb-hero-media { width: 120px; }
	.fc-vb-hero.has-image { min-height: 210px; padding: 20px; }
	.fc-vb-sheet { padding: 18px 16px 24px; }
	.fc-vb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.fc-vb-submit { align-self: stretch; }
}

/* Handy: eine Spalte, Bild quadratisch wie am Computer, damit nichts vom Produkt abgeschnitten wird */
@media (max-width: 480px) {
	.fc-vb-grid { grid-template-columns: 1fr; gap: 14px; }
}
