/* -------------------------------------
   Basiselementen (body, etc.)
------------------------------------- */
body.bg-gray-100 {
  background-color: #f3f4f6; /* Tailwind bg-gray-100 */
  color: #1f2937; /* Tailwind text-gray-800 */
  font-family: "Funnel Sans", serif;
  font-optical-sizing: auto;
  font-style: normal;
  margin: 0;
  padding: 0;
}

/* -------------------------------------
   Layout- en Grid-classes
------------------------------------- */
.container {
  /* Imitatie van Tailwind .container (max-width) */
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* sm: prefix in Tailwind = vanaf 640px */
@media (min-width: 640px) {
  .sm\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}


/* lg: prefix in Tailwind = vanaf 1024px */
@media (min-width: 1024px) {
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .lg\:col-span-2 {
    grid-column: span 2 / span 2;
  }
}

/* Afstanden tussen grid-items */
.gap-6 {
  gap: 1.5rem; /* 1.5rem = 24px */
}

/* -------------------------------------
   Afstandsklassen (margin/padding)
------------------------------------- */
.p-4 {
  padding: 1rem;
}
.p-6 {
  padding: 1.5rem;
}
.p-8 {
  padding-left: 1.5rem;
  padding-top: 1.5rem;
}
.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}
.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.mb-4 {
  margin-bottom: 1rem;
  margin-top:-10px;

}
.mb-2 {
  margin-bottom: 1rem;
  margin-top: 1rem;
}
.mt-6 {
  margin-top: 1.5rem;
}
.mt-8 {
  margin-top: 2rem;
}
.mt-1 {
  margin-top: 0.25rem;
}

/* -------------------------------------
   Display & Flex
------------------------------------- */
.flex {
  display: flex;
}
.items-center {
  align-items: center;
}
.justify-between {
  justify-content: space-between;
}

/* -------------------------------------
   Typografie
------------------------------------- */
.text-center {
  text-align: center;
}
.text-left {
  text-align: left;
}
.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}
.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}
.text-xs {
  font-size: 0.75rem;
}
.font-bold {
  font-weight: 700;
}
.font-semibold {
  font-weight: 600;
}
.font-medium {
  font-weight: 500;
}

/* Kleuren voor tekst */
.text-white {
  color: #fff;
}
.text-blue-600 {
  color: #2563eb;
}
.text-gray-500 {
  color: #6b7280;
}
.text-gray-600 {
  color: #4b5563;
}
.text-gray-700 {
  color: #374151;
}
.text-gray-800 {
  color: #1f2937;
}

/* -------------------------------------
   Achtergrondkleuren
------------------------------------- */
.bg-white {
  background-color: #fff;
}
.bg-blue-600 {
  background-color: #2563eb;
}
.bg-gray-800 {
  background-color: #1f2937;
}

/* Hover-kleur (alleen waar gebruikt) */
.hover\:bg-blue-100:hover {
  background-color: #dbeafe;
}
.hover\:bg-blue-700:hover {
  background-color: #1d4ed8;
}

/* -------------------------------------
   Randen & afronding
------------------------------------- */
.border {
  border: 1px solid #d1d5db;
}
.border-gray-300 {
  border-color: #d1d5db;
}
.rounded {
  border-radius: 0.25rem;
}
.rounded-md {
  border-radius: 0.375rem;
}
.rounded-lg {
  border-radius: 0.5rem;
}

/* -------------------------------------
   Schaduw
------------------------------------- */
.shadow-md {
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
}
.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

/* -------------------------------------
   Overige utilities
------------------------------------- */
.block {
  display: block;
}
.inline-block {
  display: inline-block;
}
.hidden {
  display: none;
}
.absolute {
  position: absolute;
}
.relative {
  position: relative;
}
.z-10 {
  z-index: 10;
}
.overflow-y-auto {
  overflow-y: auto;
}
.max-h-64 {
  max-height: 16rem; /* 16 x 16px = 256px */
}
.w-full {
  width: 100%;
}

/* Focus states (basic imitatie) */
.focus\:outline-none:focus {
  outline: none;
}
.focus\:ring-2:focus {
  box-shadow: 0 0 0 2px rgba(59,130,246,0.5);
}

/* -------------------------------------
   Specifieke elementen (nav, buttons)
------------------------------------- */
nav.bg-blue-600 {
  background-color: #2563eb;
  color: #fff;
  padding: 1rem; /* p-4 */
  display: flex; 
  height: 40px;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 
              0 2px 4px -1px rgba(0,0,0,0.06); /* shadow-md */
}

/* -------------------------------------
   DMC-picker eigen styling
------------------------------------- */
#dmcPickerOptions div.option {
  padding: 0.5rem; /* ~0.5rem = 8px */
  cursor: pointer;
  display: flex;
  align-items: center;
}
#dmcPickerOptions div.option:hover {
  background-color: #f3f4f6; /* Tailwind's gray-100 */
}

