[data-comic-profile-panels] {
  --profile-panel-border: #650f47;
  min-width: 15.5rem;
}

.comic-profile-panel {
  border: 5px solid var(--profile-panel-border);
  border-radius: 10px;
  color: #ffecc7;
  margin: 8px 0;
  text-align: center;
}

[data-comic-profile-panels]:has(.comic-profile-panel[open]) > .comic-profile-action:not([open]) {
  display: none;
}

.comic-profile-panel summary {
  cursor: pointer;
  font-weight: bold;
  list-style: none;
  padding: 5px 10px;
}

.comic-profile-panel summary::-webkit-details-marker {
  display: none;
}

.comic-profile-carousel {
  align-items: center;
  display: flex;
  justify-content: center;
  padding: 0 2px 4px;
}

.comic-profile-carousel button {
  background: transparent;
  border: 0;
  color: var(--profile-panel-border);
  cursor: pointer;
  min-height: 2.5rem;
  min-width: 1.25rem;
  padding: 0;
}

.comic-profile-carousel button::before {
  background: currentColor;
  clip-path: polygon(0 22%, 22% 22%, 22% 0, 100% 50%, 22% 100%, 22% 78%, 0 78%);
  content: "";
  display: block;
  height: 1.75rem;
  margin: auto;
  width: 0.85rem;
}

.comic-profile-carousel button[data-profile-step="-1"]::before {
  transform: scaleX(-1);
}

.comic-profile-carousel button:hover,
.comic-profile-carousel button:focus-visible {
  color: #b74166;
}

.comic-profile-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.comic-profile-list li {
  width: 3.75rem;
}

.comic-profile-list a {
  color: inherit;
  display: block;
  position: relative;
}

.comic-profile-list li:first-child:not(:only-child) {
  --profile-hover-shift: 3px;
}

.comic-profile-list li:is(:last-child, :has(+ li[hidden])):not(:first-child) {
  --profile-hover-shift: -3px;
}

@media (prefers-reduced-motion: no-preference) {
  .comic-profile-list a {
    transition: transform 150ms ease;
  }
}

@media (hover: hover) {
  .comic-profile-list a:hover {
    transform: translateX(var(--profile-hover-shift, 0px)) scale(1.1);
    z-index: 1;
  }
}

.comic-profile-list a:focus-visible {
  transform: translateX(var(--profile-hover-shift, 0px)) scale(1.1);
  z-index: 1;
}

.comic-profile-list img,
.comic-profile-initial {
  aspect-ratio: 1;
  border: 2px solid var(--profile-panel-border);
  border-radius: 4px;
  box-sizing: border-box;
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.comic-profile-initial {
  align-content: center;
}

@media (max-width: 540px) {
  .node.type--comic.view-mode--preview .information:has([data-comic-profile-panels]) {
    flex-direction: column;
  }

  .node.type--comic.view-mode--preview .information .buttons:has([data-comic-profile-panels]) {
    margin: 0 8px;
  }
}
