/* ===== Order Detail inside Orders sheet ===== */

#ordersMasterView[hidden],
#orderDetailView[hidden]{
  display:none !important;
}

#orderDetailView{
  height:90vh;
  display:flex;
  flex-direction:column;
  background:#fff;
  position:relative;   /* ADD THIS */
  min-height: 0;        /* important so the inner scroll can shrink */
  overflow: hidden;     /* panel itself doesn’t scroll, inner area does */
}

#orderDetailView .ordDetScroll {
  flex: 1 1 auto;
  overflow-y: auto;
}

/* Header row: back, title, help */
.ordDetHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 16px;
  border-bottom:1px solid #e5e7eb;
  background:#ffffff;
}

.ordDetHeaderTitle{
  font-size:16px;
  font-weight:600;
}

.ordDetBackBtn,
.ordDetHelpBtn{
  border:0;
  background:none;
  font-size:14px;
  cursor:pointer;
  padding:4px 0;
}

.ordDetBackBtn{
  font-size:18px;
  line-height:1;
}

.ordDetHelpBtn{
  color:#2563eb;
}

.ordDetScroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.ordDetHero {
  position:relative;
  aspect-ratio: 16 / 2.5;
  overflow:hidden;
  background:#d1d5db;
}

.ordDetHeroImg{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* gradient overlay */
.ordDetHero::after{
  content:'';
  position:absolute;
  inset:0;
  pointer-events:none;
  background: linear-gradient(to bottom,
		rgba(0, 0, 0, 0.5),
		rgba(0, 0, 0, 0.5)
	);
}


.ordDetMeta {
  padding:4px clamp(14px, 3vw, 18px) 4px;
  background:#f1f3f5;
}

.ordDetMetaTime {
  font-size:18px;
  font-weight: 700;
  color:#000;
}

.ordDetMetaDelivery {
  display:flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  text-transform:uppercase;
  color:#555;
  font-weight: 600;
}

.ordDeliveryText {
    padding: 0 20px;
}

.ordDetMetaInfoIcon {
  width:16px;
  height:16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor: pointer;
  border: 0;
}

.ordDetMetaInfoIcon img {
  width:16px;
  height:16px;
}

.ordDetHeroImg {
  width:100%;
  height:100%;
  object-fit:cover;
}

.ordDetHeroOverlay{
  position:absolute;
  inset:auto 0 0 0;
  padding:12px clamp(14px, 3vw, 18px) 2px;
  color:#ffffff;
  z-index: 1;
}

.ordDetHeroKitchen{
  font-size:22px;
  font-weight:600;
  text-shadow: 1px 1px 2px #000;
}

.ordDetHeroTime{
  font-size:13px;
}

.ordDeliveryAddrBox {
    width: 100%;
    color: #000;
    font-weight: 500;
    padding: 10px 20px;
    background-color: #f1f3f5;
    margin-top: 2px;
}

.ordDetHeroDelivery{
  margin-top:4px;
  font-size:11px;
  letter-spacing:.06em;
}

.ordDetMetaDeliveryLabel--cancelled {
  color: #ff3b30; /* iOS-style red; tweak if you like */
  font-weight: 700;
}

/* Status bar */
.ordDetStatusWrap{
  padding:4px clamp(14px, 3vw, 18px) 10px;
  background:#f3f4f6;           /* light gray behind the status bar */
}

.ordDetStatusText{
  font-size:13px;
  color:#444;
  font-weight: 500;
  margin-top: 3px;
}

.ordDetStatusText span{
    color: #058912;
  font-weight:600;
}

.ordDetStatusBar{
  height:4px;
  border-radius:999px;
  background:#e5e7eb;
  overflow:hidden;
}

.ordDetStatusFill{
  height:100%;
  width:0;
  background:#16a34a;
  transition:width .25s ease-out;
}

/* History style */
.ordDetStatus--history{
  padding-bottom:10px;
}

.ordDetStatusHistoryMain{
  font-size:14px;
  font-weight:600;
  color:#111827;
}

.ordDetStatusHistorySub{
  margin-top:2px;
  font-size:13px;
  color:#6b7280;
}

/* Sections */
.ordDetSection{
  margin-top:8px;
  padding:0 0 0px;
}

.ordDetItemsSection,
.ordDetTotalsSection{
  background:#ffffff;
}

.ordDetItemInstr {
  font-size: 13px;
  font-weight: 500;
  color: #16a34a; /* similar to Android green */
}

.ordDetItem{
  position:relative;
  display:flex;
  align-items:flex-start;   /* keep text & image aligned at top */
  padding:8px clamp(14px, 3vw, 18px);
}

.ordDetItem::after {
  content:'';
  position:absolute;
  left:90px;
  right:16px;
  bottom:0;
  border-bottom:1px solid #f1f3f5;
}

/* No underline on the last item */
.ordDetItem:last-child::after{
  border-bottom:none;
}

.ordDetItemThumb {
  position:relative;
  width:64px;
  height:64px;
  flex:0 0 64px;
  margin-right:15px;
  border-radius:9px;
  overflow:hidden;
  background:#e5e7eb;
  align-self: center;
}

.ordDetItemThumb img {
  width:100%;
  height:100%;
  object-fit:cover;
}

.ordDetItemBadge{
  position:absolute;
  left:0;
  bottom:0;
  width: 100%;
  padding:px 6px;
  font-size:11px;
  font-weight:600;
  color:#ffffff;
  text-align: center;
  background:#ec690b;
}

.ordDetItemInfo{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;   /* center content when there is extra height */
  min-height:64px;          /* same as .ordDetItemThumb height */
}

.ordDetItemName {
  font-size:16px;
  font-weight:600;
  color:#000;
  line-height:1.3;
}

.ordDetItemSub{
  margin-top:0px;
  font-size:13px;
  color:#6b7280;
}

.ordDetItemPriceRow{
  margin-top:2px;
}

/* container so current + old price sit on one line */
.ordDetItemPriceMain{
  display:flex;
  align-items:baseline;
}

/* base price style */
.ordDetItemPrice{
  font-size:14px;
  font-weight:600;
}

/* orange when discounted */
.ordDetItemPrice--discount{
  color:#ea580c;
}

/* dark gray when no discount */
.ordDetItemPrice--normal{
  color:#333;
}

/* old price – smaller, strikethrough, inline */
.ordDetItemOldPrice{
  margin-left:8px;
  font-size:12px;
  color:#888;
  text-decoration:line-through;
}

.ordDetItemQty {
  margin-left:8px;
  font-size:23px;       /* base for the number */
  color:#000;
  align-self:center;
  background:#f1f3f5;
  padding:8px 10px 8px 10px;
  border-radius:7px;
  font-weight:700;
  display:flex;     /* <— key */
  align-items:center;      /* vertical-center children */
  justify-content:center;
  line-height:1;           /* avoid extra vertical offset */
}

.ordDetItemQty .qtyPrefix {
  margin-right: 0px;
  align-items: center;
  justify-content: center;
  display: flex;
  padding: 2px 0 0;
}

.ordDetItemQty .qtyNum {
  font-size:21px;
  font-weight:600;
  margin-left: 6px;
  min-width: 0;
}



/* Totals */
.ordDetTotalsTable{
  padding:8px clamp(14px, 3vw, 18px) 12px;
  border-top: 1px solid #e1e3e5;
}

.ordDetTotalsRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-top:4px;
}

