/* /opt/dashboard/public/css/app_products.gluemode.css
   Glue mode only (body.products-glue-mode)
*/

body.products-glue-mode .product-card{
  background: #252528 !important;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.55) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
}

body.products-glue-mode .page-menubar{
  display: none !important;
}

body.products-glue-mode .workspace{
  padding-top: calc(var(--topbar-h) + 20px);
}

body.products-glue-mode .layout{
  padding-top: 0;
}

body.products-glue-mode .product-main{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.products-glue-mode .wb-link-btn{
  display: none !important;
}

/* =========================================
   Compact cards in glue mode (slightly wider)
   ========================================= */

body.products-glue-mode .product-card {
  position: relative;
  min-height: 0;
  grid-template-columns: 1fr;
  width: calc(var(--reorder-card-w) + 140px);
  min-width: calc(var(--reorder-card-w) + 140px);
  max-width: calc(var(--reorder-card-w) + 140px);
  align-items: stretch;
  padding: 0px 12px;
  border-radius: 18px;
}

/* selected fill */
body.products-glue-mode .product-card--glue-selected{
  background: rgba(10,132,255,0.08) !important;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08) inset,
    0 12px 28px rgba(0,0,0,0.45);
}

body.products-glue-mode .product-info-block {
  position: sticky;
  left: 0;
  z-index: 5;
  width: 100%;
  min-width: 0;
  max-width: none;
  justify-self: stretch;
  background: transparent;
  border: none;
  box-shadow: none !important;
  padding: 8px 10px 0px 30px;
  gap: 8px;
}

body.products-glue-mode .product-info-block::before {
  content: none !important;
  background: transparent !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
}

/* ✅ align to top */
body.products-glue-mode .product-info-body{
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

/* =========================================
   Checkbox pick: left center of card
   ========================================= */

body.products-glue-mode .glue-pick{
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* =========================================
   Photo sizing
   ========================================= */

body.products-glue-mode .product-image-wrap{
  width: 90px;
  flex: 0 0 90px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.products-glue-mode .product-image-box{
  width: 90px;
  height: 120px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 8px;
}

body.products-glue-mode .product-image-box img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.products-glue-mode .product-main{
  flex: 1 1 auto;
  min-width: 0;
}

/* =========================================
   Title: one line + FIX ugly overlay
   ========================================= */

/* на всякий случай убираем старые "плашки" оверлея */
body.products-glue-mode .product-title::after,
body.products-glue-mode .product-title-row::after{
  content: none !important;
}

/* одна строка + ellipsis */
body.products-glue-mode .product-title{
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-height: none !important;
  font-size: 13px;
  line-height: 1.25;
  display: block;
}

/* аккуратный fade (если поддерживается) */
body.products-glue-mode .product-title{
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 85%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(90deg, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 85%, rgba(0,0,0,0) 100%);
}

/* =========================================
   Hide heavy blocks inside cards
   ========================================= */

body.products-glue-mode .month-progress,
body.products-glue-mode .prices-block,
body.products-glue-mode .orders-block,
body.products-glue-mode .campaigns-block,
body.products-glue-mode .funnel-block {
  display: none !important;
}

body.products-glue-mode .product-info-block > .block-title{
  display: none !important;
}

/* body.products-glue-mode .product-badge-new {
  display: none !important;
} */

/* ✅ NEW badge: оставить на основной, но сделать компактным на peer-карточках */
body.products-glue-mode .product-card--glue-peer .product-badge-new{
  display: inline-flex !important;   /* на всякий случай, если где-то пряталось */
  transform: scale(0.65);
  transform-origin: top left;
  top: 4px;
  left: 21px;
  opacity: 0.9;
  filter: saturate(0.95);
}

/* =========================================
   Glue meta: under characteristics (inside product-main)
   ========================================= */

body.products-glue-mode .glue-meta{
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.products-glue-mode .glue-meta-title{
  font-size: 11px;
  line-height: 1.2;
  color: rgba(161,161,170,0.85);
}

/* ✅ кнопка под характеристиками: компактная, не привязана к фото */
body.products-glue-mode .glue-toggle{
  width: fit-content;
  max-width: 240px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: var(--btn-bg);
  color: rgba(245, 245, 247, 0.92);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  user-select: none;
  transition: background 140ms ease, border-color 140ms ease, transform 80ms ease;
}

body.products-glue-mode .glue-toggle:hover{
  background: var(--accent);
  border-color: rgba(255, 255, 255, 0.20);
}

body.products-glue-mode .glue-toggle__count{
  opacity: 0.92;
  white-space: nowrap;
}

body.products-glue-mode .glue-toggle__chev{
  width: 16px;
  height: 16px;
  opacity: 0.9;
  flex: 0 0 auto;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), opacity 140ms ease;
}

body.products-glue-mode .glue-toggle[aria-expanded="true"] .glue-toggle__chev{
  transform: rotate(180deg);
  opacity: 1;
}

/* =========================================
   Safety: hide edit-only controls in glue mode
   ========================================= */

body.products-glue-mode .drag-handle,
body.products-glue-mode .exclude-toggle,
body.products-glue-mode .variants-toggle-edit{
  display: none !important;
}

/* =========================================
   Expanded peers OUTSIDE main card (siblings)
   ========================================= */

body.products-glue-mode .product-card--glue-peer{
  width: calc(var(--reorder-card-w) + 40px);
  min-width: calc(var(--reorder-card-w) + 40px);
  max-width: calc(var(--reorder-card-w) + 40px);
}

body.products-glue-mode .glue-peers-outside{
  margin-top: 10px;
  margin-left: 80px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  padding-left: 18px;
}

/* ✅ ADDED: left stripe for peers list */
body.products-glue-mode .glue-peers-outside::before{
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: rgba(255,255,255,0.12);
  pointer-events: none;
}

body.products-glue-mode .product-card--glue-peer .product-info-block{
  padding: 0 8px 0 30px;
}

body.products-glue-mode .product-card--glue-peer .product-image-wrap{
  width: 42px;
  flex: 0 0 42px;
}

body.products-glue-mode .product-card--glue-peer .product-image-box{
  width: 42px;
  height: 56px;
  border-radius: 8px;
  margin-top: 7px;
}
