/* Static Gutenberg Icons cards; isolated from the ranked restaurant carousel. */
.acbnr-icons-carousel {
  --icons-gutter: max(24px, calc((100% - 1200px) / 2));
  box-sizing: border-box;
  /* Auto width includes Gutenberg’s negative full-width margins. */
  width: auto;
  max-width: none !important;
  padding-block: 0 40px;
  color: #000;
}
.acbnr-icons-carousel *,
.acbnr-icons-carousel *::before,
.acbnr-icons-carousel *::after {
  box-sizing: border-box;
}
.acbnr-icons-carousel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0;
  padding-inline: var(--icons-gutter);
  padding-bottom: 24px;
}
.acbnr-icons-carousel__header h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font:
    400 36px/1.35 "AC Nord Display",
    sans-serif;
  letter-spacing: normal;
}
.acbnr-icons-carousel__header h2 strong {
  font-weight: 700;
}
.acbnr-icons-carousel__header h2 img {
  display: block;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
}
.acbnr-icons-carousel__controls {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #ece8df;
  color: #681b1b;
}
.acbnr-icons-carousel__controls:not(:has(button:not([hidden]), a)) {
  display: none;
}
.acbnr-icons-carousel__controls:not(:has(button:not([hidden])))
  .acbnr-icons-carousel__divider {
  display: none;
}
.acbnr-icons-carousel__controls button {
  appearance: none;
  display: grid;
  place-items: center;
  padding: 0;
  margin: 0;
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.acbnr-icons-carousel__controls button[hidden] {
  display: none;
}
.acbnr-icons-carousel__controls button:disabled {
  opacity: 0.35;
  cursor: default;
}
.acbnr-icons-carousel__controls button img {
  display: block;
  width: 32px;
  height: 32px;
}
.acbnr-icons-carousel__controls [data-direction="-1"] img {
  transform: rotate(180deg);
}
.acbnr-icons-carousel__divider {
  width: 1px;
  height: 14px;
  margin-inline: 4px;
}
.acbnr-icons-carousel__controls a {
  padding: 4px 12px;
  font:
    700 16px/20px "AC Nord Text",
    sans-serif;
  color: inherit;
  text-decoration: none;
}
.acbnr-icons-carousel__track {
  display: flex;
  gap: 24px;
  width: 100%;
  margin: 0;
  /* Reserve room for the 12px hover lift and shadow without moving the resting row. */
  margin-top: -24px;
  padding: 0px var(--icons-gutter) 14px;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--icons-gutter);
  scrollbar-width: none;
}

.acbnr-icons-carousel__track::webkit--scrollbar {
  display: none;
}

