/*
 * OrderFood: the own mini cart, the bar "View order" and the message with "Undo" (inc/orderfood/mini-cart.php,
 * js/orderfood-mini-cart.js; PLAN-MINI-WARENKORB.md). Replaces the styling of Flatsome's off-canvas cart in the Dolores
 * child theme (2026-10-27 to 2026-11-15), which keeps only its colours and fonts as the variables below.
 *
 * On phones a sheet from the bottom (as the product window), from 760px a drawer on the right of 420px. The lines: name,
 * price and − / + in one row (− at one is a bin), the extras below over the whole width.
 * Colours and fonts: the variables on :where(…) (no weight, a theme sets them on .orderfood-mini-cart,
 * .orderfood-cart-bar, .orderfood-toast). !important only against the theme's rules with !important or inline styles
 * (Flatsome rounds every button with !important).
 */

:where(.orderfood-mini-cart, .orderfood-cart-bar, .orderfood-toast) {
	--orderfood-accent: var(--fs-color-primary, #446084);
	--orderfood-accent-hover: var(--orderfood-accent);
	--orderfood-accent-ink: var(--orderfood-accent);
	--orderfood-accent-shadow: rgba(0, 0, 0, .25);
	--orderfood-title: var(--orderfood-accent);
	--orderfood-title-font: inherit;
	--orderfood-font: inherit;
	--orderfood-ink: #222;
	--orderfood-ink-soft: #666;
	--orderfood-line: #e2e2e2;
	--orderfood-bg: #fff;
	--orderfood-foot-bg: #fff;
	--orderfood-button: var(--fs-color-secondary, #d26e4b);
	--orderfood-button-hover: var(--orderfood-button);
	--orderfood-error: var(--fs-color-alert, #b20000);
	--orderfood-error-soft: #fbe9e7;
	--orderfood-overlay: rgba(0, 0, 0, .5);
	--orderfood-shadow: 0 2px 8px rgba(0, 0, 0, .12);
	/* the bar "View order": the accent unless a theme gives it its own colours */
	--orderfood-bar-bg: var(--orderfood-accent);
	--orderfood-bar-bg-hover: var(--orderfood-accent-hover);
	--orderfood-bar-ink: #fff;
	--orderfood-bar-count-bg: rgba(255, 255, 255, .2);
	--orderfood-bar-shadow: var(--orderfood-accent-shadow);
	--orderfood-toast-bg: #2a2420;
	--orderfood-toast-accent: #ffd36e;
	--orderfood-text-plus: 0px;
	--orderfood-text-stroke: 0px;
	--orderfood-empty-image: none;
}

/* --- Frame ------------------------------------------------------------------------------------------------------- */

.orderfood-mini-cart {display: none; position: fixed; inset: 0; z-index: 999990; font-family: var(--orderfood-font);}
.orderfood-mini-cart.is-open {display: block;}
html.orderfood-mini-cart-is-open {overflow: hidden;}
.orderfood-mini-cart-overlay {position: absolute; inset: 0; background: var(--orderfood-overlay); opacity: 0; transition: opacity .25s ease;}
.orderfood-mini-cart.is-shown .orderfood-mini-cart-overlay {opacity: 1;}
.orderfood-mini-cart-sheet {position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; box-sizing: border-box; max-height: 92vh; max-height: 92dvh; background: var(--orderfood-bg); border-radius: 24px 24px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .18); transform: translateY(105%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); outline: none;}
.orderfood-mini-cart-sheet::before {content: ""; flex: none; width: 44px; height: 5px; margin: 8px auto 0; border-radius: 3px; background: var(--orderfood-line);} /* handle of the sheet */
.orderfood-mini-cart.is-shown .orderfood-mini-cart-sheet {transform: none;}
.orderfood-mini-cart.is-swapped .orderfood-mini-cart-sheet {visibility: hidden; transition: none;} /* another sheet takes over (mini-cart.js close) */
@media (min-width: 760px) {
	.orderfood-mini-cart-sheet {top: 0; left: auto; width: 420px; max-height: none; border-radius: 24px 0 0 24px; transform: translateX(105%);}
	.orderfood-mini-cart-sheet::before {display: none;}
}
.orderfood-mini-cart .orderfood-mini-cart-close {position: absolute; top: 18px; right: 16px; z-index: 2; display: grid; place-items: center; box-sizing: border-box; width: 44px; height: 44px; min-width: 0; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 50% !important; background: #fff; color: var(--orderfood-ink); box-shadow: var(--orderfood-shadow); cursor: pointer;}
.orderfood-mini-cart .orderfood-mini-cart-close::before {content: "\2715"; font-size: 18px; line-height: 1;}
@media (min-width: 760px) {.orderfood-mini-cart .orderfood-mini-cart-close {top: 14px;}}

.orderfood-mini-cart .widget_shopping_cart_content {display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0;}
.orderfood-mini-cart-head {flex: none; padding: 14px 72px 8px 20px;}
.orderfood-mini-cart .orderfood-mini-cart-title {margin: 6px 0 0; padding: 0; font-family: var(--orderfood-title-font); font-size: 30px; font-weight: normal; line-height: 1; letter-spacing: 0; color: var(--orderfood-title);}
.orderfood-mini-cart-body {flex: 1 1 auto; min-height: 0; padding: 0 20px 12px; overflow-y: auto; overscroll-behavior: contain;}
/* lines and cross-sell suggestions: on phones one scrolling area (the suggestions at the end of the list, only
   "Checkout" stays), from 760px only the lines scroll and the suggestions stay above the foot */
.orderfood-mini-cart-scroll {display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;}
.orderfood-mini-cart-scroll > .orderfood-mini-cart-body {flex: 1 0 auto; overflow: visible;}
.orderfood-mini-cart-extras {flex: none; padding: 16px 20px 12px; border-top: 1px solid var(--orderfood-line); background: var(--orderfood-foot-bg);}
.orderfood-mini-cart-extras > :first-child {margin-top: 0; padding-top: 0; border-top: 0;}
@media (min-width: 760px) {
	.orderfood-mini-cart-scroll {overflow: hidden;}
	.orderfood-mini-cart-scroll > .orderfood-mini-cart-body {flex: 1 1 auto; overflow-y: auto;}
	.orderfood-mini-cart-scroll:has(> .orderfood-mini-cart-extras) + .orderfood-mini-cart-foot {padding-top: 0; border-top: 0;}
}
.orderfood-mini-cart-foot {flex: none; padding: 12px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--orderfood-line); background: var(--orderfood-foot-bg);}
@media (min-width: 760px) {.orderfood-mini-cart-foot {border-radius: 0 0 0 24px;}}

/* order type and time with "change" (cart.php) below the title */
.orderfood-mini-cart .orderfood-cart-mode {display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; margin: 6px 0 0; font-size: 16px; line-height: 1.3; color: var(--orderfood-ink-soft);}
.orderfood-mini-cart .orderfood-cart-mode .orderfood-cart-mode-change {min-width: 0; min-height: 40px; margin: 0; padding: 8px 4px; border: 0; border-radius: 0 !important; background: none; box-shadow: none; color: var(--orderfood-accent-ink); font: inherit; font-weight: bold; letter-spacing: 0; text-transform: none; text-decoration: underline; text-underline-offset: 3px;}
.orderfood-mini-cart .orderfood-cart-mode-pick > span::after {content: " ·";}

/* --- Lines ------------------------------------------------------------------------------------------------------- */

.orderfood-mini-cart .orderfood-mini-cart-list {margin: 0; padding: 0; list-style: none;}
.orderfood-mini-cart .orderfood-mini-cart-list > li {display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: center; min-height: 0; margin: 0; padding: 12px 0; list-style: none; font-size: calc(16px + var(--orderfood-text-plus)); font-weight: bold; line-height: 1.25; color: var(--orderfood-ink);}
.orderfood-mini-cart .orderfood-mini-cart-list > li + li {border-top: 1px solid var(--orderfood-line);}
.orderfood-mini-cart .orderfood-mini-cart-list > li.orderfood-busy {opacity: .55; transition: opacity .15s;}
.orderfood-mini-cart-name {min-width: 0;}
.orderfood-mini-cart-qty {grid-column: 2; grid-row: 1; display: flex; align-items: center; justify-content: flex-end; gap: 10px;}
.orderfood-mini-cart .price-wrapper {min-width: 3.4em; font-size: calc(16px + var(--orderfood-text-plus)); font-weight: bold; text-align: right;}
.orderfood-mini-cart .price-wrapper .amount {color: inherit;}
.orderfood-mini-cart .price-wrapper .wccs-subtotal {display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1;} /* Cross-Sell discount: old price small above the new one */
.orderfood-mini-cart .price-wrapper .wccs-subtotal del {font-size: 13px; font-weight: normal;}
.orderfood-mini-cart .woocommerce-Price-currencySymbol {margin-right: 0 !important;}

.orderfood-mini-cart-stepper {display: inline-flex; align-items: center; border: 1.5px solid var(--orderfood-line); border-radius: 999px; background: #fff;}
.orderfood-mini-cart .orderfood-mini-cart-stepper button {display: grid; place-items: center; box-sizing: border-box; width: 34px; height: 34px; min-width: 0; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 50% !important; background: none; box-shadow: none; color: var(--orderfood-accent-ink); font-family: inherit; font-size: 20px; font-weight: bold; line-height: 1; cursor: pointer;}
.orderfood-mini-cart .orderfood-mini-cart-stepper button:disabled {opacity: .35; cursor: default;}
.orderfood-mini-cart-stepper output {min-width: 28px; font-size: calc(16px + var(--orderfood-text-plus)); font-weight: bold; text-align: center; color: var(--orderfood-ink);}
/* "−" at one: a bin (removes) */
.orderfood-mini-cart .mini_cart_item[data-quantity="1"] .orderfood-mini-cart-less {position: relative; font-size: 0;}
/* the bin out of the flow: the hidden "−" would otherwise be a second grid row and push it up */
.orderfood-mini-cart .mini_cart_item[data-quantity="1"] .orderfood-mini-cart-less::before {content: ""; position: absolute; inset: 0; margin: auto; width: 17px; height: 17px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M10 11v6M14 11v6M6 7l1 12a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-12M9 7V4h6v3'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M10 11v6M14 11v6M6 7l1 12a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-12M9 7V4h6v3'/%3E%3C/svg%3E") center / contain no-repeat;}

/* extras below name and quantity over the whole width, in one line (cart.php) */
.orderfood-mini-cart .mini_cart_item dl.variation {grid-column: 1 / -1; display: block; margin: 4px 0 0; padding: 0; border: 0; font-size: calc(14px + var(--orderfood-text-plus)); font-weight: normal; -webkit-text-stroke: var(--orderfood-text-stroke) currentColor; line-height: 1.35; color: var(--orderfood-ink-soft);}
.orderfood-mini-cart .mini_cart_item dl.variation :is(dt, dd) {display: inline; float: none; width: auto; min-height: 0; margin: 0; padding: 0; font-weight: normal;}
.orderfood-mini-cart .mini_cart_item dl.variation dt.variation- {display: none;}
.orderfood-mini-cart .mini_cart_item dl.variation dd::after {content: ""; display: block;}
.orderfood-mini-cart .mini_cart_item dl.variation dd p {display: inline; margin: 0; font-family: inherit !important;}

/* "… removed · Undo" where the line was */
.orderfood-mini-cart .orderfood-mini-cart-list > li.orderfood-mini-cart-undo {display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: normal; color: var(--orderfood-ink-soft);}
.orderfood-mini-cart .orderfood-mini-cart-undo button {flex: none; min-width: 0; min-height: 40px; margin: 0; padding: 8px 4px; border: 0; border-radius: 0 !important; background: none; box-shadow: none; color: var(--orderfood-accent-ink); font: inherit; font-weight: bold; letter-spacing: 0; text-transform: none; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;}

/* empty */
.orderfood-mini-cart-empty {padding-top: 24px; padding-bottom: 32px; text-align: center;}
.orderfood-mini-cart-empty::before {content: ""; display: block; width: 110px; height: 80px; margin: 0 auto 10px; background: var(--orderfood-empty-image) no-repeat center / contain; opacity: .8;}
.orderfood-mini-cart .woocommerce-mini-cart__empty-message {margin: 0; font-size: 17px; color: var(--orderfood-ink-soft);}
.orderfood-mini-cart-empty .orderfood-mini-cart-list {margin-top: 20px; border-top: 1px solid var(--orderfood-line); text-align: left;}

/* --- Foot: totals, delivery minimum, "Checkout · amount" (cart.php) ------------------------------------------------ */

.orderfood-mini-cart .woocommerce-mini-cart__total {display: grid; grid-template-columns: 100%; gap: 4px; margin: 0; padding: 0; border: 0; font-size: 16px; text-align: left; color: var(--orderfood-ink);}
.orderfood-mini-cart .orderfood-cart-line {display: flex; justify-content: space-between; gap: 12px;}
.orderfood-mini-cart .orderfood-cart-total {margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--orderfood-line); font-size: 20px; font-weight: bold;}
.orderfood-mini-cart .orderfood-cart-note {font-size: 14px; color: var(--orderfood-ink-soft);}
.orderfood-mini-cart .orderfood-cart-minimum {margin: 8px 0 0; padding: 8px 12px; border-radius: 12px; background: var(--orderfood-error-soft); color: var(--orderfood-error); font-size: 15px; font-weight: bold; line-height: 1.3;}
.orderfood-mini-cart .orderfood-cart-minimum .amount {color: inherit;}
.orderfood-mini-cart .woocommerce-mini-cart__buttons {margin: 14px 0 0; padding: 0;}
.orderfood-mini-cart .woocommerce-mini-cart__buttons .button.checkout {display: flex; align-items: center; justify-content: center; gap: 6px; box-sizing: border-box; width: 100%; min-height: 52px; margin: 0; padding: 6px 20px; border: 0; border-radius: 999px !important; background: var(--orderfood-button); color: #fff; font-family: var(--orderfood-font); font-size: 18px; font-weight: bold; letter-spacing: 0; line-height: 1.2; text-transform: none;}
.orderfood-mini-cart .woocommerce-mini-cart__buttons .button.checkout:hover {background: var(--orderfood-button-hover);}
.orderfood-mini-cart .woocommerce-mini-cart__buttons .button.checkout .amount {color: inherit;}
.orderfood-mini-cart .woocommerce-mini-cart__buttons .button.checkout.is-disabled {opacity: .4; cursor: not-allowed;}
.orderfood-mini-cart .woocommerce-mini-cart__buttons .button.checkout.is-disabled:hover {background: var(--orderfood-button);}
.orderfood-mini-cart .woocommerce-mini-cart__buttons .button.checkout.loading {color: transparent !important; transition: none;} /* only the theme's wheel after the tap (cart.php) */

/* --- Bar "View order" -------------------------------------------------------------------------------------------- */

/* Phones: the button slides in and out inside a frame that ends 4 px above the screen's bottom edge and cuts it off.
   Safari 26 on iOS takes the colour of anything crossing the bottom edge for its toolbar and keeps it; what the frame
   cuts off does not count. The frame itself takes no taps. */
.orderfood-cart-bar {position: fixed; left: 0; right: 0; bottom: calc(4px + env(safe-area-inset-bottom)); z-index: 9990; box-sizing: border-box; padding: 40px 12px 8px; overflow: hidden; font-family: var(--orderfood-font); visibility: hidden; transition: visibility 0s .25s; pointer-events: none;}
.orderfood-cart-bar[hidden] {display: none;}
.orderfood-cart-bar.is-shown {visibility: visible; transition: none;}
.orderfood-cart-bar.is-shown.is-away {visibility: hidden; transition: visibility 0s .25s;}
/* Mini cart, order type popup or product window open: the bar goes at once instead of staying or sliding out under the sheet;
   otherwise Safari on iOS colours its toolbar with the page's background. */
html.orderfood-mini-cart-is-open .orderfood-cart-bar, body:has(#orderfood-order-type.is-open, #orderfood-product-window.is-open) .orderfood-cart-bar {visibility: hidden; transition: none;}
.orderfood-cart-bar .orderfood-cart-bar-button {display: flex; align-items: center; gap: 12px; box-sizing: border-box; width: 100%; min-width: 0; min-height: 60px; margin: 0; padding: 10px 20px 10px 10px; border: 0; border-radius: 999px !important; background: var(--orderfood-bar-bg); color: var(--orderfood-bar-ink); box-shadow: 0 4px 12px var(--orderfood-bar-shadow); font-family: inherit; font-size: 18px; font-weight: bold; line-height: 1.2; letter-spacing: 0; text-transform: none; cursor: pointer; transform: translateY(calc(100% + 24px)); transition: transform .25s ease; pointer-events: none;}
.orderfood-cart-bar .orderfood-cart-bar-button:hover {background: var(--orderfood-bar-bg-hover);}
.orderfood-cart-bar.is-shown .orderfood-cart-bar-button {transform: none; pointer-events: auto;}
.orderfood-cart-bar.is-shown.is-away .orderfood-cart-bar-button {transform: translateY(calc(100% + 24px)); pointer-events: none;}
.orderfood-cart-bar-content {display: contents;}
.orderfood-cart-bar-count {flex: none; display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 6px; box-sizing: border-box; border-radius: 999px; background: var(--orderfood-bar-count-bg);}
.orderfood-cart-bar-total {margin-left: auto; white-space: nowrap;}
.orderfood-cart-bar-total .amount {color: inherit;}
@media (min-width: 760px) {
	.orderfood-cart-bar {left: 50%; right: auto; bottom: 24px; padding: 0; overflow: visible; translate: -50% 0;}
	.orderfood-cart-bar[data-position="right"] {left: auto; right: 24px; translate: none;}
	.orderfood-cart-bar .orderfood-cart-bar-button, .orderfood-cart-bar.is-shown.is-away .orderfood-cart-bar-button {transform: translateY(calc(100% + 40px));}
	.orderfood-cart-bar .orderfood-cart-bar-button {width: auto; gap: 16px; padding-right: 26px; box-shadow: 0 10px 30px var(--orderfood-bar-shadow);}
	.orderfood-cart-bar-total {margin-left: 8px;}
}

/* --- Message with "Undo" ----------------------------------------------------------------------------------------- */

.orderfood-toast {position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 9995; display: flex; align-items: center; gap: 12px; box-sizing: border-box; width: max-content; max-width: calc(100vw - 24px); padding: 8px 8px 8px 18px; border-radius: 999px; background: var(--orderfood-toast-bg); color: #fff; font-family: var(--orderfood-font); font-size: 16px; line-height: 1.3; opacity: 0; transform: translate(-50%, 20px); transition: opacity .2s ease, transform .2s ease, bottom .25s ease; pointer-events: none;}
.orderfood-toast[hidden] {display: none;}
.orderfood-toast.is-shown {opacity: 1; transform: translate(-50%, 0); pointer-events: auto;}
.orderfood-toast.is-above-bar {bottom: calc(84px + env(safe-area-inset-bottom));}
@media (min-width: 760px) {.orderfood-toast.is-above-bar {bottom: 96px;}}
.orderfood-toast .orderfood-toast-undo {flex: none; min-width: 0; min-height: 40px; margin: 0; padding: 8px 14px; border: 0; border-radius: 999px !important; background: rgba(255, 255, 255, .14); color: var(--orderfood-toast-accent); font-family: inherit; font-size: 16px; font-weight: bold; letter-spacing: 0; text-transform: none; cursor: pointer;}
.orderfood-toast .orderfood-toast-undo[hidden] {display: none;}

/* --- the theme's mini cart is not shown (Flatsome: its dropdown on hover) ---------------------------------------- */

.orderfood-own-mini-cart .cart-item.has-dropdown .nav-dropdown {display: none !important;}

@media (prefers-reduced-motion: reduce) {
	.orderfood-mini-cart-overlay, .orderfood-mini-cart-sheet, .orderfood-cart-bar, .orderfood-toast {transition: none;}
}
