/*
 * OrderFood: the product window (inc/orderfood/product-window.php, js/orderfood-product-window.js) and the add-on form
 * inside it (inc/orderfood/addons-form.php, WooFood's markup). E6c of PLAN-WOOFOOD-ABLOESEN.md, 4.4: replaces WooFood's
 * css/wf_ajax_quickview.css, the window parts of css/default.css (.modal…, .wf_quickview_loading) and the layout of the
 * Dolores child theme (2026-10-27 to 2026-11-14), which keeps only its colours and fonts as the variables below.
 *
 * On phones a sheet from the bottom, from 760px a dialog of 640px. Groups with "optional"/"required"/"✓ chosen" (texts
 * from product-window.php, translated), options as cards (the whole card chooses), quantity and button in the footer.
 * Colours and fonts: the variables on :where(.orderfood-product-window) (no weight, a theme sets them on
 * .orderfood-product-window). !important only against WooFood's or the theme's rules with !important or inline styles.
 */

:where(.orderfood-product-window) {
	--orderfood-accent: var(--fs-color-primary, #446084);
	--orderfood-accent-hover: var(--orderfood-accent);
	--orderfood-accent-soft: rgba(0, 0, 0, .06);
	--orderfood-accent-ink: var(--orderfood-accent);
	--orderfood-title: var(--orderfood-accent);
	--orderfood-choice-active: var(--orderfood-accent-soft);
	--orderfood-ink: #222;
	--orderfood-ink-soft: #666;
	--orderfood-text: rgba(0, 0, 0, .8);
	--orderfood-line: #e2e2e2;
	--orderfood-line-hover: var(--orderfood-line);
	--orderfood-box-line: #bbb;
	--orderfood-bg: #fff;
	--orderfood-card-bg: #fff;
	--orderfood-badge-bg: rgba(0, 0, 0, .05);
	--orderfood-error: var(--fs-color-alert, #b20000);
	--orderfood-error-soft: #fbe9e7;
	--orderfood-error-line: #efc3bd;
	--orderfood-overlay: rgba(0, 0, 0, .5);
	--orderfood-shadow: 0 2px 8px rgba(0, 0, 0, .12);
	--orderfood-font: inherit;
	--orderfood-description-size: inherit;
	--orderfood-description-stroke: 0px;
}

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

.orderfood-product-window {display: none; position: fixed; inset: 0; z-index: 9999999; font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif;}
.orderfood-product-window.is-open {display: block;}
.orderfood-product-window-overlay {position: fixed; inset: 0; z-index: 99999; display: flex; flex-wrap: nowrap; justify-content: center; align-items: flex-end; background: var(--orderfood-overlay);}
.orderfood-product-window-sheet {display: flex; flex-direction: column; box-sizing: border-box; width: 100%; max-width: 100%; height: auto; min-height: 0; max-height: 92vh; max-height: 92dvh; overflow: hidden; background: var(--orderfood-bg); border-radius: 24px 24px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .18);}
.orderfood-product-window-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-product-window[aria-hidden="false"] .orderfood-product-window-overlay {animation: orderfood-window-fade .3s cubic-bezier(0, 0, .2, 1);}
.orderfood-product-window[aria-hidden="false"] .orderfood-product-window-sheet {animation: orderfood-window-slide .3s cubic-bezier(0, 0, .2, 1);}
@keyframes orderfood-window-fade {from {opacity: 0;} to {opacity: 1;}}
@keyframes orderfood-window-slide {from {transform: translateY(15%);} to {transform: translateY(0);}}

.orderfood-product-window-head {flex: none; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; box-sizing: border-box; padding: 14px 20px 10px;}
.orderfood-product-window-title {flex: 1; display: flex; justify-content: flex-start; min-width: 0; box-sizing: border-box; margin: 6px 0 0; text-align: left; font-size: 30px; font-weight: normal; line-height: 1; color: var(--orderfood-title);}
.orderfood-product-window .orderfood-product-window-close {flex: none; position: relative; display: grid; place-items: center; justify-content: center; box-sizing: border-box; width: 44px; height: 44px; min-width: 0; min-height: 0; margin: 0 0 0 auto; padding: 0; border: 0; border-radius: 50% !important; background: #fff; color: var(--orderfood-ink); box-shadow: var(--orderfood-shadow); cursor: pointer;} /* !important and two classes: Flatsome rounds every button with !important */
.orderfood-product-window .orderfood-product-window-close::before {content: "\2715"; margin: 0; font-size: 18px; line-height: 1; color: inherit;}

.orderfood-product-window-body {position: relative; flex: 1 1 auto; box-sizing: border-box; min-height: 0; padding: 0 20px 20px; overflow-y: auto; overscroll-behavior: contain;}
.orderfood-product-window-content {box-sizing: border-box; line-height: 1.5; color: var(--orderfood-text);}
.orderfood-product-window-image {margin: 0 0 12px; text-align: center;}
.orderfood-product-window-image img {display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 14px;}
.orderfood-product-window-details {position: relative;}

.orderfood-product-window-footer {position: relative; flex: none; display: flex; justify-content: flex-end; align-items: center; gap: 10px; box-sizing: border-box; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--orderfood-line);}
.orderfood-product-window-error {flex: none; margin: 0; padding: 10px 20px 0; color: #b42323; font-weight: 600;}
.orderfood-product-window-error p {margin: 0 0 4px;}

@media (min-width: 760px) {
	.orderfood-product-window-overlay {align-items: center;}
	.orderfood-product-window-sheet {width: min(640px, calc(100vw - 48px)); max-height: min(86vh, 860px); max-height: min(86dvh, 860px); border-radius: 24px;}
	.orderfood-product-window-sheet::before {display: none;}
	.orderfood-product-window-head {padding-top: 20px;}
}

/* while the window loads: a veil with the theme's spinner (Flatsome .loading-spin) */
.orderfood-product-window-loading {display: none; position: fixed; inset: 0; z-index: 999; width: 2em; height: 2em; margin: auto;}
.orderfood-product-window-loading::before {content: ""; position: fixed; inset: 0; background: var(--orderfood-loading-veil, rgba(0, 0, 0, .3));}

/* --- Content ----------------------------------------------------------------------------------------------------- */

.orderfood-product-window :is(.orderfood-product-window-details > .price, .price-wrapper > .price) {margin: 0 0 4px; font-size: 19px; font-weight: bold; color: var(--orderfood-ink);}
.orderfood-product-window .product-short-description {font-size: var(--orderfood-description-size); -webkit-text-stroke: var(--orderfood-description-stroke) currentColor; line-height: 1.35; color: var(--orderfood-ink-soft);}
.orderfood-product-window .product-short-description p {margin: 0 0 6px;}

/* add-on groups (classes of WooFood's form, inc/orderfood/addons-form.php) */
.orderfood-product-window .extra-options-accordion {margin: 0; padding: 0; list-style: none;}
.orderfood-product-window .extra-options-accordion > li {margin: 18px 0 0; padding: 0; list-style: none; background: none; border: 0; box-shadow: none;}
.orderfood-product-window .extra-options-accordion > li > a.toggle {display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 8px; padding: 0; background: none; border: 0; font-family: var(--orderfood-font); font-size: 19px; font-weight: bold; line-height: 1.2; color: var(--orderfood-ink); opacity: 1;}
.orderfood-product-window .extra-options-accordion > li.orderfood-addon-open > a.toggle {pointer-events: none; cursor: default;}
.orderfood-product-window .extra-options-accordion > li > a.toggle .orderfood-addon-arrow {order: 3; margin-left: auto; float: none; align-self: center; font-size: 15px; color: var(--orderfood-ink-soft);}
.orderfood-product-window .extra-options-accordion > li.orderfood-addon-open > a.toggle .orderfood-addon-arrow {display: none;}
.orderfood-product-window .extra-options-accordion > li > a.toggle::after {padding: 2px 9px; border-radius: 999px; background: var(--orderfood-badge-bg); color: var(--orderfood-ink-soft); font-size: 13px;} /* content: product-window.php */
.orderfood-product-window .extra-options-accordion > li[required] > a.toggle::after {background: var(--orderfood-error-soft); color: var(--orderfood-error);}
.orderfood-product-window .extra-options-accordion > li[required]:has(.inp-woofood-cbx:checked) > a.toggle::after {background: var(--orderfood-accent-soft); color: var(--orderfood-accent-ink);}
.orderfood-product-window .extra-options-accordion > li.error > a.toggle {color: var(--orderfood-error);}
.orderfood-product-window .extra-options-accordion > li.error .extra_options_checkbox {border-color: var(--orderfood-error-line);}
.orderfood-product-window .wf_requiremnts_error {margin: 0 0 8px; font-size: 15px; font-weight: bold; color: var(--orderfood-error);}
.orderfood-product-window .extra-options-accordion > li > .inner {display: none !important;} /* !important: WooFood's script set inline styles */
.orderfood-product-window .extra-options-accordion > li:is(.orderfood-addon-open, .orderfood-addon-expanded) > .inner {display: grid !important;}
.orderfood-product-window .extra-options-accordion .inner {grid-template-columns: 1fr; gap: 8px; margin: 0 !important; padding: 0 !important; list-style: none;} /* height and overflow free: opening slides (js/orderfood-addons-form.js) */
@media (min-width: 520px) {.orderfood-product-window .extra-options-accordion .inner {grid-template-columns: 1fr 1fr;}}
/* "Open the next group": its badge pulses once it is open (js/orderfood-addons-form.js) */
.orderfood-product-window .extra-options-accordion > li.orderfood-addon-next > a.toggle::after {animation: orderfood-addon-pulse .45s ease-out;}
@keyframes orderfood-addon-pulse {40% {transform: scale(1.18);}}
@media (prefers-reduced-motion: reduce) {.orderfood-product-window .extra-options-accordion > li.orderfood-addon-next > a.toggle::after {animation: none;}}

/* options as cards */
.orderfood-product-window .extra_options_checkbox {position: relative; display: flex; align-items: center; gap: 10px; min-height: 56px; margin: 0; padding: 10px 12px 10px 46px; background: var(--orderfood-card-bg); border: 1.5px solid var(--orderfood-line); border-radius: 14px; transition: border-color .15s ease, background-color .15s ease;}
.orderfood-product-window .extra_options_checkbox:hover {border-color: var(--orderfood-line-hover);}
.orderfood-product-window .extra_options_checkbox:has(.inp-woofood-cbx:checked) {border-color: var(--orderfood-accent); background: var(--orderfood-choice-active);}
.orderfood-product-window .extra_options_checkbox:has(.inp-woofood-cbx:focus-visible) {outline: 3px solid var(--orderfood-accent); outline-offset: 2px;}
.orderfood-product-window .extra_options_checkbox:has(.inp-woofood-cbx:disabled) {opacity: .5;}
.orderfood-product-window .extra_options_label {float: none; flex: 1; width: auto; min-width: 0; padding: 0; font-family: var(--orderfood-font); font-size: 17px; font-weight: bold; line-height: 1.25;}
.orderfood-product-window .extra_options_label label {margin: 0; font-size: inherit; font-weight: inherit; line-height: inherit;}
.orderfood-product-window .extra_options_label .tip-top {position: relative; z-index: 1;} /* the tooltip (ingredients) above the card's click area */
.orderfood-product-window .extra_options_value, .orderfood-product-window .woofood-cbx-wrapper {float: none; flex: none; width: auto; position: static;}
.orderfood-product-window .inp-woofood-cbx {display: block !important; position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none;} /* WooFood's inline display:none: reachable by keyboard again */
.orderfood-product-window label.woofood-cbx {position: static; display: block; margin: 0; padding: 0; line-height: 1.2; cursor: pointer;}
.orderfood-product-window label.woofood-cbx::after {content: ""; position: absolute; inset: 0; border-radius: 14px;} /* the whole card chooses */
.orderfood-product-window label.woofood-cbx span:first-child {position: absolute; top: 50%; left: 12px; width: 22px; height: 22px; margin-top: -11px; padding: 0; border: 2px solid var(--orderfood-box-line); border-radius: 7px; background: #fff;}
.orderfood-product-window label.woofood-cbx.radio span:first-child {border-radius: 50%;}
.orderfood-product-window label.woofood-cbx span:first-child::before {display: none;}
.orderfood-product-window label.woofood-cbx span:first-child svg {top: 4px; left: 3px;}
.orderfood-product-window .inp-woofood-cbx:checked + label.woofood-cbx span:first-child {background: var(--orderfood-accent); border-color: var(--orderfood-accent);}
.orderfood-product-window label.woofood-cbx span:last-child {padding: 0; font-size: 15px; font-weight: bold; white-space: nowrap; color: var(--orderfood-accent-ink);}

/* suggestions "You may also like" (inc/orderfood/suggestions.php; the row itself there) */
.orderfood-product-window .orderfood-suggestions {margin: 22px 0 4px;}
.orderfood-product-window .orderfood-suggestions-title {margin: 0 0 8px; font-family: var(--orderfood-font); font-size: 19px; font-weight: bold; line-height: 1.2; letter-spacing: 0; text-transform: none; color: var(--orderfood-ink);}
.orderfood-product-window .orderfood-suggestions-list {gap: 8px;}
.orderfood-product-window .orderfood-suggestion {gap: 2px; padding: 10px 12px; background: var(--orderfood-card-bg); border: 1.5px solid var(--orderfood-line); border-radius: 14px; font-family: var(--orderfood-font); color: var(--orderfood-ink);}
.orderfood-product-window .orderfood-suggestion:hover {border-color: var(--orderfood-line-hover);}
.orderfood-product-window .orderfood-suggestion:focus-visible {outline: 3px solid var(--orderfood-accent); outline-offset: 2px;}
.orderfood-product-window .orderfood-suggestion-name {font-size: 17px; font-weight: bold; line-height: 1.25;}
.orderfood-product-window .orderfood-suggestion-price {font-size: 15px; font-weight: bold; color: var(--orderfood-accent-ink); opacity: 1;}
.orderfood-product-window .orderfood-suggestion-price .amount {color: inherit;}

/* --- Footer: quantity and button --------------------------------------------------------------------------------- */

.orderfood-product-window .orderfood-qty-source {display: none;} /* the form's quantity field, set by the buttons */
.orderfood-product-window .orderfood-qty {display: inline-flex; flex: none; align-items: center; border: 1.5px solid var(--orderfood-line); border-radius: 999px; background: #fff;}
.orderfood-product-window .orderfood-qty button {width: 42px; height: 48px; 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-size: 22px; font-weight: bold; line-height: 1;}
.orderfood-product-window .orderfood-qty output {min-width: 28px; text-align: center; font-size: 18px; font-weight: bold;}
.orderfood-product-window .orderfood-product-window-footer .single_add_to_cart_button {position: static !important; flex: 1; width: auto; min-width: 0; min-height: 52px; margin: 0; padding: 6px 16px; white-space: normal; line-height: 1.2; border: 0; border-radius: 14px !important; overflow: hidden; background: var(--orderfood-accent); background-image: none !important; box-shadow: inset 0 1px rgba(255, 255, 255, .6); color: #fff !important; font-family: var(--orderfood-font); font-size: 18px; font-weight: bold; letter-spacing: 0; text-transform: none;}
.orderfood-product-window .orderfood-product-window-footer .single_add_to_cart_button:hover {background-color: var(--orderfood-accent-hover);}
.orderfood-product-window .orderfood-product-window-footer .single_add_to_cart_button.orderfood-incomplete {background: var(--orderfood-accent-soft); color: var(--orderfood-accent-ink) !important; opacity: 1;} /* "Still to choose: …" */
