/* FOODOS V6_26 / 84.62.0
   Scope: requested mobile UI alignment fixes only.
   1) Orders current/history tabs match sale-channel tabs.
   2) Product manager cards are tall enough for drag/status/delete controls.
   3) Main mobile container uses the viewport width without side clipping. */

/* 1) Orders tabs: same visual language as فروش عمده / کافی‌شاپ. */
body[data-foodos-route="orders"] .modern-tabs{
  display:flex!important;
  gap:8px!important;
  padding:6px!important;
  margin:0 0 10px 0!important;
  border-radius:999px!important;
  background:rgba(15,23,42,.06)!important;
  border:1px solid rgba(148,163,184,.28)!important;
  overflow-x:auto!important;
  -webkit-overflow-scrolling:touch!important;
  box-shadow:none!important;
}
body[data-foodos-route="orders"] .modern-tab-btn{
  flex:1 0 120px!important;
  border:0!important;
  border-radius:999px!important;
  padding:10px 14px!important;
  background:transparent!important;
  color:#64748b!important;
  font-weight:900!important;
  white-space:nowrap!important;
  cursor:pointer!important;
  transition:.16s ease!important;
  box-shadow:none!important;
}
body[data-foodos-route="orders"] .modern-tab-btn.active{
  background:var(--primary,#2563eb)!important;
  color:#fff!important;
  box-shadow:0 10px 24px rgba(37,99,235,.28)!important;
  transform:none!important;
}

/* 2) Product manager: keep all three left-side controls inside the card. */
body[data-foodos-route="products"] .product-card.product-card-admin.admin-card-fixed{
  min-height:150px!important;
}

/* 3) Mobile main container: use the available viewport cleanly and prevent child clipping. */
@media (max-width:899px){
  body main#app-container{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
    padding-left:12px!important;
    padding-right:12px!important;
    box-sizing:border-box!important;
  }
  body main#app-container > *{
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }
}

@media (max-width:480px){
  body[data-foodos-route="orders"] .modern-tabs{
    gap:6px!important;
    padding:5px!important;
  }
  body[data-foodos-route="orders"] .modern-tab-btn{
    flex-basis:110px!important;
    padding:9px 10px!important;
    font-size:.86rem!important;
  }
}

/* Requested: full product names in product management cards. */
body[data-foodos-route="products"] .product-card.product-card-admin.admin-card-fixed .pc-top,
#pm-products .product-card.product-card-admin.admin-card-fixed .pc-top{
  align-items:stretch!important;
  flex-direction:column!important;
  flex-wrap:nowrap!important;
  width:100%!important;
}
body[data-foodos-route="products"] .product-card.product-card-admin.admin-card-fixed .product-name,
#pm-products .product-card.product-card-admin.admin-card-fixed .product-name{
  display:block!important;
  flex:0 0 auto!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:normal!important;
  word-break:keep-all!important;
  hyphens:none!important;
  line-height:1.35!important;
}
body[data-foodos-route="products"] .product-card.product-card-admin.admin-card-fixed .pc-cat,
#pm-products .product-card.product-card-admin.admin-card-fixed .pc-cat{
  flex:0 0 auto!important;
  align-self:flex-start!important;
  max-width:100%!important;
}

