/* Główne style kontenera */
.panel {
  width: 600px;
  border: 1px solid rgb(0, 128,0);
  border-radius: 10px;
  overflow: hidden;
  cursor: default;
  text-align: center;
  margin: 10px 0 10px 0;
}

/* Ukrycie checkboxa */
.panel-checkbox {
  display: none;
}

/* Styl nagłówka (guzika) */
.panel-header {
  display: flex;
  justify-content: center;
  padding: 12px;
  background-color: rgb(187, 255, 187);
  cursor: pointer;
  font-weight: bold;
  user-select: none;
}

/* Styl strzałki z animacją obrotu */
.arrow {
  transition: transform 0.3s ease;
}

/* Główny mechanizm animacji wysuwania */
.panel-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  transition-timing-function: linear;
  background-color: #EBFCE9;
}

/* Dodatkowy padding wewnątrz, aby uniknąć skakania animacji */
.panel-inner {
  padding: 12px;
}

/* Stan po kliknięciu (checkbox zaznaczony) */
.panel-checkbox:checked ~ .panel-content {
  max-height: 100%; /* Musi być większe niż faktyczna wysokość tekstu */
}

/* Obrót strzałki po kliknięciu */
.panel-checkbox:checked ~ .panel-header .arrow {
  transform: rotate(180deg);
}