.acbnr-icons-carousel .acbnr-icons-carousel__track {
  margin-block-start: 0;
}
/* Remove Gutenberg block spacing inside the component. */
.acbnr-icons-carousel .wp-block-group,
.acbnr-icons-carousel .wp-block-group__inner-container,
.acbnr-icons-carousel figure,
.acbnr-icons-carousel p {
  margin: 0;
}
.acbnr-icons-carousel .wp-block-group {
  max-width: none;
}
.acbnr-icons-carousel:not(.is-ready),
.acbnr-icons-carousel:not(.is-ready) > .wp-block-group__inner-container {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding-inline: var(--icons-gutter);
}
.acbnr-icons-card {
  --card-bg: #b8d9ec;
  flex: 0 0 360px;
  min-width: 0;
  padding: 0;
  background: #fefefe;
  box-shadow: 0 5px 10px rgb(0 0 0 / 15%);
  scroll-snap-align: start;
  font-family: "AC Nord Text", sans-serif;
}
.acbnr-icons-card--palette-2 {
  --card-bg: #ece8df;
}
.acbnr-icons-card--palette-3 {
  --card-bg: #681b1b;
}
.acbnr-icons-card--palette-4 {
  --card-bg: #ff0025;
}
.acbnr-icons-card--palette-5 {
  --card-bg: #9e6934;
}
.acbnr-icons-card--palette-6 {
  --card-bg: #b8d9ec;
}
.acbnr-icons-card__art {
  position: relative;
  background: var(--card-bg);
}
.acbnr-icons-card__photo {
  height: 274px;
  overflow: hidden;
  border-radius: 80px;
  background: linear-gradient(145deg, #d8d3cb, #8c9996 50%, #c1beb3);
}
.acbnr-icons-card__photo > .wp-block-group__inner-container,
.acbnr-icons-card__photo figure,
.acbnr-icons-card__photo img {
  display: block;
  width: 100%;
  height: 100%;
}
.acbnr-icons-card__photo img {
  object-fit: cover;
}
.acbnr-icons-card__photo p {
  padding: 24px;
  font-size: 14px;
}
.acbnr-icons-card__bio {
  padding: 28px 24px;
  background: #eae7df;
  color: #000;
  overflow-wrap: anywhere;
  font:
    400 16px/1.55 "AC Nord Text",
    sans-serif;
}
.acbnr-icons-carousel .acbnr-icons-card__bio-heading {
  margin: 0 0 16px;
  color: #000;
  font:
    700 12px/1.5 "AC Nord Text",
    sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.acbnr-icons-carousel .acbnr-icons-card__bio p {
  font: inherit;
  color: inherit;
}
.acbnr-icons-carousel.is-ready .acbnr-icons-card__art {
  aspect-ratio: 1;
  overflow: hidden;
}
.acbnr-icons-carousel.is-ready .acbnr-icons-card__photo {
  position: absolute;
  inset: 12% 23%;
  /* The legacy nested-Group rule sets width: 100%; let both insets size this crop. */
  width: auto;
  height: auto;
}
.acbnr-icons-carousel.is-ready .acbnr-icons-card__bio {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow-y: auto;
  padding-bottom: 64px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.3s ease-out,
    visibility 0.3s ease-out;
}
.acbnr-icons-carousel.is-ready .is-bio-open .acbnr-icons-card__bio {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.acbnr-icons-carousel .acbnr-icons-card__text {
  padding: 24px;
}
.acbnr-icons-card__name-row {
  display: contents;
}
.acbnr-icons-carousel .acbnr-icons-card__name {
  margin: 0 0 8px;
  color: #000;
  font:
    700 20px/28px "AC Nord Text",
    sans-serif;
  overflow-wrap: anywhere;
}
.acbnr-icons-carousel .acbnr-icons-card__details,
.acbnr-icons-card__details > .wp-block-group__inner-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 12px;
}
.acbnr-icons-carousel .acbnr-icons-card__details p {
  min-width: 0;
  color: #000;
  overflow-wrap: anywhere;
  font:
    400 12px/16px "AC Nord Text",
    sans-serif;
}
.acbnr-icons-card__location {
  text-align: right;
}
.acbnr-icons-carousel .acbnr-icons-card__toggle {
  appearance: none;
  position: absolute;
  z-index: 2;
  bottom: 8px;
  left: 24px;
  min-height: 44px;
  max-width: calc(100% - 48px);
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #681b1b;
  border-radius: 4px;
  background: #eae7df;
  color: #000;
  font:
    700 12px/1.4 "AC Nord Text",
    sans-serif;
  cursor: pointer;
}
/* Desktop keeps the supplied resting design; the button appears for keyboard users. */
@media (hover: hover) and (pointer: fine) {
  .acbnr-icons-card__toggle {
    opacity: 0;
  }
  .acbnr-icons-card__toggle:focus-visible {
    opacity: 1;
  }
}
.acbnr-icons-carousel :is(button, [tabindex]):focus-visible {
  outline: 3px solid #681b1b;
  outline-offset: 3px;
}
.acbnr-icons-carousel__controls button {
  width: 44px;
  height: 44px;
}
.acbnr-icons-carousel__controls button[aria-disabled="true"] {
  cursor: default;
}
@media (max-width: 1024px) {
  .acbnr-icons-carousel {
    --icons-gutter: 32px;
  }
  .acbnr-icons-carousel__header {
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 30px;
  }
  .acbnr-icons-carousel__header h2 {
    font-size: 24px;
    line-height: 32px;
  }
  .acbnr-icons-card {
    flex-basis: 320px;
  }
}
@media (max-width: 600px) {
  .acbnr-icons-carousel .acbnr-icons-card__name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
  }
  .acbnr-icons-carousel .acbnr-icons-card__name-row .acbnr-icons-card__name {
    min-width: 0;
    margin: 0;
  }
  .acbnr-icons-carousel .acbnr-icons-card__name-row .acbnr-icons-card__toggle {
    position: static;
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 50%;
    /* Align the circle to the text edge while retaining the 44px tap area. */
    margin-inline-end: 0;
    background: radial-gradient(circle, #eae7df 16px, transparent 16px)
      right center / 32px 32px no-repeat;
    opacity: 1;
  }
  .acbnr-icons-card__name-row .acbnr-icons-card__toggle-label {
    display: none;
  }
  .acbnr-icons-card__name-row .acbnr-icons-card__toggle::before {
    content: "";
    width: 16px;
    height: 16px;
    transform: translateX(6px);
    background: url("../img/top10/bio-arrow.svg") center / contain no-repeat;
  }
  .acbnr-icons-carousel {
    --icons-gutter: 16px;
  }
  .acbnr-icons-carousel__header {
    padding-bottom: 32px;
  }
  .acbnr-icons-card {
    flex-basis: min(320px, calc(100vw - 48px));
  }
}
@media (prefers-reduced-motion: reduce) {
  .acbnr-icons-carousel.is-ready .acbnr-icons-card__bio {
    transition: none;
  }
}
