/* assets/css/won-wheel-colors.css */

/* --- Sections for Wheel Border/Background Color Pickers --- */
#appearance-panel .wheel-color-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px; /* Khoảng cách giữa các mục */
  padding-bottom: 10px;
  border-bottom: 1px solid #595757;
}

#appearance-panel .wheel-color-section:last-of-type {
    border-bottom: none; /* Bỏ border cho mục cuối cùng */
}

#appearance-panel .wheel-color-label {
  font-weight: normal;
  color: #333;
  flex-grow: 1;
  margin-right: 10px;
}

#appearance-panel .wheel-color-picker-trigger {
  width: 36px;
  height: 36px;
  cursor: pointer;
  border: 1px solid #ccc;
  padding: 2px;
  border-radius: 4px;
  background-color: #f0f0f0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  object-fit: contain;
  object-position: center center;
  display: block;
  box-sizing: border-box;
}

#appearance-panel .wheel-color-picker-trigger:hover {
  border-color: #999;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* --- Styling for the Color Palette specific to Wheel Border/Background --- */
/* Sử dụng class .simple-color-palette-wheel như trong JS */
.simple-color-palette-wheel {
  display: flex;
  flex-wrap: wrap; /* Cho phép các ô màu xuống dòng */
  gap: 6px; /* Khoảng cách giữa các ô màu */
  padding: 10px;
  background-color: #ffffff;
  border: 1px solid #cccccc;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Bóng đổ rõ hơn */
  position: absolute; /* JS sẽ đặt vị trí top/left */
  z-index: 1002;      /* Đảm bảo nó nổi lên trên các thành phần khác trong popup customize */
                      /* Nếu popup customize có z-index cao hơn, bạn cần tăng giá trị này */
  max-width: 260px;   /* Giới hạn chiều rộng tối đa của bảng màu */
  max-height: 180px;  /* Ví dụ: giới hạn chiều cao */
  overflow-y: auto;  /* Bật cuộn dọc nếu quá nhiều màu và chiều cao bị giới hạn */
  box-sizing: border-box;
}

/* Styling cho từng ô màu trong bảng màu */
.simple-color-palette-wheel .color-option {
  width: 28px;  /* Kích thước ô màu */
  height: 28px;
  border-radius: 4px; /* Bo góc nhẹ (hoặc 50% cho hình tròn) */
  border: 1px solid #e0e0e0; /* Viền nhẹ cho từng ô màu */
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05); /* Hiệu ứng viền trong nhẹ */
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  outline: none; /* Bỏ outline mặc định của button */
  padding: 0; /* Bỏ padding mặc định của button */
  font-size: 0; /* Ẩn text (nếu có) bên trong button */
  background-clip: padding-box; /* Giúp màu nền không tràn ra dưới viền */
}

.simple-color-palette-wheel .color-option:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.15), inset 0 0 0 1px rgba(0,0,0,0.05);
  border-color: #bdbdbd;
}

.simple-color-palette-wheel .color-option:focus-visible { /* Style khi focus bằng bàn phím */
  outline: 2px solid #007BFF;
  outline-offset: 1px;
  border-color: #007BFF;
}


/* --- Dark Mode Overrides --- */
body.theme-dark #appearance-panel .wheel-color-label {
  color: #e0e0e0; /* Chữ sáng hơn trên nền tối */
}

body.theme-dark #appearance-panel .wheel-color-section {
  border-bottom-color: #3a3a3a; /* Viền tối hơn */
}

body.theme-dark #appearance-panel .wheel-color-picker-trigger {
  background-color: #3a3a3a;
  border-color: #555555;
}

body.theme-dark .simple-color-palette-wheel {
  background-color: #2d2d2d; /* Nền tối cho bảng màu */
  border-color: #444444;
  color: #e0e0e0; /* Chữ (nếu có) trong bảng màu */
}

body.theme-dark .simple-color-palette-wheel .color-option {
  border-color: #555555; /* Viền ô màu trong dark mode */
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}

body.theme-dark .simple-color-palette-wheel .color-option:hover {
  border-color: #777777;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25), inset 0 0 0 1px rgba(255,255,255,0.1);
}

body.theme-dark .simple-color-palette-wheel .color-option:focus-visible {
  outline-color: #00aeff; /* Màu outline focus sáng hơn trong dark mode */
  border-color: #00aeff;
}
/* ==========================================
   >>> CSS CHO BẢNG MÀU LƯỚT MŨI TÊN <<<
   ========================================== */
.color-option {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.color-option:focus-visible {
    outline: none !important; /* Tắt cái viền xanh mặc định đi */
    z-index: 10; /* Nhô lên trên mấy thằng khác */
    transform: scale(1.3); /* Phóng to lên 30% cho lòi mắt ra */
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #007bff; /* Tạo 2 lớp viền: 1 trắng ở trong, 1 xanh ở ngoài cực xịn */
}
.color-palette, .simple-color-palette-wheel {
    /* ... các style khác ... */
    max-width: 260px; /* Hoặc một giá trị phù hợp */
    box-sizing: border-box;
}