/* ========================================================================
   MO_POS_42_PATCHED_v6 - v6.7.13: Design tokens đồng bộ 3 màn hình
   PC desktop + Mobile phục vụ + Mobile order hải sản
   
   Nguyên tắc:
   - CHỈ định nghĩa CSS variables, không định nghĩa class mới
   - KHÔNG đổi tên class, KHÔNG đổi HTML structure, KHÔNG đổi JS
   - Các file CSS hiện có sẽ override hoặc tham chiếu vars ở đây
   - Tất cả màu nằm trong 1 hệ: xanh biển #0784c3 chủ đạo
   ======================================================================== */

:root {
  /* ============== Brand colors - đồng bộ 3 màn hình ============== */
  --pos-primary: #0784c3;          /* xanh chủ đạo - header, nút primary, mã bàn phục vụ */
  --pos-primary-hover: #0670a8;    /* darker khi hover */
  --pos-primary-light: #f0f9ff;    /* nền nhạt khi bàn đang phục vụ */
  --pos-primary-border: #bae6fd;   /* viền nhạt cho bàn đang phục vụ */
  --pos-primary-text: #0c4a6e;     /* text trên nền nhạt primary */

  /* Semantic colors - giữ nguyên ý nghĩa cũ */
  --pos-success: #059669;          /* xanh lá - gửi bếp, in phiếu, thêm món */
  --pos-success-hover: #047857;
  --pos-success-light: #ecfdf5;    /* flash thêm món */
  --pos-success-border: #10b981;
  --pos-success-text: #065f46;

  --pos-warning: #ea580c;          /* cam - tạm tính, cảnh báo */
  --pos-warning-hover: #c2410c;
  --pos-warning-light: #fff7ed;
  --pos-warning-border: #fed7aa;
  --pos-warning-text: #7c2d12;

  --pos-danger: #dc2626;           /* đỏ - hủy, lỗi */
  --pos-danger-hover: #b91c1c;
  --pos-danger-light: #fef2f2;
  --pos-danger-border: #fecaca;

  --pos-neutral: #6b7280;          /* xám trung - secondary button */
  --pos-neutral-hover: #4b5563;

  /* ============== Surface colors ============== */
  --pos-bg: #f4f6fa;               /* nền chung */
  --pos-card: #ffffff;             /* card */
  --pos-border: #d8e0ea;           /* viền nhạt */
  --pos-border-strong: #cbd5e1;    /* viền đậm hơn cho input */

  /* ============== Text colors ============== */
  --pos-text: #102033;             /* text chính */
  --pos-text-muted: #64748b;       /* muted */
  --pos-text-light: #94a3b8;       /* placeholder */

  /* ============== Radius - bo góc đồng bộ ============== */
  --pos-radius-sm: 6px;            /* tag, badge */
  --pos-radius-md: 10px;           /* button, input */
  --pos-radius-lg: 14px;           /* card */
  --pos-radius-xl: 18px;           /* modal */

  /* ============== Shadow ============== */
  --pos-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04);
  --pos-shadow-md: 0 2px 8px rgba(15, 23, 42, 0.06);
  --pos-shadow-card: 0 4px 12px rgba(15, 23, 42, 0.06);
  --pos-shadow-modal: 0 14px 40px rgba(15, 23, 42, 0.18);

  /* ============== Spacing ============== */
  --pos-gap-xs: 4px;
  --pos-gap-sm: 6px;
  --pos-gap-md: 10px;
  --pos-gap-lg: 14px;

  /* ============== Transitions ============== */
  --pos-transition-fast: 0.12s ease-out;
  --pos-transition-base: 0.18s ease-out;
}

/* ========================================================================
   HIỆU ỨNG BẤM (tap/click) - áp dụng cho TẤT CẢ button trên 3 màn hình
   Dùng :active để cảm giác phản hồi khi bấm, scale(0.97) như mobile native
   ======================================================================== */

/* ========================================================================
   HIỆU ỨNG BẤM (tap/click) - áp dụng cho TẤT CẢ button trên 3 màn hình
   Dùng :active để cảm giác phản hồi khi bấm.
   
   MO_POS_42_PATCHED_v6 - v6.7.14: TỐI ƯU PERFORMANCE
   - CHỈ dùng `transform: scale()` cho :active (compositor-only, không repaint layout)
   - KHÔNG dùng filter/box-shadow trên hover general (gây lag khi rê chuột qua menu 200+ items)
   - Hover chỉ áp cho card click được CỤ THỂ (Tổng quan 3 ô) - không phải mọi button
   ======================================================================== */

button:not(:disabled):active,
.btn:not(:disabled):active,
.card[onclick]:active,
.tabs button:not(:disabled):active,
.tab:active,
.table-chip:active,
.menu-card:not(:disabled):not(.soldout):not(.inactive):active,
.fast-menu-card:not(:disabled):active,
.service-menu-card:not(:disabled):active,
.quick-chip:active,
.line-swap-btn:active,
.line-qty:not(:disabled):active,
.line-price:not(:disabled):active {
  transform: scale(0.97);
  transition: transform var(--pos-transition-fast);
}

/* v6.7.14: Hover CHỈ cho 3 ô Tổng quan hôm nay click được (BUG54),
   không áp lên mọi button vì menu có 200+ items, rê chuột qua = repaint tốn CPU */
@media (hover: hover) and (pointer: fine) {
  #todayBox .card[data-bug54-clickable="1"]:hover {
    background: var(--pos-primary-light);
    transition: background var(--pos-transition-base);
  }
}
