/* MENU_MODAL_COMPACT v1 — scoped to options modal only */
.gsts-compact-menu-modal .modal-content {
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 22px 50px rgba(15, 23, 42, 0.14);
}
.gsts-compact-menu-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 0.65rem;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.gsts-compact-menu-modal .modal-body {
  padding: 0.85rem 1rem 1rem;
}
.gsts-compact-menu-modal .modal-footer {
  padding: 0.85rem 1rem 1rem;
  gap: 0.65rem;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.65) 0%, #fff 55%);
}

.gsts-compact-menu-modal .modal-title {
  font-size: clamp(1.05rem, 2.8vw, 1.2rem);
  line-height: 1.22;
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  padding-inline-end: 0.35rem;
}
.gsts-compact-menu-modal h5 {
  font-size: 0.95rem;
  margin: 0 0 0.35rem;
  line-height: 1.2;
}

.gsts-compact-menu-modal .menu-option {
  margin-bottom: 0.6rem !important;
}
.gsts-compact-menu-modal .option-details {
  margin-bottom: 0.5rem;
}

/* Option group header: title + status as separate flex cells (RTL/LTR). */
.gsts-compact-menu-modal .option-group-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.gsts-compact-menu-modal .option-group-title {
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
  font-size: 0.95rem;
  line-height: 1.3;
  font-weight: 700;
  text-align: start;
}
.gsts-compact-menu-modal .option-group-status {
  flex: 0 0 auto;
  font-size: 0.85rem;
  line-height: 1.3;
  color: #64748b;
  font-weight: 600;
  text-align: end;
  white-space: nowrap;
}
.gsts-compact-menu-modal .option-group-helper {
  margin-block: 0.3rem 0;
  margin-inline: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: #64748b;
  text-align: start;
}

/* Quantity value rows: name, price, and stepper as separate cells. */
.gsts-compact-menu-modal .gsts-option-qty-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-block: 0.4rem;
  min-width: 0;
}
.gsts-compact-menu-modal .gsts-option-qty-stepper {
  direction: ltr;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.2rem;
}
.gsts-compact-menu-modal .gsts-option-qty-stepper .btn {
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.gsts-compact-menu-modal .gsts-option-qty-stepper .form-control {
  width: 2rem;
  max-width: 2rem;
  height: 1.75rem;
  padding: 0;
  font-weight: 700;
}
.gsts-compact-menu-modal .gsts-option-qty-name {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  font-size: 0.92rem;
  line-height: 1.35;
  text-align: start;
}
.gsts-compact-menu-modal .gsts-option-qty-price {
  flex: 0 0 auto;
  unicode-bidi: isolate;
  direction: ltr;
  font-size: 0.9rem;
  line-height: 1.3;
  white-space: nowrap;
}
.gsts-compact-menu-modal .gsts-menu-option-error {
  margin-block: 0.55rem 0.75rem;
  padding-block: 0.35rem;
  padding-inline: 0.15rem;
  font-size: 0.9rem;
  line-height: 1.45;
  text-align: start;
}

.gsts-compact-menu-modal .form-check {
  margin-bottom: 0.25rem;
}
.gsts-compact-menu-modal .form-check-label {
  font-size: 0.9rem;
  line-height: 1.2;
}
.gsts-compact-menu-modal .form-check-input {
  margin-top: 0.2rem;
}

.gsts-compact-menu-modal .btn {
  padding: 0.4rem 0.7rem;
  font-size: 0.9rem;
}
.gsts-compact-menu-modal .modal-header .btn-close {
  /* Always push to the side opposite the title (left in RTL, right in LTR)
     and keep it vertically centered with a 44px touch target. Selector
     includes .modal-header to beat Bootstrap's .modal-header .btn-close. */
  flex: 0 0 auto;
  align-self: center;
  margin: 0;
  margin-inline-start: auto;
  margin-inline-end: 0;
  padding: 0.55rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  background-position: center;
  background-size: 0.85rem;
  transform: scale(1);
  opacity: 0.72;
}
.gsts-compact-menu-modal .modal-header .modal-title {
  align-self: center;
}

.gsts-compact-menu-modal .btn-close:hover,
.gsts-compact-menu-modal .btn-close:focus {
  opacity: 1;
}

/* Quantity controls (best-effort; do not break if selectors differ) */
.gsts-compact-menu-modal [data-control="quantity"] .btn,
.gsts-compact-menu-modal .quantity-selector .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.9rem;
}
.gsts-compact-menu-modal [data-control="quantity"] input,
.gsts-compact-menu-modal .quantity-selector input {
  height: 2rem;
  padding: 0.25rem 0.5rem;
}

