/* FollowerAbzar SMM 75.10.0 — scoped mobile/order/performance experience */
:root{
  --fasmm-mobile-nav-height:66px;
  --fasmm-safe-bottom:env(safe-area-inset-bottom,0px);
  --fasmm-floating-gap:12px;
  --fasmm-floating-size:54px;
  --fasmm-z-floating:1060;
}

/* One coordinated layer for all mobile floating actions. */
.fasmm-mobile-floating-stack{
  position:fixed;
  inset-inline-start:auto;
  inset-inline-end:16px;
  inset-block-end:calc(var(--fasmm-mobile-nav-height) + var(--fasmm-safe-bottom) + 16px);
  z-index:var(--fasmm-z-floating);
  display:flex;
  flex-direction:column-reverse;
  align-items:center;
  gap:var(--fasmm-floating-gap);
  pointer-events:none;
}
.fasmm-mobile-floating-stack:empty{display:none}
.fasmm-mobile-floating-stack>.fasmm-mobile-floating-item,
.fasmm-mobile-floating-stack>.fasmm-cart-float,
.fasmm-mobile-floating-stack>.fasmm-representation-widget{
  position:relative;
  inset:auto;
  margin:0;
  bottom:auto!important;
  left:auto!important;
  right:auto!important;
  pointer-events:auto;
}
.fasmm-mobile-floating-stack .fasmm-cart-float,
.fasmm-mobile-floating-stack .fasmm-representation-widget__toggle{
  inline-size:var(--fasmm-floating-size);
  block-size:var(--fasmm-floating-size);
  min-inline-size:44px;
  min-block-size:44px;
}
.fasmm-mobile-floating-stack .fasmm-representation-widget__popover{
  left:0!important;
  right:auto!important;
  inset-inline:auto!important;
  inset-block-end:calc(100% + 10px);
}
body.fasmm-ui-drawer-open .fasmm-mobile-floating-stack,
body.fasmm-admin-drawer-open .fasmm-mobile-floating-stack,
body.modal-open .fasmm-mobile-floating-stack,
body.fasmm-mobile-keyboard-open .fasmm-mobile-floating-stack{display:none!important}
body.wp-admin .fasmm-mobile-floating-stack{display:none!important}

