/* Shared disclosure motion; native keyboard operation remains available. */

details > summary {
  list-style: none;
  position: relative;
  padding-right: 30px;
}

details > summary::-webkit-details-marker {
  display: none;
}

details > summary::marker {
  content: "";
}

details > summary::after {
  content: "";
  position: absolute;
  right: 5px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

details[open] > summary::after {
  transform: translateY(-25%) rotate(225deg);
}

details[open]:not(.motion-expanded) > summary::after {
  transform: translateY(-25%) rotate(225deg);
}

.reader-toc-mobile[open] summary {
  margin-bottom: 0;
}

.reader-toc-mobile > ol {
  padding-top: 10px;
}

.select-items {
  transform-origin: top;
  transition:
    opacity 0.3s ease,
    transform 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s;
}

.select-items.select-hide {
  visibility: hidden;
  transform: translateY(-8px) scaleY(0.96);
  transition:
    opacity 0.25s ease,
    transform 0.3s ease,
    visibility 0s 0.3s;
}

.custom-select-menu {
  transform-origin: top;
}

details.log-item > summary::after {
  content: "";
  font-family: inherit;
  right: 17px;
  transform: translateY(-70%) rotate(45deg);
}

details.log-item[open] > summary::after {
  transform: translateY(-25%) rotate(225deg);
}

details.log-item.motion-collapsing > summary::after {
  transform: translateY(-70%) rotate(45deg);
}

.custom-select-menu {
  transition:
    opacity 0.28s ease,
    visibility 0.28s,
    transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-backdrop:not(.hidden) .modal {
  animation: softPanelIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes softPanelIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 700px) {
  .article-list-open .sidebar {
    animation: softPanelIn 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
}

details.motion-collapsing > summary::after {
  transform: translateY(-70%) rotate(45deg);
}

.article-metadata[open] > summary {
  margin-bottom: 0;
}

.article-metadata > .meta-fields {
  padding-top: 16px;
}

.select-selected::after,
.custom-select-button::after {
  content: "" !important;
  font-family: inherit !important;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-70%) rotate(45deg) !important;
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.select-selected.select-arrow-active::after,
.custom-select.open .custom-select-button::after {
  transform: translateY(-25%) rotate(225deg) !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