.ordDetTotalsLabel{
  font-size:14px;
  color:#4b5563;
}

.ordDetTotalsValue{
  font-size:14px;
  color:#111827;
}


/* Discount row: orange label + value */
.ordDetTotalsLabel--discount,
.ordDetTotalsValue--discount{
  color:#ea580c;
  font-weight: 600;
}

/* Delivery row: blue label + value */
.ordDetTotalsLabel--delivery,
.ordDetTotalsValue--delivery{
  color:#2563eb;
  font-weight: 600;
}

/* Tip row: green label + value */
.ordDetTotalsLabel--tip,
.ordDetTotalsValue--tip{
  color:#129040;
  font-weight: 600;
}


.ordDetTotalsRow--total{
  margin-top:10px;
}

.ordDetTotalsLabel--total{
  font-size:18px;
  font-weight:600;
  color:#000;
}

.ordDetTotalsValue--total{
  font-size:18px;
  font-weight:600;
  color: #000;
}

/* Review section */
.ordDetReviewSection{
  padding:12px 16px 20px;
  background:#ffffff;
}

/* Loading */
.ordDetLoading{
  padding:10px 16px;
  font-size:13px;
  color:#6b7280;
}

/* ===== Help overlay ===== */

.ordHelpOverlay{
  position:absolute;
  inset:0;
  background:#ffffff;
  display:flex;
  flex-direction:column;
  z-index:10; /* above detail content */
}