/* Mobile user orders: force exactly one readable card per row. */
@media(max-width:767px){
  .fasmm-mobile-floating-stack{display:flex}
  .fasmm-mobile-bottom-nav{min-height:var(--fasmm-mobile-nav-height)}
  .fasmm-panel-main,.fasmm-panel-content,.fasmm-tab-content{padding-bottom:calc(var(--fasmm-mobile-nav-height) + var(--fasmm-safe-bottom) + 24px)}
  .fasmm-ui-v75 .fasmm-user-order-grid,
  .fasmm-user-orders.fasmm-user-order-grid,
  .fasmm-user-order-grid,
  .fasmm-orders-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-auto-flow:row!important;
    gap:14px!important;
    width:100%!important;
    min-width:0!important;
  }
  .fasmm-user-order-card{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    padding:14px!important;
    overflow:visible;
    word-break:normal!important;
    overflow-wrap:break-word;
  }
  .fasmm-user-order-card *{min-width:0}
  .fasmm-user-order-card .fasmm-order-id,
  .fasmm-user-order-card [dir="ltr"],
  .fasmm-user-order-card .fasmm-money,
  .fasmm-user-order-card time{white-space:nowrap;word-break:normal!important}
  .fasmm-user-order-card a[href]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
  .fasmm-user-order-card .fasmm-order-head,
  .fasmm-user-order-card .fasmm-order-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;flex-wrap:wrap}
  .fasmm-user-order-card h3,.fasmm-user-order-card h4{font-size:14px;line-height:1.8;margin:0}
  .fasmm-user-order-card p,.fasmm-user-order-card small,.fasmm-user-order-card span{font-size:max(13px,1em);line-height:1.75}
  .fasmm-user-order-card .fasmm-order-data-grid,
  .fasmm-user-order-card .fasmm-order-meta-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .fasmm-user-order-card .fasmm-order-data-grid>div,
  .fasmm-user-order-card .fasmm-order-meta-grid>div{padding:9px;border:1px solid #e2e8f0;border-radius:9px;background:#f8fafc}
  .fasmm-user-order-card .fasmm-order-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .fasmm-user-order-card .fasmm-order-actions .fasmm-btn{width:100%;min-height:44px;padding-inline:8px}

  .fasmm-order-shell{grid-template-columns:1fr!important;gap:12px!important}
  .fasmm-order-main,.fasmm-order-sidebar{width:100%;min-width:0;max-width:100%;padding:0}
  .fasmm-order-sidebar{position:static!important;inset:auto!important;max-height:none!important}
  .fasmm-order-summary-body{display:block;border:1px solid #e2e8f0;border-radius:12px;padding:12px;background:#fff}
}

@media(max-width:359px){
  .fasmm-mobile-floating-stack{inset-inline-start:auto;inset-inline-end:10px;--fasmm-floating-size:48px}
  .fasmm-user-order-card .fasmm-order-actions{grid-template-columns:1fr}
}

@media(min-width:768px){
  .fasmm-mobile-floating-stack{display:none!important}
  .fasmm-order-summary-body{display:block!important}
}

/* Admin mobile refinements; scoped, no changes to desktop shell ownership. */
@media(max-width:1023px){
  body.wp-admin .fasmm-admin-root,
  body.wp-admin .wrap.fasmm-admin{max-width:100%;min-width:0;overflow-x:hidden}
  body.wp-admin .fasmm-admin-shell{display:block!important;width:100%!important;min-width:0!important;padding:12px!important}
  body.wp-admin .fasmm-admin-main{width:100%!important;min-width:0!important;max-width:100%!important;margin:0!important}
  body.wp-admin .fasmm-admin-sidebar{width:min(88vw,360px)!important;max-width:360px!important;min-width:0!important}
  body.wp-admin .fasmm-admin-page-header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}
  body.wp-admin .fasmm-admin-page-header h1{font-size:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  body.wp-admin .fasmm-admin-toolbar,
  body.wp-admin .fasmm-admin-filterbar,
  body.wp-admin .fasmm-bulk-toolbar{grid-template-columns:1fr!important;align-items:stretch!important}
  body.wp-admin .fasmm-admin-toolbar .button,
  body.wp-admin .fasmm-admin-filterbar .button{min-height:44px}
  body.wp-admin .fasmm-admin-table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  body.wp-admin .fasmm-expansion-panel,.fasmm-admin-root .fasmm-editor-grid{grid-template-columns:1fr!important}
  body.wp-admin .fasmm-expansion-panel input,
  body.wp-admin .fasmm-expansion-panel select,
  body.wp-admin .fasmm-expansion-panel textarea{width:100%;max-width:100%;min-height:44px}
}
@media(max-width:767px){
  body.wp-admin .fasmm-summary-row{display:grid!important;grid-template-columns:1fr auto;gap:8px;padding:12px;border:1px solid #e2e8f0;border-radius:12px;margin-bottom:10px;background:#fff}
  body.wp-admin .fasmm-summary-row>td{display:block!important;width:auto!important;max-width:100%;border:0!important;padding:4px!important;white-space:normal!important}
  body.wp-admin .fasmm-summary-row>td[data-label]::before{content:attr(data-label);display:block;color:#64748b;font-size:11px;margin-bottom:2px}
  body.wp-admin .fasmm-expansion-row{display:block!important}
  body.wp-admin .fasmm-expansion-row>td{display:block!important;width:100%!important;padding:0!important}
  body.wp-admin .fasmm-admin-status-tabs{display:flex!important;overflow-x:auto;overscroll-behavior-inline:contain;scroll-snap-type:x proximity;gap:8px;padding-bottom:5px}
  body.wp-admin .fasmm-admin-status-tabs>*{flex:0 0 auto;scroll-snap-align:start;min-height:42px}
}
@media(max-width:767px){
  .fasmm-user-order-grid>.fasmm-order-item,
  .fasmm-user-orders>.fasmm-order-item{
    width:100%!important;min-width:0!important;max-width:100%!important;margin:0!important;padding:14px!important;
    overflow:hidden;word-break:normal!important;overflow-wrap:break-word
  }
  .fasmm-order-item *{min-width:0}
  .fasmm-order-item .fasmm-order-head{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:10px!important;flex-wrap:wrap!important}
  .fasmm-order-item .fasmm-order-title{flex:1 1 180px;min-width:0}
  .fasmm-order-item .fasmm-order-service-name{display:block;font-size:14px;line-height:1.8;overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:break-word;word-break:normal}
  .fasmm-order-item .fasmm-order-number,.fasmm-order-item .fasmm-status,.fasmm-order-item [dir="ltr"]{white-space:nowrap;word-break:normal!important}
  .fasmm-order-item .fasmm-order-link-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:8px!important;align-items:center!important}
  .fasmm-order-item .fasmm-order-link-label{grid-column:1/-1}
  .fasmm-order-item .fasmm-order-link{margin:0!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;direction:ltr;text-align:left}
  .fasmm-order-item .fasmm-order-meta{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .fasmm-order-item .fasmm-order-meta>div{border:1px solid #e2e8f0;border-radius:9px;padding:9px;background:#f8fafc}
  .fasmm-order-item .fasmm-order-actions-mini{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .fasmm-order-item .fasmm-order-actions-mini>*{width:100%!important;min-height:44px!important;justify-content:center!important}
}
@media(max-width:767px){
  body.wp-admin .fasmm-services-table-scroll{overflow:visible!important;border:0!important}
  body.wp-admin table.fasmm-services-table{display:block!important;min-width:0!important;width:100%!important;background:transparent!important}
  body.wp-admin table.fasmm-services-table thead{display:none!important}
  body.wp-admin table.fasmm-services-table tbody{display:grid!important;grid-template-columns:1fr!important;gap:12px!important}
  body.wp-admin table.fasmm-services-table tbody tr{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;width:100%!important;padding:12px!important;border:1px solid #e2e8f0!important;border-radius:12px!important;background:#fff!important;box-sizing:border-box!important}
  body.wp-admin table.fasmm-services-table tbody td{display:block!important;width:auto!important;max-width:100%!important;padding:5px!important;border:0!important;white-space:normal!important;overflow-wrap:break-word!important}
  body.wp-admin table.fasmm-services-table tbody td:nth-child(2),
  body.wp-admin table.fasmm-services-table tbody td:nth-child(3),
  body.wp-admin table.fasmm-services-table tbody td:nth-child(10){grid-column:1/-1}
  body.wp-admin table.fasmm-services-table tbody td:nth-child(1)::before{content:'انتخاب';display:block;color:#64748b;font-size:11px}
  body.wp-admin table.fasmm-services-table tbody td:nth-child(2)::before{content:'شناسه';display:block;color:#64748b;font-size:11px}
  body.wp-admin table.fasmm-services-table tbody td:nth-child(3)::before{content:'سرویس';display:block;color:#64748b;font-size:11px}
  body.wp-admin table.fasmm-services-table tbody td:nth-child(4)::before{content:'برند / دسته';display:block;color:#64748b;font-size:11px}
  body.wp-admin table.fasmm-services-table tbody td:nth-child(5)::before{content:'فروش';display:block;color:#64748b;font-size:11px}
  body.wp-admin table.fasmm-services-table tbody td:nth-child(6)::before{content:'ارائه‌دهنده';display:block;color:#64748b;font-size:11px}
  body.wp-admin table.fasmm-services-table tbody td:nth-child(7)::before{content:'قیمت و سود';display:block;color:#64748b;font-size:11px}
  body.wp-admin table.fasmm-services-table tbody td:nth-child(8)::before{content:'محدوده / همگام‌سازی';display:block;color:#64748b;font-size:11px}
  body.wp-admin table.fasmm-services-table tbody td:nth-child(9)::before{content:'سلامت';display:block;color:#64748b;font-size:11px}
  body.wp-admin table.fasmm-services-table tbody td:nth-child(10)::before{content:'عملیات';display:block;color:#64748b;font-size:11px}
  body.wp-admin .fasmm-admin-order-list{display:grid!important;grid-template-columns:1fr!important;gap:12px!important}
  body.wp-admin .fasmm-admin-order-card{width:100%!important;min-width:0!important;max-width:100%!important;padding:12px!important}
  body.wp-admin .fasmm-admin-order-card .fasmm-order-admin-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.wp-admin .fasmm-services-bulk-row,.fasmm-admin-root .fasmm-bulk-row{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  body.wp-admin .fasmm-services-bulk-row>*{width:100%!important;min-height:44px!important}
}
@media(max-width:767px){
  body.fasmm-panel-fullscreen .fasmm-mobile-floating-stack>.fasmm-cart-float,
  body.fasmm-panel-fullscreen .fasmm-mobile-floating-stack>.fasmm-representation-widget{
    position:relative!important;
    inset:auto!important;
    inset-block-end:auto!important;
    inset-inline-start:auto!important;
    inset-inline-end:auto!important;
    margin:0!important;
    transform:none!important;
  }
  body.fasmm-panel-fullscreen .fasmm-mobile-floating-stack>.fasmm-cart-float{
    z-index:auto!important;
    width:var(--fasmm-floating-size)!important;
    height:var(--fasmm-floating-size)!important;
  }
}

/* 75.10.0 shared safe-area and collision management */
:root{--fasmm-mobile-nav-height:72px;--fasmm-mobile-safe-bottom:env(safe-area-inset-bottom);--fasmm-mobile-content-bottom-gap:24px}.fasmm-panel-view{width:100%;min-width:0;max-width:100%}.fasmm-panel-view>*{min-width:0;max-width:100%}.fasmm-mobile-floating-stack{transition:opacity .16s ease,transform .16s ease}.fasmm-floating-stack-toggle{pointer-events:auto;display:grid;place-items:center;width:48px;height:48px;border:0;border-radius:50%;background:#334155;color:#fff;box-shadow:0 8px 22px rgba(15,23,42,.2);font-size:22px}.fasmm-mobile-floating-stack.is-collapsible:not(.is-open)>.fasmm-mobile-floating-item{display:none}.fasmm-mobile-floating-stack.is-collapsible.is-open>.fasmm-mobile-floating-item{display:block}.fasmm-mobile-floating-stack.is-collapsible.is-open .fasmm-floating-stack-toggle{background:#5b4ff5}.fasmm-floating-near-footer .fasmm-mobile-floating-stack{opacity:0;pointer-events:none;transform:translateY(-8px)}
@media(max-width:767px){.fasmm-panel-content{padding-inline:12px}.fasmm-panel-view{overflow-x:clip;padding-bottom:calc(var(--fasmm-mobile-nav-height) + var(--fasmm-mobile-safe-bottom) + var(--fasmm-mobile-content-bottom-gap))}.fasmm-mobile-bottom-nav{inset-inline:8px;width:auto;max-width:calc(100vw - 16px);grid-template-columns:repeat(5,minmax(0,1fr));box-sizing:border-box;overflow:clip;padding-bottom:max(8px,env(safe-area-inset-bottom));height:auto;min-height:var(--fasmm-mobile-nav-height)}.fasmm-mobile-bottom-nav>*{min-width:0;max-width:100%;overflow:hidden}.fasmm-mobile-floating-stack{inset-block-end:calc(var(--fasmm-mobile-nav-height) + env(safe-area-inset-bottom) + 14px);inset-inline-start:auto;inset-inline-end:12px}}
