/* Foodyar UX fixes batch - safe static patch */
:root { --fy-green:#177245; --fy-brown:#795548; --fy-border:#ead7c6; --fy-cream:#fffaf5; --fy-warning:#92400e; --fy-danger:#991b1b; }

/* Standard message colors */
.message { border-radius:16px; border:1px solid #bbf7d0; background:#dcfce7; color:#166534; }
.message.success, .fy-message-success { background:#dcfce7 !important; color:#166534 !important; border-color:#bbf7d0 !important; }
.message.error, .fy-message-error { background:#fee2e2 !important; color:#991b1b !important; border-color:#fecaca !important; }
.message.warning, .fy-message-warning { background:#fef3c7 !important; color:#92400e !important; border-color:#fde68a !important; }

/* Customer menu: cleaner accordion and uniform product add buttons */
.categoryAccordion .category > button span:last-child { color:var(--fy-green); font-weight:900; font-size:22px !important; }
.productCard { align-items:center; }
.productCard > button { min-width:132px; width:clamp(132px, 28vw, 190px); height:44px; border-radius:16px !important; display:inline-flex; align-items:center; justify-content:center; justify-self:end; }
@media (max-width:640px){ .productCard > button { width:100%; min-width:0; justify-self:stretch; } }

/* Cart drawer RTL improvements */
.cartDrawer input, .cartDrawer textarea { direction:rtl !important; text-align:right !important; }
.cartDrawer input::placeholder, .cartDrawer textarea::placeholder { direction:rtl; text-align:right; }
.cartItem { gap:14px; align-items:center; }
.cartActions { display:flex !important; gap:8px !important; align-items:center; flex-direction:row-reverse !important; }
.cartActions button { min-width:44px; height:44px; display:inline-flex; align-items:center; justify-content:center; }
.cartActions .dangerButton { order:3; min-width:70px; }
.totalRow { display:grid !important; grid-template-columns:auto max-content !important; justify-content:start !important; column-gap:12px !important; align-items:center; }
.totalRow span, .totalRow strong { text-align:right; }
.cartSubmitGrid { display:grid !important; grid-template-columns:max-content minmax(260px, 1fr) !important; gap:12px !important; align-items:center; }
.cartSubmitGrid .secondaryButton { justify-self:start; }
.cartSubmitGrid .submitButton { justify-self:stretch; }
@media (max-width:640px){
  .cartActions { flex-direction:column !important; align-items:stretch !important; }
  .cartActions button { width:48px; min-width:48px; align-self:flex-end; }
  .cartActions .dangerButton { width:auto; min-width:80px; }
  .cartSubmitGrid { grid-template-columns:1fr !important; }
  .cartSubmitGrid .submitButton { order:1; width:100%; }
  .cartSubmitGrid .secondaryButton { order:2; width:100%; justify-self:stretch; }
  .totalRow { justify-content:stretch !important; grid-template-columns:auto max-content !important; }
}

/* Owner cafe form layout */
.ownerCafeFormModern .filterGrid { display:grid; grid-template-columns:repeat(3, minmax(220px, 1fr)); gap:16px; align-items:start; }
.ownerCafeFormModern label { display:grid; gap:7px; text-align:right; }
.ownerCafeFormModern input, .ownerCafeFormModern select, .ownerCafeFormModern textarea { text-align:right; }
.ownerCafeFormModern input[dir="ltr"] { text-align:left; direction:ltr; }
.ownerCafeFormModern .passwordBox { margin-top:12px; }
.ownerCafeFormModern .sectionHeader { align-items:flex-start; }
@media (max-width:900px){ .ownerCafeFormModern .filterGrid { grid-template-columns:1fr; } }

/* Admin menu: turn inline product add form into modal-style popup */
.fy-add-product-modal { position:fixed !important; inset:50% auto auto 50% !important; transform:translate(-50%, -50%) !important; z-index:10000 !important; width:min(92vw, 620px) !important; max-height:86vh !important; overflow:auto !important; background:#fffaf5 !important; border:1px solid var(--fy-border) !important; border-radius:28px !important; box-shadow:0 28px 80px rgba(45,32,24,.32) !important; padding:22px !important; }
.fy-add-product-modal::before { content:""; position:fixed; inset:-200vh; background:rgba(47,35,29,.42); z-index:-1; }
.fy-modal-close { border:0; background:#efe2d6; color:#3a2b24; border-radius:999px; width:40px; height:40px; font-size:24px; display:inline-flex; align-items:center; justify-content:center; cursor:pointer; float:left; margin:-4px -4px 8px 0; }
.fy-add-product-modal input, .fy-add-product-modal textarea { text-align:right; direction:rtl; }

/* Variant modal: one main save button at bottom */
.fy-row-save-hidden { display:none !important; }
.fy-variant-submit { margin-top:14px; width:100%; border:0; border-radius:16px; background:var(--fy-green); color:white; padding:13px 16px; font-weight:900; cursor:pointer; }

/* Foodyar Foodyar-like menu UX - scoped classes only */
.menuPage .fy-product-actions {
  justify-self: start;
  align-self: center;
  display: grid;
  gap: 8px;
  min-width: 96px;
}

.menuPage .fy-add-btn {
  background: #fff2e0 !important;
  color: #b45309 !important;
  border: 1px solid #fed7aa !important;
  box-shadow: none !important;
  border-radius: 12px !important;
  min-width: 92px !important;
  width: auto !important;
  height: 40px !important;
  padding: 0 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

.menuPage .fy-product-option-entry {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.menuPage .fy-product-added-summary {
  background: #fffaf5;
  border: 1px solid #ead7c6;
  border-radius: 14px;
  padding: 8px 10px;
  display: grid;
  gap: 3px;
  color: #3a261e;
  font-size: 12px;
  max-width: 180px;
}

.menuPage .fy-product-added-summary small {
  color: #766a61;
  line-height: 1.7;
}

.menuPage .fy-line-item-control {
  grid-column: 1 / -1;
  background: #ffffff;
  border-top: 1px solid #eadfd4;
  margin-top: 4px;
  padding-top: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.menuPage .fy-line-item-summary {
  display: grid;
  gap: 5px;
  text-align: right;
  color: #3a261e;
}

.menuPage .fy-line-item-summary span {
  font-size: 13px;
  color: #766a61;
  line-height: 1.7;
}

.menuPage .fy-line-item-summary strong {
  color: #221813;
  font-size: 14px;
}

.menuPage .fy-qty-control,
.menuPage .fy-cart-qty {
  direction: rtl;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  background: #fffaf5;
  border: 1px solid #eadfd4;
  border-radius: 14px;
  padding: 6px 8px;
  width: auto !important;
  min-width: 118px;
}

.menuPage .fy-qty-control span,
.menuPage .fy-cart-qty span {
  min-width: 22px;
  text-align: center;
  font-weight: 800;
  color: #3a261e;
}

.menuPage .fy-step-btn,
.menuPage .fy-small-add {
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 34px !important;
  padding: 0 !important;
  border-radius: 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #f1ede8 !important;
  color: #3a261e !important;
  box-shadow: none !important;
  font-weight: 900 !important;
  font-size: 18px !important;
}

.menuPage .fy-trash-btn {
  font-size: 15px !important;
  color: #7f1d1d !important;
  background: #fee2e2 !important;
}

.menuPage .fy-option-list {
  display: grid;
  gap: 12px;
}

.menuPage .fy-option-row {
  background: #fffaf5;
  border: 1px solid #ead7c6;
  border-radius: 18px;
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.menuPage .fy-option-info {
  display: grid;
  gap: 5px;
  text-align: right;
}

.menuPage .fy-option-info strong {
  color: #221813;
  font-size: 16px;
}

.menuPage .fy-option-info small {
  color: #766a61;
  font-size: 12px;
}

.menuPage .fy-option-info span {
  color: #177245;
  font-weight: 800;
  font-size: 14px;
}

.menuPage .fy-option-submit {
  position: sticky;
  bottom: 0;
  width: 100% !important;
  margin-top: 14px;
  background: #d97706 !important;
  color: #ffffff !important;
  border-radius: 16px !important;
  min-height: 48px;
  box-shadow: 0 12px 30px rgba(217, 119, 6, 0.26) !important;
}

.menuPage .cartItem {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.menuPage .cartItem .fy-cart-qty {
  justify-self: start;
}

@media (max-width: 720px) {
  .menuPage .productCard {
    grid-template-columns: 86px 1fr !important;
    align-items: start !important;
    gap: 12px !important;
  }

  .menuPage .productCard > .fy-product-actions {
    grid-column: 1 / -1 !important;
    justify-self: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .menuPage .productCard .fy-add-btn {
    justify-self: start !important;
  }

  .menuPage .productCard .fy-add-btn,
  .menuPage .productCard .fy-step-btn,
  .menuPage .productCard .fy-small-add,
  .menuPage .productCard .fy-option-submit {
    grid-column: auto !important;
  }

  .menuPage .fy-line-item-control {
    grid-template-columns: 1fr auto;
    padding: 12px 0 0;
  }

  .menuPage .fy-qty-control,
  .menuPage .fy-cart-qty {
    min-width: 112px;
    padding: 5px 7px;
  }

  .menuPage .fy-option-row {
    grid-template-columns: 1fr auto;
  }
}

@media (max-width: 420px) {
  .menuPage .fy-line-item-control {
    gap: 8px;
  }

  .menuPage .fy-line-item-summary span {
    font-size: 12px;
  }

  .menuPage .fy-qty-control,
  .menuPage .fy-cart-qty {
    gap: 8px !important;
    min-width: 106px;
  }

  .menuPage .fy-step-btn,
  .menuPage .fy-small-add {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
  }
}



/* FOODYAR_QTY_COMPACT_V2_START */
@media (max-width: 768px) {
  /* action area on product cards */
  .menuPage .fy-product-actions{
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    width:auto !important;
    min-width:0 !important;
  }

  /* selected single-item control inside product list */
  .menuPage .fy-line-item-control{
    width:100% !important;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:12px !important;
    flex-wrap:nowrap !important;
    margin-top:8px !important;
  }

  .menuPage .fy-line-item-summary{
    flex:1 1 auto !important;
    min-width:0 !important;
    display:grid !important;
    gap:4px !important;
    text-align:right !important;
  }

  .menuPage .fy-line-item-summary span{
    font-size:13px !important;
    color:#7a6a5f !important;
  }

  .menuPage .fy-line-item-summary strong{
    font-size:16px !important;
    font-weight:800 !important;
    color:#1f2937 !important;
  }

  /* compact qty control like foodyar */
  .menuPage .fy-qty-control,
  .menuPage .fy-cart-qty{
    display:inline-flex !important;
    flex-direction:row !important;
    direction:ltr !important;
    align-items:center !important;
    justify-content:center !important;
    gap:10px !important;
    width:auto !important;
    min-width:146px !important;
    max-width:fit-content !important;
    padding:8px 10px !important;
    border-radius:16px !important;
    background:#f8f3ed !important;
    border:1px solid #eadbcd !important;
    box-shadow:none !important;
    flex:0 0 auto !important;
  }

  .menuPage .fy-step-btn,
  .menuPage .fy-small-add{
    width:38px !important;
    height:38px !important;
    min-width:38px !important;
    padding:0 !important;
    border-radius:12px !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    font-size:24px !important;
    font-weight:900 !important;
    line-height:1 !important;
    box-shadow:none !important;
  }

  .menuPage .fy-trash-btn{
    font-size:18px !important;
  }

  .menuPage .fy-qty-control > span,
  .menuPage .fy-cart-qty > span{
    min-width:22px !important;
    text-align:center !important;
    font-size:22px !important;
    font-weight:900 !important;
    line-height:1 !important;
    color:#1f2937 !important;
    display:inline-block !important;
  }

  /* option modal rows */
  .menuPage .fy-option-list{
    display:grid !important;
    gap:12px !important;
  }

  .menuPage .fy-option-row{
    display:grid !important;
    grid-template-columns:1fr auto !important;
    align-items:center !important;
    gap:12px !important;
    padding:14px 12px !important;
    border-radius:18px !important;
    border:1px solid #eadbcd !important;
    background:#fffaf6 !important;
  }

  .menuPage .fy-option-info{
    display:grid !important;
    gap:4px !important;
    text-align:right !important;
  }

  .menuPage .fy-option-info strong{
    font-size:18px !important;
    font-weight:800 !important;
    color:#1f2937 !important;
  }

  .menuPage .fy-option-info small{
    font-size:12px !important;
    color:#8b7a6d !important;
  }

  .menuPage .fy-option-info span{
    font-size:20px !important;
    font-weight:900 !important;
    color:#0f6a37 !important;
  }

  /* cart rows */
  .menuPage .cartItem{
    display:grid !important;
    grid-template-columns:1fr auto !important;
    gap:12px !important;
    align-items:center !important;
    padding:16px !important;
  }

  .menuPage .cartItem strong{
    display:block !important;
    font-size:18px !important;
    font-weight:800 !important;
    line-height:1.6 !important;
    color:#1f2937 !important;
  }

  .menuPage .cartItem .muted{
    font-size:15px !important;
    line-height:1.7 !important;
  }

  /* make add button smaller and cleaner */
  .menuPage .fy-add-btn{
    min-width:108px !important;
    height:40px !important;
    padding:0 14px !important;
    border-radius:14px !important;
    font-size:16px !important;
    font-weight:800 !important;
  }

  .menuPage .fy-product-added-summary{
    margin-top:8px !important;
    text-align:right !important;
  }

  .menuPage .fy-product-added-summary span{
    display:block !important;
    font-size:13px !important;
    font-weight:800 !important;
    color:#0f6a37 !important;
  }

  .menuPage .fy-product-added-summary small{
    display:block !important;
    margin-top:2px !important;
    font-size:12px !important;
    color:#7a6a5f !important;
    line-height:1.6 !important;
  }
}
/* FOODYAR_QTY_COMPACT_V2_END */



/* Foodyar success box spacing fix */
.successBox .successGrid p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.successBox .successGrid p span {
  white-space: nowrap;
}

.successBox .successGrid p strong {
  unicode-bidi: plaintext;
}
