/* ==========================================================================
   FaroDash extras (assets/css/fd-extras.css). Loaded AFTER home.css.
   Original CSS for the few pieces the reference pages don't define: the item sheet and cart panel (from your
   screenshots), the checkout address list, and the payment status overlays. Buttons, chips, badges, notices,
   overlays and layout classes all come from home.css, so these pages look like the rest of the site.
   ========================================================================== */
.fd-ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; vertical-align: -4px; }
.fd-red { color: #ea482c; }
.fd-muted { color: #7c766e; }
.fd-center { text-align: center; }
.fd-pill-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---- item sheet (screenshot 1, measured at 452px wide) ---- */
.fd-fill { fill: currentColor; stroke: none; }
.fd-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); }
.overlay.is-modal .card.fd-sheet { min-width: 0; width: min(520px, 100vw); max-height: 100vh; padding: 0; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.fd-sheet-scroll { overflow-y: auto; flex: 1 1 auto; -webkit-overflow-scrolling: touch; }
.fd-back { position: absolute; z-index: 3; top: 12px; left: 24px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; color: #ea482c; box-shadow: 0 1px 8px rgba(0,0,0,.2); display: grid; place-items: center; cursor: pointer; }
.fd-back .fd-ic { width: 18px; height: 18px; stroke-width: 2.4; }
.fd-sheet-img { height: 340px; background: #fff center / contain no-repeat; }
.fd-sheet-img.no-photo { height: 120px; background: #faead8; }
.fd-sheet-body { padding: 25px 24px 22px; }
.fd-sheet-body h2 { font-size: 20px; font-weight: 400; line-height: 24px; margin: 0 0 16px; color: var(--text, #1f1f1f); }
.fd-sheet-price { font-size: 18.5px; font-weight: 700; line-height: 22px; margin: 0 0 16px; }
.fd-sheet-desc { font-size: 14px; line-height: 23px; color: #827c75; margin: 0; }
.fd-opt-group { margin: 0; }
.fd-opt-head { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 52px; padding: 0 24px; border: 0; background: #d9381c; color: #fff; font: inherit; font-size: 17.5px; font-weight: 500; text-align: left; cursor: pointer; }
.fd-opt-head .req { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
.fd-opt-head svg { width: 28px; height: 28px; stroke-width: 3.2; margin-right: -3px; transition: transform .15s; }
.fd-opt-group.is-closed .fd-opt-head svg { transform: rotate(180deg); }
.fd-opt-group.is-closed .fd-opt-list { display: none; }
.fd-opt-list { padding: 13px 24px 19px; }
.fd-opt { display: flex; align-items: center; gap: 8px; padding: 15px 0; line-height: 21px; font-size: 15.5px; cursor: pointer; }
.fd-opt input { position: absolute; opacity: 0; pointer-events: none; }
.fd-opt .mark { width: 16px; height: 16px; border: 2px solid currentColor; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; }
.fd-opt.is-check .mark { border-radius: 3px; }
.fd-opt .mark::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #d9381c; transform: scale(0); transition: transform .12s; }
.fd-opt.is-check .mark::after { border-radius: 1px; }
.fd-opt input:checked + .mark { border-color: #d9381c; }
.fd-opt input:checked + .mark::after { transform: scale(1); }
.fd-opt input:focus-visible + .mark { outline: 3px solid #d9381c55; outline-offset: 2px; }
.fd-opt .grow { flex: 1 1 auto; }
.fd-opt .price { color: #7c766e; font-size: 15px; }
.fd-bar { display: flex; align-items: center; height: 52px; margin: 0; padding: 0 24px; background: #faead8; font-size: 18.5px; color: #1f1f1f; }
.fd-bar-body { padding: 31px 24px 24px; }
.fd-stepper { display: inline-flex; align-items: center; gap: 18px; }
.fd-stepper .num { min-width: 22px; text-align: center; font-size: 17px; }
.fd-round { width: 36px; height: 36px; border-radius: 50%; border: 1px solid #d6d2cc; background: transparent; color: inherit; display: grid; place-items: center; cursor: pointer; padding: 0; }
.fd-round .fd-ic { width: 14px; height: 14px; stroke-width: 2.4; }
.fd-round[disabled] { cursor: default; }  /* stays dark at quantity 1, like the mock-up */
.fd-sheet-foot { padding: 0 24px 25px; background: var(--bg, #fefdfb); }
.fd-sheet-foot .button { width: 100%; min-height: 47px; padding: 0 24px; border-radius: 4px; font-size: 16px; font-weight: 600; justify-content: space-between; }
.fd-sheet-foot .button[disabled], .fd-cart-panel .button[disabled], .fd-pay[disabled] { background: #eae6e1; border-color: #eae6e1; color: #8f8a84; cursor: not-allowed; }
.fd-err { margin: 0 0 10px; color: #c62828; font-size: 14px; text-align: center; }
.fd-textarea { width: 100%; min-height: 90px; padding: 10px 12px; border: 1px solid #ddd9d4; border-radius: 6px; font: inherit; background: transparent; color: inherit; resize: vertical; }
@media (max-width: 720px) { .overlay.is-modal .card.fd-sheet { width: 100vw; height: 100%; max-height: none; border-radius: 0; } }

/* ---- cart panel (screenshot 2, measured at 452px wide): sidebar on desktop, full-screen sheet on phones ---- */
.fd-pill-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.fd-cart-panel { border: 1px solid #ddd9d4; border-radius: 8px; overflow: hidden; }
.fd-cart-head { display: flex; align-items: center; gap: 15px; height: 63px; padding: 0 24px; border-bottom: 1px solid #ddd9d4; }
.fd-cart-head h4 { margin: 0; font-size: 18px; font-weight: 400; }
.fd-back-o { width: 36px; height: 36px; border-radius: 50%; border: 1px solid #bdb8b2; background: transparent; color: #1f1f1f; display: grid; place-items: center; padding: 0; cursor: pointer; }
.fd-back-o .fd-ic { width: 18px; height: 18px; stroke-width: 2.2; }
.fd-cart-head .fd-deliv { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; font: inherit; font-size: 14px; cursor: pointer; max-width: 70%; text-align: right; color: inherit; padding: 0; }
.fd-cart-head .fd-deliv span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-cart-head .fd-deliv svg { color: #ea482c; width: 18px; height: 18px; }
.fd-cart-line { margin: 0 24px; padding: 27px 0 25px; border-bottom: 1px solid #ddd9d4; }
.fd-cart-line:has(+ .fd-totals) { margin: 0; padding-left: 24px; padding-right: 24px; border-bottom: 0; }
.fd-cart-line .top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.fd-cart-line .t { font-size: 18px; line-height: 24px; font-weight: 700; }
.fd-cart-line .d { margin: 14px 0 0; font-size: 14px; line-height: 22px; color: #827c75; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fd-cart-line .o { margin: 19px 0 0; font-size: 14px; line-height: 20px; }
.fd-cart-line .fd-pill-row { margin-top: 10px; }
.fd-cart-line .p { font-weight: 700; font-size: 17px; }
.fd-cart-line .chip { height: 32px; padding: 0 11px; gap: 6px; font-size: 15px; border: 0; cursor: pointer; font: inherit; font-size: 15px; }
.fd-cart-line .chip .fd-ic { width: 18px; height: 18px; }
.fd-cart-empty { padding: 34px 24px; text-align: center; color: #7c766e; }
.fd-totals { padding: 17px 24px 23px; border-top: 1px solid #ddd9d4; }
.fd-totals .ln { display: flex; justify-content: space-between; align-items: center; padding: 0; line-height: 37px; font-size: 16px; }
.fd-totals .ln.big { margin-top: 6px; font-size: 25px; }
.fd-totals .button.is-primary { margin-top: 21px; min-height: 50px; border-radius: 4px; font-size: 16px; font-weight: 700; }
.fd-totals .note { margin: 8px 0 0; font-size: 14px; color: #7c766e; line-height: 1.4; }
.fd-linkbtn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.fd-notice { margin: 12px 0 0; padding: 12px 14px; border-radius: 6px; background: #fff2d6; color: #7a4f00; font-size: 15px; }
.fd-notice.err { background: #fde8e6; color: #b3261e; }
.overlay.is-modal .card.fd-cartcard { min-width: 0; width: min(520px, 100vw); max-height: 100vh; padding: 0; overflow-y: auto; }
@media (max-width: 720px) { .overlay.is-modal .card.fd-cartcard { width: 100vw; height: 100%; max-height: none; border-radius: 0; } }
.co-page .fd-cart-line { margin: 0; }
.co-page .fd-cart-line:has(+ .fd-totals) { padding-left: 0; padding-right: 0; }

/* ---- restaurant page: search-in-menu box ---- */
.fd-menu-search { max-width: 360px; margin: 6px 0 0; }

/* ---- checkout: address list, success + processing overlays ---- */
.fd-addr-list { display: grid; gap: 10px; margin: 12px 0; }
.fd-addr { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid #ddd9d4; border-radius: 8px; cursor: pointer; }
.fd-addr input { position: absolute; opacity: 0; pointer-events: none; }
.fd-addr .mark { width: 22px; height: 22px; border: 2px solid currentColor; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; margin-top: 1px; }
.fd-addr .mark::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #d9381c; transform: scale(0); transition: transform .12s; }
.fd-addr input:checked + .mark { border-color: #d9381c; }
.fd-addr input:checked + .mark::after { transform: scale(1); }
.fd-addr:has(input:checked) { border-color: #d9381c; box-shadow: 0 0 0 1px #d9381c; }
.fd-addr input:focus-visible + .mark { outline: 3px solid #d9381c55; outline-offset: 2px; }
.fd-addr .lab { font-weight: 600; }
.fd-addr .txt { color: #7c766e; font-size: 15px; }
.fd-tag { margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: #faead8; font-size: 12px; font-weight: 600; color: #1f1f1f; }
.fd-map { height: 170px; border-radius: 8px; background: #faead8; overflow: hidden; margin: 10px 0 12px; }
.fd-pay-note { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 8px; background: #faead8; font-size: 15px; color: #1f1f1f; }
.fd-pay-note svg { width: 26px; height: 26px; color: #ea482c; }
.fd-success { text-align: center; padding: 8px 0 4px; }
.fd-tick { width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 50%; background: #1f8a4c; display: grid; place-items: center; }
.fd-tick svg { width: 40px; height: 40px; stroke: #fff; fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.fd-dl { margin: 18px 0; text-align: left; }
.fd-dl div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #eee9e3; }
.fd-dl dt { color: #7c766e; } .fd-dl dd { margin: 0; font-weight: 600; text-align: right; }
.fd-processing { position: fixed; inset: 0; z-index: 400; display: none; place-items: center; background: rgba(20, 18, 16, .62); color: #fff; text-align: center; }
.fd-processing.is-open { display: grid; }
.fd-spin { width: 44px; height: 44px; margin: 0 auto 14px; border: 4px solid #fff; border-right-color: transparent; border-radius: 50%; animation: fd-spin .7s linear infinite; }
@keyframes fd-spin { to { transform: rotate(360deg); } }

/* restaurant page: the sidebar cart is for desktop; phones use the "View cart" bar + cart sheet */
.fd-desktop-only { display: none; }
@media (min-width: 1024px) { .fd-desktop-only { display: block; } }

/* ---- logo image (the one the login page uses: images/logo.png) ---- */
.logo img { display: block; height: 34px; width: auto; max-width: 100%; }
.overlay-header .logo img { height: 30px; }

/* ---- add-to-home-screen popup: the screenshot from the previous site (images/pwa.jpeg) ---- */
.fd-pwa-shot { height: 260px; margin: 0 0 16px; border-radius: 16px; background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 15px rgba(31, 122, 71, .15); }
.fd-pwa-shot img { width: 100%; height: 250px; border-radius: 12px; object-fit: cover; }
@media (max-width: 600px) { .fd-pwa-shot { height: 252px; } }

.overlay .card:focus { outline: none; }


/* ---- quick add (+ / stepper) on menu rows and the meal builder in the item sheet ---- */
.product-listing-with-image { cursor: pointer; }
.product-image.is-empty { background: none; height: auto; min-height: 44px; display: flex; align-items: flex-end; justify-content: flex-end; }
.fd-ctl { position: absolute; right: 8px; bottom: 8px; display: flex; align-items: center; }
.product-image.is-empty .fd-ctl { position: static; }
.fd-add { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: #ea482c; box-shadow: 0 1px 8px rgba(0, 0, 0, .25); display: grid; place-items: center; cursor: pointer; font: inherit; }
.fd-add .fd-ic { width: 20px; height: 20px; stroke-width: 2.6; }
.fd-add.has-n { background: #f6cd13; color: #1f1f1f; }
.fd-add.has-n b { font-size: 15px; font-weight: 700; }
.fd-add.is-flat, .fd-qstep.is-flat { box-shadow: none; border: 1px solid #d6d2cc; }
.fd-qstep { display: flex; align-items: center; height: 36px; border-radius: 999px; background: #fff; box-shadow: 0 1px 8px rgba(0, 0, 0, .25); }
.fd-qstep button { width: 34px; height: 100%; padding: 0; border: 0; background: none; color: #ea482c; display: grid; place-items: center; cursor: pointer; }
.fd-qstep .fd-ic { width: 16px; height: 16px; stroke-width: 2.6; }
.fd-qstep span { min-width: 22px; text-align: center; font-weight: 600; font-size: 15px; color: #1f1f1f; }
.fd-add.is-busy, .fd-qstep .is-busy, .fd-qstep.is-busy { opacity: .55; pointer-events: none; }
.fd-comp { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.fd-comp .nm { font-size: 15.5px; line-height: 21px; }
.fd-comp .pr { font-size: 14px; color: #7c766e; }
.fd-comp-ctl { flex: 0 0 auto; display: flex; }
.fd-comp .fd-add { width: 34px; height: 34px; }
.fd-comp .fd-qstep { height: 34px; }


/* ---- cart sections: one card per restaurant (cart page + the cart panel on restaurant pages) ---- */
.cart-head { display: flex; align-items: center; gap: 12px; padding: 18px 0 14px; }
.cart-head h1 { flex: 1 1 auto; margin: 0; font-size: 26px; }
.seg-card { padding: 18px 18px 8px; background: var(--surface, #fff); border: 1px solid var(--line, #ddd9d4); border-radius: 16px; }
.seg-card + .seg-card { margin-top: 16px; }
.seg-top { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft, #eee9e3); }
.seg-logo { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--peach, #faead8) center / cover no-repeat; color: var(--red, #d9381c); font-weight: 700; font-size: 18px; }
.seg-logo.is-sm { width: 30px; height: 30px; font-size: 13px; }
.seg-title { flex: 1 1 auto; min-width: 0; }
.seg-title b { display: block; font-size: 17px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg-title span { color: var(--muted, #7c766e); font-size: 15px; }
.seg-toggle { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; padding: 8px 0 8px 6px; border: 0; background: none; font: inherit; font-size: 14.5px; font-weight: 600; color: inherit; cursor: pointer; white-space: nowrap; }
.seg-toggle .fd-ic { width: 16px; height: 16px; stroke-width: 2.4; transition: transform .15s; }
.seg-toggle[aria-expanded="true"] .fd-ic { transform: rotate(180deg); }
.seg-items { padding: 2px 0 4px; border-bottom: 1px solid var(--line-soft, #eee9e3); }
.seg-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 15.5px; }
.seg-line + .seg-line { border-top: 1px solid var(--line-soft, #eee9e3); }
.seg-line small { display: block; margin-top: 2px; color: var(--muted, #7c766e); font-size: 13.5px; line-height: 1.4; }
.seg-line > span { font-weight: 600; white-space: nowrap; }
.seg-more { display: block; padding: 8px 0 10px; color: var(--red, #d9381c); font-weight: 600; font-size: 15px; text-decoration: none; }
.seg-deliver { display: flex; align-items: flex-start; gap: 12px; padding: 16px 0; font-size: 15.5px; line-height: 1.5; }
.seg-deliver .fd-ic { width: 22px; height: 22px; flex: 0 0 auto; margin-top: 2px; color: var(--muted, #7c766e); }
.seg-card > .button.is-primary { min-height: 52px; font-size: 16.5px; font-weight: 700; border-radius: 12px; }
.seg-clear { display: block; width: 100%; padding: 14px 8px; border: 0; background: none; font: inherit; font-weight: 600; color: var(--red, #d9381c); cursor: pointer; }
.seg-clear:hover { text-decoration: underline; }
/* inside the cart panel on a restaurant page */
.seg-here { display: flex; align-items: center; gap: 10px; padding: 16px 24px 0; font-size: 17px; }
.seg-note { margin: 10px 0 0; font-size: 13.5px; line-height: 1.4; color: var(--muted, #7c766e); text-align: center; }
.seg-others { padding: 18px 16px 18px; border-top: 8px solid var(--field, #f2eee9); background: var(--bg, #fefdfb); }
.seg-others h5 { margin: 0 0 12px 4px; font-size: 14px; font-weight: 600; color: var(--muted, #7c766e); }
#cartMobile .seg-others { padding-bottom: 28px; }

/* phones: the fixed "View cart" bar must never cover the last dishes on the menu */
@media (max-width: 1023px) { .r-page #rGrid { padding-bottom: 96px; } }


/* ==== pictures that never leave a hole (see FD.pic / FD.restPic in fd-shell.js) ==== */
.pic { position: relative; display: block; overflow: hidden; background: hsl(var(--ph, 24) 70% 92%); color: hsl(var(--ph, 24) 42% 36%); }
.pic.fill { position: absolute; inset: 0; border-radius: inherit; }
.pic .ph { position: absolute; inset: 0; display: grid; place-items: center; }
.pic .ph b { font-size: var(--ph-size, 30px); font-weight: 700; line-height: 1; }
.pic.is-dish .ph .fd-ic { width: 36%; height: 36%; max-width: 64px; max-height: 64px; stroke-width: 1.5; opacity: .7; }
.pic .cv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pic .lg { position: absolute; left: 50%; top: 50%; width: 40%; max-width: 110px; aspect-ratio: 1; transform: translate(-50%, -50%); }
.pic .lg img { display: block; width: 100%; height: 100%; padding: 9%; border-radius: 50%; background: #fff; object-fit: contain; box-shadow: 0 2px 10px rgba(0, 0, 0, .14); }
html:has(#colour-scheme-dark:checked) .pic { background: hsl(var(--ph, 24) 26% 22%); color: hsl(var(--ph, 24) 55% 76%); }
@media (prefers-color-scheme: dark) { html:has(#colour-scheme-auto:checked) .pic { background: hsl(var(--ph, 24) 26% 22%); color: hsl(var(--ph, 24) 55% 76%); } }
/* the older rules gave these boxes a flat beige fill: let the tinted placeholder win */
.food-card .fimg.pic, .search-item .thumb.pic, .seg-logo.pic { background: hsl(var(--ph, 24) 70% 92%); }
html:has(#colour-scheme-dark:checked) .food-card .fimg.pic, html:has(#colour-scheme-dark:checked) .search-item .thumb.pic, html:has(#colour-scheme-dark:checked) .seg-logo.pic { background: hsl(var(--ph, 24) 26% 22%); }
.seg-logo.pic { color: hsl(var(--ph, 24) 42% 36%); --ph-size: 18px; }
.seg-logo.is-sm.pic { --ph-size: 13px; }
.search-item .thumb.pic { --ph-size: 18px; }
.card.is-restaurant .image .pic { --ph-size: 52px; }
.header-image .pic { --ph-size: 84px; }
.header-image .header-controls { z-index: 2; }
@media (max-width: 767px) { .header-image.is-ph { height: 150px; } }
/* menu rows without a photo are plain text rows (no empty picture column) */
.product-listing-with-image.no-photo { grid-template-columns: minmax(0, 1fr) auto; }
.product-image.is-empty { width: auto; }
/* the dish popup: no photo = no empty banner */
.fd-sheet-img { position: relative; }
.fd-sheet-img .pic .cv { object-fit: contain; background: #fff; }
.fd-sheet-img.no-photo { display: none; }
.fd-sheet-img.no-photo + .fd-sheet-body { padding-top: 76px; }
/* events without a flyer */
.event-card .flyer:not([style]), .event-hero:not([style]) {
    background: linear-gradient(135deg, #faead8, #f3dcc2) center / cover no-repeat;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c59a6a' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2z'/%3E%3C/svg%3E"), linear-gradient(135deg, #faead8, #f3dcc2);
    background-size: 26%, cover; background-position: center; background-repeat: no-repeat;
}
