/*
 CSS for the main interaction
*/
.accordion > input[type="checkbox"] {
  position: absolute;
  left: -100vw;
}

.accordion .collapse-content {
  overflow-y: hidden;
  height: 0;
  transition: height 0.3s ease;
}

.accordion > input[type="checkbox"]:checked ~ .collapse-content {
  height: auto;
  overflow: visible;
}

.accordion label {
  display: block;
}

/*
 Styling
*/
.accordion {
  margin-bottom: 1em;
}

.accordion > input[type="checkbox"]:checked ~ .collapse-content {
  padding: 15px;
  border: 1px solid var(--color-background-secondary);
  border-top: 0;
}

.accordion .collapse-handle {
  position: relative;
  margin: 0;
  padding: 0;
  font-size: 1.125em;
  line-height: 1.2em;
}

.accordion label {
  color: #333;
  cursor: pointer;
  font-weight: normal;
  padding: 15px;
  background: var(--color-background-secondary);
}

.accordion label:hover,
.accordion label:focus {
  background: var(--color-sidebar-item-background--hover);
}

.accordion .collapse-handle label:before {
  content: "›";
  display: inline-block;
  margin-right: 10px;
  font-size: 2em;
  vertical-align: middle;
}

.accordion .collapse-summary {
  font-size: 0.8em;
  color: #666;
  padding-left: 2em;
}

.accordion > input[type="checkbox"]:checked ~ .collapse-handle label:before {
  content: "›";
  rotate: 90deg;
}

/* Badge container */
.accordion .badge {
  position: absolute;
  top: 50%;
  right: 10%;
  transform: translate(0%, -50%);
}

.badge {
  font-size: 0.7em;
  font-weight: bold;
  color: white;
  border-radius: 5px; /* Rounded corners */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); /* Subtle shadow */
  min-width: 3em;
  min-height: 2em;
  padding-left: 1em !important;
  padding-right: 1em !important;
  display: flex;
  justify-content: center;
  align-items: center;
}


.badge.bad {
  background-color: var(--color-admonition-title--error); /* Orange */
}

.badge.warning {
  background-color: var(--color-admonition-title--caution); /* Orange */
}

.badge.good {
  background-color: var(--color-admonition-title--hint);
}

.boss-mandatory {
  background-color: var(--color-admonition-title-background--caution);
}
.boss-optional {
  background-color: var(--color-admonition-title-background--hint);
}


.driverbox {
  position: relative;
  font-size: 1.125em;
  line-height: 1.2em;
  margin-bottom: 1em;
  color: #333;
  cursor: pointer;
  font-weight: normal;
  padding: 15px !important;
  background: var(--color-background-secondary);
}

.driverbox .summary {
  font-size: 0.8em;
  color: #666;
  padding-left: 2em;
}

.driverbox:hover,
.driverbox:focus {
  background: var(--color-sidebar-item-background--hover);
}

.no-decoration {
  text-decoration: none;
}