/* ===== Help overlay header (title always centered) ===== */
.ordHelpHeader{
  position: relative;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  text-align: center;           /* center text across full width */
}

.ordHelpTitle{
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

/* back/close arrow on the left – does NOT affect centering */
.ordHelpCloseBtn{
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.ordPickupCopyBtn {
    margin: 10px 20px;
    border: 0;
    padding: 10px 15px;
    border-radius: 9px;
    background-color: #f1f3f5;
}

.ordHelpBody{
  flex:1;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
}

.ordHelpIntro{
  font-size:15px;
  color:#000;
  margin:3px 0 20px;
  padding: 10px clamp(15px, 3vw, 24px);
  background: #f1f3f5;
}


/* ===== Help overlay – web styling to match iOS ===== */

/* Use flex + small gap between rows */
.ordHelpForm{
  display:flex;
  flex-direction:column;
  gap:15px;
  padding: 0 clamp(15px, 3vw, 24px);
}

/* Each reason row */
.ordHelpReason {
  position:relative;
  display:flex;
  align-items:flex-start;
  gap:13px;
  font-size:14px;
  color:#000;
  margin-left: 5px;
}

/* Real checkbox: hide it, we draw our own */
.ordHelpChk {
  position:absolute;
  opacity:0;
  pointer-events:none;
}

/* Fake checkbox square */
.ordHelpChkFake {
  width:20px;
  height:20px;
  border-radius:4px;
  border:1px solid #c1c3c5;
  background:#fafbfc;
  box-sizing:border-box;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}

/* Checkmark (hidden by default) */
.ordHelpChkFake::after{
  content:'';
}

/* Checked state – black box with white tick */
.ordHelpChk:checked + .ordHelpChkFake{
  background:#000;
  border-color:#000;
}


.ordHelpChk:checked + .ordHelpChkFake::after{
  content:'\2713';        /* ✓ */
  color:#ffffff;
  font-size:14px;
  font-weight: 600;
}

/* Label text wraps nicely next to the box */
.ordHelpReasonLabel{
  flex:1;
  line-height:1.3;
}

/* Textarea styling (hook both old + new class names) */
.ordHelpTextarea,
.ordHelpMessage{
   margin-top: 10px;
   width:100%;
   min-height:90px;
   padding:10px 12px;
   border-radius:10px;
   border:1px solid #e1e3e5;
   background: #f1f3f5;
   font-size:14px;
   resize:vertical;
   outline:none;
   transition:border-color .15s ease, box-shadow .15s ease;
}

.ordHelpTextarea:focus,
.ordHelpMessage:focus{
  border-color:#e1e3e5;
}

/* Error text already exists; keep it but add a bit of margin */
.ordHelpError{
  font-size:13px;
  color:#b91c1c;
  margin-top:4px;
}

/* Submit button – black pill, like iOS */
.ordHelpSubmit,
.ordHelpSubmitBtn{
   height: 46px;
   margin-top:0px;
   width:100%;
   border-radius:10px;
   border:0;
   font-size:15px;
   font-weight:500;
   color:#ffffff;
   background:#000;
   cursor:pointer;
   text-transform:uppercase;
   letter-spacing:0.06em;
   transition:
   background-color .16s ease,
   box-shadow .16s ease,
   transform .08s ease;
}

.ordHelpSubmit:hover,
.ordHelpSubmitBtn:hover{
  background:#020617;
  box-shadow:0 8px 16px rgba(15,23,42,0.35);
}

.ordHelpSubmit:active,
.ordHelpSubmitBtn:active{
  transform:translateY(1px);
  box-shadow:0 4px 10px rgba(15,23,42,0.35);
}

.ordHelpSubmitBtn:disabled{
  opacity:.6;
  cursor:default;
  box-shadow:none;
}


/* ===== Order Help (funcID=19) ===== */

.ordHelpBlock {
  margin-top: 24px;
  padding: 10px 18px;
  font-size: 14px;
  background: #f1f3f5;
}

.ordHelpSection {
  margin-bottom: 0px;
}

.ordHelpTitle,
.ordHelpResolutionTitle {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  border-bottom: 1px solid #e1e3e5;
  color: #000;
}

.ordHelpResolutionTitle {
  margin-top: 18px;
}

.ordHelpReasons {
  margin-bottom: 0px;
}

.ordHelpReason {
  line-height: 1.4;
}

.ordHelpReason + .ordHelpReason {
  margin-top: 2px;
}

.ordHelpCommentLabel {
  margin-top: 8px;
  font-weight: 700;
  /* orange-ish like your promo colour */
  color: #b45309;
  font-size: 12px;
}

.ordHelpCommentText {
  margin-top: 0px;
  white-space: pre-wrap;   /* keep line breaks */
}

.ordHelpPendingNote {
  margin-top: 10px;
  font-size: 12px;
  color: #6b7280;
}

.ordHelpButtonRow {
  margin-top: 14px;
}

.ordHelpMessageBtn {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;

  background: #16a34a;    /* green */
  color: #fff;
}

.ordHelpMessageBtn:active {
  transform: translateY(1px);
}

/* Resolution text (e.g. "Full refund issued: CA$57.29") */

.ordHelpResolutionDecision {
  font-weight: 400;
}

.ordHelpResolutionComment {
  white-space: pre-wrap;
}

/* Taxes info icon in totals row */
.ordDetTotalsInfoBtn{
  margin-left:6px;
  padding:0;
  border:0;
  background:none;
  cursor:pointer;
  vertical-align:middle;
}

.ordDetTotalsInfoIconImg{
  width:16px;
  height:16px;
  display:inline-block;
}

/* Overlay + bottom sheet for Taxes & Other Fees */

.ordFeesOverlay{
  position:fixed;
  inset:0;
  z-index:1200;
  background:rgba(0, 5, 10, 0.20);
  display:flex;
  align-items:flex-end;
  justify-content:center;

  /* NEW: fade in/out */
  opacity:0;
  transition:opacity 0.22s ease-out;
}

.ordFeesOverlay[hidden]{
  display:none;
}

/* when visible: fade background in */
.ordFeesOverlay.ordFeesOverlay--show{
  opacity:1;
}

.ordFeesSheet{
    width: min(560px, 100%);
    max-height: 80vh;
    background: #fff;
    border-radius: 24px 24px 0 0;
    padding: 0px 0px 24px;
    box-shadow: 0 -10px 30px rgba(0, 5, 10, 0.3);
    transform: translateY(100%);
    transition: transform 0.22s ease-out;
}

.ordFeesOverlay--show .ordFeesSheet{
  transform:translateY(0);
}

.ordFeesHeader{
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* margin-bottom: 12px; */
    padding: 14px 12px 5px 20px;
    background: #f1f3f5;
    border-radius: 22px 22px 0 0;
}

.ordFeesTitle{
  font-size:18px;
  font-weight:600;
  color: #000;
}

.ordFeesCloseBtn{
  border:0;
  background:none;
  font-size:24px;
  line-height:1;
  cursor:pointer;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  display: flex;
}

.ordFeesBody{
    font-size: 14px;
    color: #4b5563;
    padding: 0 0px;
}

.ordFeesRow{
  padding:10px 0;
  border-top:1px solid #f1f3f5;
}

.ordFeesRow:first-child{
  border-top:0;
}

.ordFeesRowHeader{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  margin-bottom:2px;
  padding: 0 20px;
}

.ordFeesRowTitle{
    font-weight:500;
    color:#000;
    font-size: 15px;
}

.ordFeesRowAmount{
  margin-left:12px;
  white-space:nowrap;
  font-weight:500;
  color: #000;
  font-size: 15px;
}

.ordFeesRowDesc{
  font-size:13px;
  line-height:1.4;
  margin-right: 70px;
  color: #555;
  padding: 0 20px;
}

/* Disabled Help button in Order Detail header */
#ordersHeaderRightBtn.ordDetHelpBtnDisabled{
  color:#c4c4c4;      /* light grey like iOS */
  cursor:default;
  /* pointer-events is already set from JS, but keep here as backup */
  pointer-events:none;
}

.ordersHeaderRightBtn,
#ordersHeaderRightBtn {
  transition: color 0.2s ease, opacity 0.2s ease;
}


