/* =========================
   VIRTUAL SCROLLER (ORDERS)
   ========================= */

#spacer-orders {
  width: 100%;
  padding: 0;
  margin: 0;
  position: relative;
}

#scroller-orders {
  overflow-anchor: none;
  height: var(--virtual-scroller-orders-height);
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: absolute;
  width: 100%;
  padding: 0;
  margin: 0;
}

/* Единственный слой с transform */
#translate-orders {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  will-change: transform;
}

#viewport-orders {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
}

/* =========================
   FILTERS
   ========================= */

.orders-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 0;
  height: var(--orders-filters-card-height);
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 15px;
  margin: 5px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  z-index: 1000;
}

/* =========================
   ORDER CARD
   ========================= */

.order-card {
  height: var(--orders-card-height);
  width: 100%;
  padding: 5px;
  position: relative;
  overflow: hidden;

  
  contain: paint;
}

.order-card-inner {
  height: 100%;
  width: 100%;
  box-sizing: border-box;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 10px;

  display: flex;
  flex-direction: column;

  
  min-height: 0;
}



.order-card-inner.highlight {
  animation: highlight-order 2s ease-in-out;
  position: relative;
  z-index: 10;
}

@keyframes highlight-order {
  0%, 100% {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
    transform: scale(1);
  }
  30%, 70% {
    box-shadow: 0 0 20px rgba(51, 255, 0, 0.6),
                0 0 40px rgba(3, 112, 9, 0.3);
                
    transform: scale(1.02);
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
  }
}


.order-card-inner.highlight-border {
  border: 3px solid #1100ff !important;
  box-shadow: 0 0 15px rgba(110, 91, 214, 0.5);
}

/* =========================
   HEADER
   ========================= */

.order-header {
  width: 100%;
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex-shrink: 0;
}

/* =========================
   IMAGES
   ========================= */

.order-image-wrapper {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  position: relative;
  border-radius: var(--border-radius);
}

.order-images-scroll {
  display: flex;
  gap: 4px;
  padding: 4px 0;

  overflow-x: auto;
  overflow-y: hidden;

  flex-shrink: 0;
  min-height: 100px;
}

.order-item-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

/* =========================
   ITEMS SCROLL (INSIDE CARD)
   ========================= */

.order-items-scroll {
  display: flex;
  gap: 4px;
  padding: 4px 0;

  overflow-x: auto;

  flex: 1;
  min-height: 0;
}

/* =========================
   DATE RANGE
   ========================= */

.date-range-row {
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
}

.date-range-row > :nth-child(1) { width: 20%; }
.date-range-row > :nth-child(2) { width: 40%; }
.date-range-row > :nth-child(3) { width: 40%; }
