/* ===========================
   IKB — EXPAND / COLLAPSE ALL
   =========================== */

.ikb-expand-all {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 16px;
}

/* When rendered inside the Table of Contents box, sit below the TOC list
   as a full-width button separated by a divider. */
.ikb-expand-all--in-toc {
  justify-content: stretch;
  margin: 16px 0 0;
  padding-top: 16px;
  border-top: 1px solid #e0e0e0;
}

.ikb-expand-all--in-toc .ikb-expand-all__btn {
  width: 100%;
  justify-content: center;
}

.ikb-expand-all__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #fff0b3;
  color: #333333;
  border: 1px solid #e5c85a;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.ikb-expand-all__btn:hover {
  background: #ffe680;
  border-color: #d9b83f;
}

.ikb-expand-all__btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 220, 82, 0.6);
}

/* Chevron icon that flips when everything is expanded. */
.ikb-expand-all__icon {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  transition: transform 0.25s ease;
}

.ikb-expand-all__btn.is-expanded .ikb-expand-all__icon {
  transform: rotate(180deg);
}

@media (max-width: 640px) {
  .ikb-expand-all {
    justify-content: stretch;
  }

  .ikb-expand-all__btn {
    width: 100%;
    justify-content: center;
  }
}