/* Footer with button stuck to bottom */
.ordDetReviewFooter {
  flex-shrink: 0;              /* don’t let it get squashed */
  flex: 0 0 auto;
  padding: 16px clamp(14px, 3vw, 18px) 20px;
  background: #f1f3f5;
}

.ordDetReviewBtn {
  width: 100%;
  height: 46px;
  border-radius: 10px;
  border: 0;
  background: #000; /* green like iOS */
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.ordDetReviewBtn[disabled] {
  opacity: 0.55;
  cursor: default;
}

/* Overlay + bottom sheet */
.ordReviewOverlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,0);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease-out, background 0.22s ease-out;
  z-index: 200;
}

.ordReviewOverlay.ordReviewOverlay--show {
  opacity: 1;
  pointer-events: auto;
  background:rgba(0, 5, 10, 0.20);
}

.ordReviewSheet {
  background: #ffffff;
  border-radius: 24px 24px 0 0;
  padding: 0px 0px 20px;
  box-shadow: 0 -10px 35px rgba(0,5,10,0.30);
  transform: translateY(100%);
  transition: transform 0.22s ease-out;
}

.ordReviewOverlay.ordReviewOverlay--show .ordReviewSheet {
  transform: translateY(0);
}

/* Header */
.ordReviewHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    padding: 15px 20px 10px;
    background: #f1f3f5;
    border-radius: 24px 24px 0 0;
}