/* --- Compact image + tighter layout (v2) --- */

/* Reduce overall modal width a bit on small screens */
@media (max-width: 576px) {
  .gsts-compact-menu-modal.modal-dialog {
    margin: 0.5rem auto;
    max-width: 420px;
  }
}

/* Polished image area — clean edge-to-edge crop, no large empty gutters */
.gsts-compact-menu-modal .modal-top {
  position: relative;
  background: #f1f5f9;
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.06);
}

.gsts-compact-menu-modal .modal-top img {
  width: 100%;
  height: 185px;
  object-fit: cover;     /* centered crop, fills the frame cleanly */
  object-position: center;
  display: block;
  background: #f1f5f9;
}

@media (max-width: 576px) {
  .gsts-compact-menu-modal .modal-top img { height: 170px; }
}

/* Description: readable, calm; allow a few lines without endless scroll */
.gsts-compact-menu-modal .modal-body p.text-muted,
.gsts-compact-menu-modal .modal-body p.gsts-modal-desc {
  font-size: 0.94rem;
  line-height: 1.58;
  margin-block: 0 0.75rem;
  color: #475569 !important;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Comment field */
.gsts-compact-menu-modal .menu-comment {
  margin-block-start: 0.35rem;
}

.gsts-compact-menu-modal .menu-comment textarea.form-control {
  min-height: 3rem;
  padding: 0.55rem 0.65rem;
  font-size: 0.92rem;
  line-height: 1.45;
  border-radius: 0.65rem;
  border-color: rgba(15, 23, 42, 0.12);
  resize: vertical;
}

.gsts-compact-menu-modal .menu-comment textarea.form-control:focus {
  border-color: rgba(234, 88, 12, 0.45);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.14);
}

/* Touch-friendly +/- buttons (override inline width/height safely, scoped) */
.gsts-compact-menu-modal .input-group.input-group-lg > .btn.rounded-circle {
  width: 40px !important;
  height: 40px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.gsts-compact-menu-modal .input-group.input-group-lg > input.form-control {
  max-width: 48px !important;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

/* Options block rhythm */
.gsts-compact-menu-modal .menu-options {
  margin-block-end: 0.35rem;
}

.gsts-compact-menu-modal .modal-footer .row {
  align-items: center;
}

.gsts-compact-menu-modal .modal-footer .input-group.input-group-lg {
  justify-content: center;
  max-width: 11.5rem;
  margin-inline: auto;
}

@media (min-width: 576px) {
  .gsts-compact-menu-modal .modal-footer .input-group.input-group-lg {
    margin-inline: 0;
  }
}

/* Warm orange/gold add-to-order CTA — replaces the harsh neon default,
   matches the ordering theme. Higher specificity overrides Bootstrap btn-primary. */
.gsts-compact-menu-modal .modal-footer .btn.btn-primary.btn-lg {
  min-height: 50px;
  border-radius: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding-block: 0.6rem;
  padding-inline: 0.95rem;
  color: #fff !important;
  background: linear-gradient(180deg, #f5a623 0%, #ec7a1c 52%, #df6a12 100%);
  border: 1px solid rgba(180, 83, 9, 0.45);
  box-shadow: 0 8px 20px rgba(223, 106, 18, 0.28);
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.gsts-compact-menu-modal .modal-footer .btn.btn-primary.btn-lg:hover,
.gsts-compact-menu-modal .modal-footer .btn.btn-primary.btn-lg:focus-visible {
  filter: brightness(1.03);
  box-shadow: 0 10px 24px rgba(223, 106, 18, 0.34);
}

.gsts-compact-menu-modal .modal-footer .btn.btn-primary.btn-lg:active {
  filter: brightness(0.97);
  box-shadow: 0 4px 12px rgba(223, 106, 18, 0.26);
}

/* Balanced label + price: keep them as one cohesive button, price in a soft pill */
.gsts-compact-menu-modal .modal-footer .btn.btn-primary.btn-lg > .d-flex {
  justify-content: space-between;
  gap: 0.6rem;
  width: 100%;
}

.gsts-compact-menu-modal .modal-footer .btn.btn-primary.btn-lg .col.text-nowrap {
  flex: 1 1 auto;
  text-align: start;
  font-size: 1rem;
}

.gsts-compact-menu-modal .modal-footer .btn.btn-primary.btn-lg .col.text-end {
  flex: 0 0 auto;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  white-space: nowrap;
}

.gsts-compact-menu-modal .modal-footer .btn.btn-outline-secondary.rounded-circle {
  border-color: rgba(15, 23, 42, 0.14) !important;
  color: #334155 !important;
  background: #fff !important;
}

.gsts-compact-menu-modal .modal-footer .btn.btn-outline-secondary.rounded-circle:hover {
  border-color: rgba(234, 88, 12, 0.45) !important;
  color: #c2410c !important;
  background: rgba(255, 251, 245, 0.95) !important;
}

/* Checkout fulfillment / order-type modal — scoped to #fulfillmentModal only */
#fulfillmentModal .modal-content {
  border-radius: 1.15rem;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 22px 50px rgba(15, 23, 42, 0.14);
}

#fulfillmentModal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1rem 1rem 0.65rem;
}

#fulfillmentModal .modal-header .btn-close {
  flex: 0 0 auto;
  align-self: center;
  margin: 0;
  margin-inline-start: auto;
  margin-inline-end: 0;
  padding: 0.55rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  background-position: center;
  background-size: 0.85rem;
  opacity: 0.72;
}

#fulfillmentModal .modal-header .modal-title {
  align-self: center;
  font-weight: 700;
  line-height: 1.35;
}