/* Als je de button-styles voor DMC-picker iets netter wilt,
   kun je nog extra selectors toevoegen: */
#dmcPickerButton {
  cursor: pointer;
  /* Hier kun je evt. extra hover-states of focus-states toevoegen */
}
#dmcPickerOptions div.option .color-swatch {
  display: inline-block;
  width: 1rem;      /* ~ 16px */
  height: 1rem;     /* ~ 16px */
  margin-right: 0.5rem;
  border: 1px solid #ccc; 
  box-sizing: border-box;
}
.w-4 {
  width: 1rem; /* ~16px */
}
.h-4 {
  height: 1rem; /* ~16px */
}
.mr-2 {
  margin-right: 0.5rem;
}
/* Groene achtergrond (bg-green-600) */
.bg-green-600 {
  background-color: #16a34a; /* Tailwind v3 green-600 */
  color: #fff; /* om zeker te zijn dat de tekst wit blijft */
}

/* Hover darker green (hover:bg-green-700) */
.hover\:bg-green-700:hover {
  background-color: #15803d; /* Tailwind v3 green-700 */
}

/* Focus states: outline-none, ring-2, ring-green-500, ring-offset-2 */
.focus\:outline-none:focus {
  outline: none;
}
.focus\:ring-2:focus {
  /* Dit is een simpele benadering, je kunt het verfijnen naar wens */
  box-shadow: 0 0 0 2px rgba(22,163,74,0.5);
}
.focus\:ring-green-500:focus {
  /* Optioneel kun je hier een andere kleur of intensiteit instellen */
  box-shadow: 0 0 0 2px rgba(34,197,94,0.5);
}
.focus\:ring-offset-2:focus {
  /* Tailwind voegt normaal een offset toe om een 'tweede' rand te simuleren.
     Simpelste manier is een outline-offset, als je die wilt: */
  outline-offset: 2px;
}

/* Py- en px-klassen, afgeronde hoeken en tekstkleur heb je misschien al, maar voor de zekerheid: */
.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.py-4 {
  padding-top: 1.0rem;
  padding-bottom: 1.0rem;
}
.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}
.rounded {
  border-radius: 0.25rem;
}
.text-white {
  color: #ffffff;
}
.text-black {
  color: #000000;
}
.bg-white {
  background-color: #fff;
}

.text-blue-600 {
  color: #2563eb;
}

.font-semibold {
  font-weight: 600;
}

.px-4 {
  padding-left: 1rem;  /* 16px */
  padding-right: 1rem;
}

.py-2 {
  padding-top: 0.5rem; /* 8px */
  padding-bottom: 0.5rem;
}

.rounded {
  border-radius: 0.25rem;
}

.hover\:bg-blue-100:hover {
  background-color: #dbeafe; /* lichte blauwe hoverkleur */
}
#dmcPickerOptions div.option {
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;  
}
#dmcPickerOptions div.option:hover {
  background-color: #f3f4f6; /* Tailwind's gray-100 */
}

/* Verwijder de dubbele definities en voeg deze geoptimaliseerde versies toe */

/* -------------------------------------
   Responsieve verbeteringen
------------------------------------- */
@media (max-width: 640px) {
  .container {
    padding: 0.5rem;
    margin: 0.5rem;
  }
  
  nav.bg-blue-600 {
    padding: 0.5rem;
    height: auto;
    flex-wrap: wrap;
  }
  
  nav h1 {
    font-size: 1.25rem;
  }
}

/* -------------------------------------
   Toegankelijkheidsverbeteringen
------------------------------------- */
/* Verbeterde focus states voor alle interactieve elementen */
button,
input,
select,
a {
  transition: all 0.2s ease;
}

button:focus,
input:focus,
select:focus,
a:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* Verbeterd contrast voor tekst */
.text-gray-500 {
  color: #64748b;
}

/* Verbeterde hover states */
.hover\:brightness-90:hover {
  filter: brightness(0.9);
}

/* -------------------------------------
   Canvas en Legend verbeteringen
------------------------------------- */
canvas {
  image-rendering: pixelated; /* Scherper beeld voor pixelart */
  max-width: 100%;
  height: auto;
}

#legend {
  display: grid;
  gap: 0.5rem;
  padding: 1rem;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Verbeterde DMC picker styling */
#dmcPickerOptions {
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #2563eb #f3f4f6;
}

#dmcPickerOptions::-webkit-scrollbar {
  width: 8px;
}

#dmcPickerOptions::-webkit-scrollbar-track {
  background: #f3f4f6;
}

#dmcPickerOptions::-webkit-scrollbar-thumb {
  background-color: #2563eb;
  border-radius: 4px;
}

/* Verbeterde loading state */
.loading {
  position: relative;
  opacity: 0.7;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px;
  border: 2px solid #2563eb;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
