/* =======================================================================
   WP COLORING V2 - MAIN STYLES
   Base styles and CSS reset
   ======================================================================= */

/* CSS Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

button {
  margin: 0 !important;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

/* Base Styles */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Focus Styles */
:focus-visible {
  outline: 3px solid rgba(255, 149, 0, 0.5);
  outline-offset: 2px;
}

/* Utility Classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Error Messages */
.wp-coloring-error {
  color: #dc2626;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  font-weight: 500;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print Styles */
@media print {
  .wp-coloring-toolbar,
  .wp-coloring-sidebar-v2,
  .wp-coloring-bottom-toolbar,
  .wp-coloring-mobile-sidebar {
    display: none !important;
  }

  .wp-coloring-shell-v2 {
    background: #fff;
    padding: 0;
  }

  .wp-coloring-main-v2 {
    box-shadow: none;
    border: none;
  }
}


.wp-coloring-picker {
  margin-bottom: 16px;
  /* Thêm khoảng cách với phần tô màu bên dưới */
}

.wp-coloring-picker .thumb-grid {
  display: flex;
  /* SỬA: Chuyển sang flexbox để cuộn ổn định */
  overflow-x: auto;
  /* Đảm bảo cuộn ngang hoạt động */
  gap: 12px;
  /* Tăng khoảng cách cho thoáng */
  padding-bottom: 12px;
  width: 100%;
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 #e2e8f0;
}

.wp-coloring-picker .thumb-grid::-webkit-scrollbar {
  height: 8px;
  /* Độ dày của thanh cuộn ngang */
  background-color: transparent;
  /* Nền trong suốt */
}

.wp-coloring-picker .thumb {
  width: var(--thumb-size, 40px); /* User requested 40px */
  height: var(--thumb-size, 40px); /* User requested 40px */
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 2px solid transparent;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wp-coloring-picker .thumb:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.wp-coloring-picker .thumb.is-active {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.wp-coloring-picker .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

button {
  margin-right: 0px !important;
  padding: 0px !important;
}