/* ---------- Accordion ---------- */
.accordion {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 📝 ÄNDERUNG 1: Der Rahmen der geschlossenen Elemente nutzt jetzt die Zufallsfarbe */
.acc-item {
  border: 1px solid var(--theme-color) !important;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color .15s ease;
}

.acc-head {
  width: 100%;
  padding: 10px 22px;
  border: none;
  background: transparent;
  /* 📝 ÄNDERUNG 2: Textfarbe der geschlossenen Zeilen nutzt die Zufallsfarbe */
  color: var(--theme-color) !important;
  font: inherit;
  font-size: 15px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.acc-head:hover {
  background: var(--theme-color-hover) !important;
}

.acc-head:focus {
  outline: none;
  background: var(--theme-color-hover) !important;
}

.acc-head:focus-visible {
  outline: 2px solid var(--theme-color) !important;
  outline-offset: -2px;
}

/* 📝 ÄNDERUNG 3: Symbole der inaktiven Zeilen nutzen sauber die Zufallsfarbe */
.acc-head svg {
  width: 18px;
  height: 18px;
  color: inherit !important;
}

.acc-head svg path,
.acc-head svg circle,
.acc-head svg rect,
.acc-head svg line,
.acc-head svg polyline,
.acc-head svg polygon {
  fill: currentColor;
}

.acc-head svg[fill="none"] path,
.acc-head svg[fill="none"] circle,
.acc-head svg[fill="none"] rect,
.acc-head svg[fill="none"] line,
.acc-head svg[fill="none"] polyline,
.acc-head svg[fill="none"] polygon {
  fill: none;
  stroke: currentColor;
}

.acc-head .chev {
  margin-left: auto;
  transition: transform .2s ease;
}

/* ==========================================
   WICHTIG: STYLING FÜR GEÖFFNETE ACCORDIONS (wie "Colors" im Bild)
   ========================================== */

/* 📝 ÄNDERUNG 4: Wenn geöffnet, wird der Hintergrund farbig und die Schrift weiß */
.acc-item.open .acc-head {
  background: var(--theme-color) !important;
  color: #ffffff !important;
}

/* Erzwingt weißes Icon und weißen Pfeil, wenn das Element offen ist */
.acc-item.open .acc-head svg {
  color: #ffffff !important;
}

.acc-item.open .chev { 
  transform: rotate(180deg); 
}

/* Inhalt im aufgeklappten Zustand */
.acc-body {
  display: none;
  padding: 10px 22px 18px;
  margin-top: 2px;
  /* Trennlinie innen nutzt die hellere Zufallsfarbe */
  border-top: 1px solid var(--theme-color-hover);
}

.acc-item.open .acc-body { display: block; }

/* ---------- Toggle row ---------- */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0;
  font-size: 14px;
}

/* ---------- Color bar (clickable div) ---------- */
.color-bar {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #000000;
  cursor: pointer;
  position: relative;
  box-shadow: inset 0 0 0 3px #ffffff;
  transition: transform .1s ease, box-shadow .15s ease;
}

.color-bar:hover {
  box-shadow: inset 0 0 0 3px #ffffff, 0 0 0 2px var(--theme-color) !important;
}

.color-bar:active { transform: scale(0.995); }