/* Requested: Template-2 three-primary-color controls in Online Menu appearance. */
.pc-om-template2-colors{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-top:8px;
}
.pc-om-template2-colors label{
  display:grid;
  gap:6px;
  color:var(--text-muted,#64748b);
  font-size:.8rem;
}
.pc-om-template2-colors input[type="color"]{
  width:100%;
  height:52px;
  padding:5px;
}
.pc-om-template-readonly{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:48px;
  padding:10px 12px;
  border:1px solid var(--border-color,#e2e8f0);
  border-radius:12px;
  background:var(--surface-soft,#f8fafc);
  font-weight:900;
}
.pc-om-template-readonly small{
  color:var(--text-muted,#64748b);
  font-weight:600;
}

.menu-powered-by{
  padding:2px 8px 10px;
  text-align:center;
  color:var(--text-muted,#64748b);
  font-size:.78rem;
  direction:rtl;
}
.menu-powered-by b{font-weight:950;direction:ltr;unicode-bidi:isolate;}

@media (max-width:560px){
  .pc-om-template2-colors{grid-template-columns:1fr;}
  .pc-om-template-readonly{align-items:flex-start;flex-direction:column;}
}

/* Requested one-second long-press terminal chooser. */
.pc-terminal-picker-modal{
  position:fixed;
  inset:0;
  z-index:12050;
  display:grid;
  place-items:center;
  padding:18px;
  background:rgba(15,23,42,.58);
  backdrop-filter:blur(5px);
}
.pc-terminal-picker-card{
  position:relative;
  width:min(460px,100%);
  max-height:min(720px,calc(100vh - 36px));
  overflow:auto;
  padding:24px;
  border:1px solid var(--border-color,#e2e8f0);
  border-radius:22px;
  background:var(--surface,#fff);
  color:var(--text-main,#0f172a);
  box-shadow:0 24px 70px rgba(15,23,42,.28);
}
.pc-terminal-picker-card h3{margin:0 0 4px;font-size:1.2rem;}
.pc-terminal-picker-card>p{margin:0 0 16px;color:var(--text-muted,#64748b);font-size:.88rem;}
.pc-terminal-picker-close{
  position:absolute;
  top:14px;
  left:14px;
  width:36px;
  height:36px;
  padding:0;
  border:0;
  border-radius:50%;
  background:var(--surface-soft,#f1f5f9);
  color:var(--text-main,#0f172a);
  font-size:1.55rem;
}
.pc-terminal-picker-list{display:grid;gap:9px;margin:12px 0 16px;}
.pc-terminal-provider{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  width:100%;
  padding:13px 14px;
  border:1px solid var(--border-color,#e2e8f0);
  border-radius:14px;
  background:var(--surface-soft,#f8fafc);
  color:var(--text-main,#0f172a);
  font-weight:900;
  text-align:right;
}
.pc-terminal-provider small{
  padding:3px 8px;
  border-radius:999px;
  background:color-mix(in srgb,var(--primary,#2563eb) 13%,transparent);
  color:var(--primary,#2563eb);
}
.pc-terminal-picker-empty{
  padding:16px;
  border:1px dashed var(--border-color,#cbd5e1);
  border-radius:14px;
  color:var(--text-muted,#64748b);
  text-align:center;
}
.pc-terminal-without-amount{
  width:100%;
  min-height:48px;
  border:0;
  border-radius:14px;
  background:#16a34a!important;
  color:#fff!important;
  font-weight:950;
  box-shadow:0 10px 24px rgba(22,163,74,.25);
}

/* Long-press compound settlement: amounts stay visible while the cashier picks a terminal. */
.pc-compound-card{width:min(500px,100%);padding:23px!important}
.pc-compound-kicker{margin-bottom:4px;color:var(--primary,#2563eb);font-size:.72rem;font-weight:950}
.pc-compound-total{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0;padding:13px 14px;border-radius:15px;background:linear-gradient(135deg,color-mix(in srgb,var(--primary,#2563eb) 13%,transparent),color-mix(in srgb,var(--primary,#2563eb) 4%,transparent));border:1px solid color-mix(in srgb,var(--primary,#2563eb) 24%,transparent)}
.pc-compound-total span{color:var(--text-muted,#64748b);font-size:.78rem;font-weight:850}.pc-compound-total strong{font-size:1rem;font-weight:1000;white-space:nowrap}
.pc-compound-inputs{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.pc-compound-inputs>label>span{display:block;margin:0 2px 6px;color:var(--text-muted,#64748b);font-size:.73rem;font-weight:900}
.pc-compound-inputs>label>div{display:flex;align-items:center;gap:7px;min-height:48px;padding:0 11px;border:1px solid var(--border-color,#e2e8f0);border-radius:13px;background:var(--surface-soft,#f8fafc)}
.pc-compound-inputs input{min-width:0;width:100%;border:0!important;outline:0!important;background:transparent!important;color:var(--text-main,#0f172a);font:inherit;font-weight:950;text-align:right;box-shadow:none!important}
.pc-compound-inputs b{color:var(--text-muted,#64748b);font-size:.68rem;white-space:nowrap}
.pc-compound-terminal-block{margin-top:16px;transition:.2s ease}.pc-compound-terminal-block.is-not-needed{opacity:.48;pointer-events:none}
.pc-compound-section-title{display:flex;align-items:center;justify-content:space-between;gap:10px}.pc-compound-section-title strong{font-size:.85rem}.pc-compound-section-title small{color:var(--text-muted,#64748b);font-size:.68rem}
.pc-compound-terminal{display:flex;align-items:center;gap:10px;padding:11px 12px;border:1px solid var(--border-color,#e2e8f0);border-radius:14px;background:var(--surface-soft,#f8fafc);cursor:pointer}
.pc-compound-terminal:has(input:checked){border-color:color-mix(in srgb,var(--primary,#2563eb) 60%,transparent);background:color-mix(in srgb,var(--primary,#2563eb) 9%,transparent);box-shadow:0 0 0 2px color-mix(in srgb,var(--primary,#2563eb) 8%,transparent)}
.pc-compound-terminal input{accent-color:var(--primary,#2563eb);width:18px;height:18px;flex:0 0 auto}.pc-compound-terminal>span{display:grid;gap:3px;min-width:0;flex:1}.pc-compound-terminal strong{font-size:.83rem;font-weight:950}.pc-compound-terminal small{color:var(--text-muted,#64748b);font-size:.68rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pc-compound-terminal em{padding:3px 7px;border-radius:999px;background:color-mix(in srgb,var(--primary,#2563eb) 13%,transparent);color:var(--primary,#2563eb);font-size:.62rem;font-style:normal;font-weight:950}
.pc-compound-summary{display:grid;gap:7px;margin:14px 0;padding:12px;border:1px solid var(--border-color,#e2e8f0);border-radius:15px}.pc-compound-summary>div{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--text-muted,#64748b);font-size:.75rem}.pc-compound-summary b{color:var(--text-main,#0f172a);font-weight:950}.pc-compound-summary .is-pos{color:var(--primary,#2563eb)}.pc-compound-summary .is-pos b{color:var(--primary,#2563eb)}.pc-compound-summary .is-total{margin-top:2px;padding-top:8px;border-top:1px dashed var(--border-color,#e2e8f0);font-size:.82rem;font-weight:950}
.pc-compound-submit{width:100%;min-height:50px;padding:0 12px;border:0;border-radius:14px;background:var(--primary,#2563eb);color:#fff;font-weight:1000;box-shadow:0 12px 26px color-mix(in srgb,var(--primary,#2563eb) 28%,transparent)}.pc-compound-submit:disabled{opacity:.48;box-shadow:none}
.pc-compound-card .pc-terminal-without-amount{margin-top:9px;min-height:42px;background:transparent!important;color:var(--text-muted,#64748b)!important;border:1px dashed var(--border-color,#cbd5e1);box-shadow:none;font-size:.72rem}
@media(max-width:460px){.pc-compound-inputs{grid-template-columns:1fr}.pc-compound-card{padding:19px!important}.pc-compound-terminal small{white-space:normal}}

/* Requested: disabled personnel placeholder in the FoodOS hamburger menu. */
.side-menu-panel .menu-item-coming-soon{
  cursor:not-allowed!important;
  opacity:.58!important;
  filter:saturate(.35)!important;
}
.side-menu-panel .menu-item-coming-soon small{
  margin-inline-start:auto;
  padding:3px 8px;
  border-radius:999px;
  background:rgba(148,163,184,.2);
  color:var(--text-muted,#64748b);
  font-size:.68rem;
  font-weight:900;
  white-space:nowrap;
}