.ordReviewTitle {
  font-size: 20px;
  font-weight: 700;
  color: #000;
}

.ordReviewCloseBtn {
  border: 0;
  background: transparent;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  display: flex;
}

.ordReviewText {
  margin: 0 20px 12px;
  font-size: 14px;
  color: #444;
}

/* Stars */
.ordReviewStars {
  display: flex;
  margin: 6px 20px 16px;
}

.ordReviewStar {
  height: 48px;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 0.08s ease-out;
}

.ordReviewStar:hover {
  transform: translateY(-1px) scale(1.02);
}

.ordReviewStar img {
  height: 44px;
  display: block;

  /* OFF state: greyed out */
  filter: grayscale(1) brightness(1.8);
}

/* ON state – colored */
.ordReviewStar.is-active img {
  filter: none;
}


/* Textarea + counter */
.ordReviewFieldWrap {
  position: relative;
    margin: 0 20px;
}

.ordReviewTextarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}

.ordReviewTextarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37,99,235,0.35);
}

.ordReviewChar {
  position: absolute;
  right: 8px;
  bottom: 6px;
  font-size: 11px;
  color: #9ca3af;
}

/* Submit */
.ordReviewSubmitBtn {
  width: calc(100% - 40px);
  margin: 0px 20px 0px;
  height: 48px;
  border-radius: 10px;
  border: 0;
  background: #000;
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
}

/* Promo sheet specifics */
.ordPromoSheet .ordFeesBody{
  padding-top: 10px;
  padding-bottom: 24px;
}

.ordPromoCode {
  font-size: 24px;
  font-weight: 800;
  margin: 0 20px 4px;
  /* same orange as discounts / app accent */
  color: #ea580c;
  border-bottom: 1px solid #e5e7e9;
  padding-bottom: 5px;
}

.ordPromoType{
  font-size: 14px;
  font-weight: 500;
  margin: 0 20px 10px;
  color: #666;
}

.ordPromoDesc{
  font-size: 14px;
  line-height: 1.4;
  margin: 0 20px;
  color: #666;
}

.ordDetItem--clickable { cursor: pointer; }


.ordDetItem--clickable:focus-visible{
	outline: 2px solid #111;
	outline-offset: 2px;
	border-radius: 14px;
}

.orderDetail__utensilsRow{
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin: 12px clamp(14px, 3vw, 18px) 0;
  padding: 8px 10px;

  background: #f1f3f5;
  border-radius: 8px;
}

.orderDetail__utensilsLeft{
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.orderDetail__utensilsIcon{
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex: 0 0 auto;
}

.orderDetail__utensilsLabel{
  font-size: 18px;
  font-weight: 500;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.orderDetail__utensilsQty{
  font-size: 21px;
  font-weight: 600;
  color: #000;
  flex: 0 0 auto;
  margin-left: 5px;
}