/* Oliebollen Bestelsysteem – frontend. Pas de kleuren aan via de variabelen in je thema. */

:root {
	--obe-accent: #b4541a;
	--obe-accent-contrast: #fff;
	--obe-border: rgba(0, 0, 0, 0.1);
	--obe-muted: #6b6b6b;
	--obe-surface: #fff;
	--obe-soft: rgba(0, 0, 0, 0.03);
	--obe-ok: #1f7a3a;
	--obe-error: #b3261e;
	--obe-radius: 12px;
}

.obe-container {
	max-width: 1000px;
	margin: 0 auto;
	padding: 24px 16px 96px;
}

.obe-title {
	margin: 0 0 24px;
}

/* ---------- Menu ---------- */

.obe-menu__category {
	margin: 0 0 40px;
}

.obe-menu__heading {
	margin: 0 0 8px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--obe-accent);
}

.obe-menu__intro {
	color: var(--obe-muted);
	margin-bottom: 12px;
}

.obe-row {
	display: grid;
	grid-template-columns: 96px 1fr auto;
	gap: 16px;
	align-items: center;
	padding: 16px 0;
	border-bottom: 1px solid var(--obe-border);
}

.obe-row__image img {
	width: 96px;
	height: 96px;
	object-fit: cover;
	border-radius: var(--obe-radius);
	display: block;
}

.obe-row__title {
	margin: 0 0 4px;
	font-size: 1.1em;
}

.obe-row__desc,
.obe-row__meta {
	margin: 0;
	color: var(--obe-muted);
	font-size: 0.92em;
}

.obe-row__desc p {
	margin: 0;
}

.obe-row__action {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
	min-width: 150px;
}

.obe-row__price {
	font-weight: 700;
	font-size: 1.1em;
}

.obe-row.is-unavailable {
	opacity: 0.6;
}

/* ---------- Aantal +/- ---------- */

.obe-qty {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid var(--obe-border);
	border-radius: 999px;
	overflow: hidden;
	background: var(--obe-surface);
}

.obe-qty .obe-step {
	width: 36px;
	min-height: 36px;
	border: 0;
	background: var(--obe-soft);
	color: inherit;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

.obe-qty .obe-step:hover:not(:disabled) {
	background: rgba(0, 0, 0, 0.08);
}

.obe-qty .obe-step:disabled {
	cursor: not-allowed;
	opacity: 0.4;
}

.obe-qty .obe-qty__input {
	width: 48px;
	border: 0;
	text-align: center;
	font-size: 16px;
	padding: 0;
	background: transparent;
	-moz-appearance: textfield;
	appearance: textfield;
}

.obe-qty .obe-qty__input::-webkit-outer-spin-button,
.obe-qty .obe-qty__input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.obe-order-btn,
.obe-dialog__submit,
.obe-cartbar__link {
	background: var(--obe-accent) !important;
	color: var(--obe-accent-contrast) !important;
	border: 0;
	border-radius: 999px !important;
	padding: 10px 20px !important;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
}

.obe-order-btn:disabled,
.obe-dialog__submit:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.is-busy {
	opacity: 0.7;
	pointer-events: none;
}

/* ---------- Popup ---------- */

.obe-dialog {
	width: min(520px, calc(100vw - 32px));
	max-height: calc(100vh - 48px);
	padding: 0;
	border: 0;
	border-radius: var(--obe-radius);
	background: var(--obe-surface);
	color: inherit;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.obe-dialog::backdrop {
	background: rgba(0, 0, 0, 0.45);
}

.obe-dialog__form {
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - 48px);
}

.obe-dialog__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--obe-border);
}

.obe-dialog__title {
	margin: 0;
	font-size: 1.25em;
}

.obe-dialog__close {
	border: 0;
	background: transparent;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: inherit;
	padding: 4px 8px;
}

.obe-dialog__body {
	padding: 16px 20px;
	overflow-y: auto;
}

.obe-dialog__intro {
	margin: 0 0 12px;
	color: var(--obe-muted);
}

.obe-choices {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.obe-choice {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 12px;
	border: 1px solid var(--obe-border);
	border-radius: 10px;
}

.obe-choice--radio {
	cursor: pointer;
	justify-content: flex-start;
}

.obe-choice--radio .obe-choice__name {
	flex: 1;
}

.obe-choice--radio:has(input:checked) {
	border-color: var(--obe-accent);
	box-shadow: inset 0 0 0 1px var(--obe-accent);
}

.obe-choice.is-unavailable {
	opacity: 0.5;
}

.obe-choice__price {
	color: var(--obe-muted);
	white-space: nowrap;
}

.obe-dialog__counter {
	margin: 14px 0 0;
	font-weight: 700;
}

.obe-dialog__counter.is-complete {
	color: var(--obe-ok);
}

.obe-dialog__counter.is-over {
	color: var(--obe-error);
}

.obe-dialog__error {
	margin: 0;
	padding: 0 20px;
	color: var(--obe-error);
}

.obe-dialog__error:empty {
	display: none;
}

.obe-dialog__footer {
	padding: 16px 20px;
	border-top: 1px solid var(--obe-border);
	display: flex;
	justify-content: flex-end;
}

/* ---------- Winkelwagenbalk en melding ---------- */

.obe-cartbar {
	position: fixed;
	left: 50%;
	bottom: 16px;
	z-index: 9990;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 10px 10px 10px 20px;
	max-width: calc(100vw - 32px);
	border-radius: 999px;
	background: #1d1d1d;
	color: #fff;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
	transform: translate(-50%, 140%);
	transition: transform 0.25s ease;
}

.obe-cartbar.is-visible {
	transform: translate(-50%, 0);
}

.obe-cartbar__text {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.obe-toast {
	position: fixed;
	top: 16px;
	left: 50%;
	z-index: 9999;
	max-width: calc(100vw - 32px);
	padding: 10px 18px;
	border-radius: 999px;
	background: var(--obe-ok);
	color: #fff;
	opacity: 0;
	transform: translate(-50%, -10px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.obe-toast.is-error {
	background: var(--obe-error);
}

.obe-toast.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

/* ---------- Winkelwagen en checkout ---------- */

.obe-bundle-title {
	font-weight: 600;
}

.obe-bundle-parts {
	margin: 6px 0 0 18px;
	padding: 0;
	font-size: 0.9em;
	color: var(--obe-muted);
	list-style: disc;
}

.obe-bundle-parts li {
	margin: 2px 0;
}

.obe-pickup {
	margin-top: 24px;
}

.obe-pickup__status {
	color: var(--obe-muted);
	font-weight: 600;
	min-height: 1.4em;
}

.obe-pickup__status.is-ok {
	color: var(--obe-ok);
}

/* ---------- Mobiel ---------- */

@media (max-width: 600px) {
	.obe-row {
		grid-template-columns: 72px 1fr;
	}

	.obe-row__image img {
		width: 72px;
		height: 72px;
	}

	.obe-row__action {
		grid-column: 1 / -1;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		flex-wrap: wrap;
		min-width: 0;
	}

	.obe-cartbar {
		left: 16px;
		right: 16px;
		justify-content: space-between;
		transform: translateY(140%);
	}

	.obe-cartbar.is-visible {
		transform: translateY(0);
	}
}
