.ggg-slider {
  position: relative;
  margin-bottom: var(--wp--preset--spacing--30);
}

.ggg-slider__track {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  aspect-ratio: 16 / 9;
  border-radius: 0 10px 0 10px;
  background: var(--wp--preset--color--contrast);
}

.ggg-slider__track::-webkit-scrollbar {
  display: none;
}

.ggg-slider__track:focus-visible {
  outline: 2px solid var(--wp--preset--color--primary-dark);
  outline-offset: 2px;
}

.ggg-slider__slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
}

.ggg-slider__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ggg-slider__arrow {
  position: absolute;
  top: calc(50% - 18px);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.5s ease, background-color 0.15s ease;
}

.ggg-slider:hover .ggg-slider__arrow,
.ggg-slider:has(.ggg-slider__arrow:focus-visible) .ggg-slider__arrow {
  opacity: 1;
}

@media (hover: none) {
  .ggg-slider__arrow {
    display: none;
  }
}

.ggg-slider__arrow:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

.ggg-slider__arrow:focus-visible {
  outline: 2px solid var(--wp--preset--color--primary-dark);
  outline-offset: 2px;
}

.ggg-slider__arrow--prev {
  left: 12px;
}

.ggg-slider__arrow--next {
  right: 12px;
}

.ggg-slider__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  margin-bottom: 2px;
}

.ggg-slider__dot {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--wp--preset--color--primary);
  border-radius: 50%;
  background-color: transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.ggg-slider__dot::before {
  content: "";
  width: 10px;
  height: 12px;
  background-color: var(--wp--preset--color--primary);
  -webkit-mask-image: url("../images/ginko.svg");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-image: url("../images/ginko.svg");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.ggg-slider__dot:hover {
  border-color: var(--wp--preset--color--primary-dark);
  transform: scale(1.15);
}

.ggg-slider__dot:hover::before {
  background-color: var(--wp--preset--color--primary-dark);
}

.ggg-slider__dot:active {
  transform: scale(0.9);
}

.ggg-slider__dot[aria-current="true"] {
  border-color: var(--wp--preset--color--primary-dark);
  transform: scale(1.25);
}

.ggg-slider__dot[aria-current="true"]::before {
  background-color: var(--wp--preset--color--primary-dark);
}

.ggg-slider__dot:focus-visible {
  outline: 2px solid var(--wp--preset--color--primary-dark);
  outline-offset: 3px;
}