#fulfillmentModal .form-check {
  min-height: 2.75rem;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding-inline-start: 0;
  padding-left: 0;
  margin-bottom: 0;
}

#fulfillmentModal .form-check-input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0.15rem 0 0;
  margin-inline-start: 0;
  margin-inline-end: 0;
  float: none;
  flex: 0 0 auto;
  position: static;
}

#fulfillmentModal .form-check-label {
  line-height: 1.35;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 !important;
}

html[dir="rtl"] #fulfillmentModal .form-check,
[dir="rtl"] #fulfillmentModal .form-check,
html[lang^="fa"] #fulfillmentModal .form-check,
html[lang^="ar"] #fulfillmentModal .form-check {
  flex-direction: row;
  text-align: right;
}

html[dir="rtl"] #fulfillmentModal .form-check-label,
[dir="rtl"] #fulfillmentModal .form-check-label,
html[lang^="fa"] #fulfillmentModal .form-check-label,
html[lang^="ar"] #fulfillmentModal .form-check-label {
  text-align: right;
}

html[dir="rtl"] #fulfillmentModal .modal-header .btn-close,
[dir="rtl"] #fulfillmentModal .modal-header .btn-close,
html[lang^="fa"] #fulfillmentModal .modal-header .btn-close,
html[lang^="ar"] #fulfillmentModal .modal-header .btn-close {
  margin-inline-start: 0;
  margin-inline-end: auto;
}

html[dir="rtl"] #fulfillmentModal #local-timeslot .row,
[dir="rtl"] #fulfillmentModal #local-timeslot .row,
html[lang^="fa"] #fulfillmentModal #local-timeslot .row,
html[lang^="ar"] #fulfillmentModal #local-timeslot .row {
  direction: rtl;
}

#fulfillmentModal .modal-footer .gsts-fulfillment-modal__submit.btn.btn-primary.btn-lg {
  min-height: 50px;
  border-radius: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding-block: 0.6rem;
  color: #fff !important;
  background: linear-gradient(180deg, #f5a623 0%, #ec7a1c 52%, #df6a12 100%) !important;
  border: 1px solid rgba(180, 83, 9, 0.45) !important;
  box-shadow: 0 8px 20px rgba(223, 106, 18, 0.28);
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}

#fulfillmentModal .modal-footer .gsts-fulfillment-modal__submit.btn.btn-primary.btn-lg:hover,
#fulfillmentModal .modal-footer .gsts-fulfillment-modal__submit.btn.btn-primary.btn-lg:focus-visible {
  filter: brightness(1.03);
  box-shadow: 0 10px 24px rgba(223, 106, 18, 0.34);
}

#fulfillmentModal .modal-footer .gsts-fulfillment-modal__submit.btn.btn-primary.btn-lg:active {
  filter: brightness(0.97);
  box-shadow: 0 4px 12px rgba(223, 106, 18, 0.26);
}
