/* Media Modal Styles */

.c-media-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.c-media-modal.is-open {
  display: flex;
}

.c-media-modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
  z-index: -1;
}

.c-media-modal__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90%;
  height: 90%;
  max-width: 1200px;
  max-height: 800px;
  z-index: 1;
}

.c-media-modal__fig {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  margin: 0;
  padding: 0;
}

.c-media-modal__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.c-media-modal__close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.c-media-modal__close::before {
  content: "✕";
  font-size: 28px;
  line-height: 1;
}

.c-media-modal__close:hover::before {
  opacity: 0.7;
}

.c-media-modal__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  padding: 0;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.c-media-modal__arrow:hover {
  background: rgba(255, 255, 255, 0.4);
}

.c-media-modal__arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.c-media-modal__arrow--prev {
  left: -70px;
}

.c-media-modal__arrow--prev::before {
  content: "‹";
  font-size: 40px;
  line-height: 1;
}

.c-media-modal__arrow--next {
  right: -70px;
}

.c-media-modal__arrow--next::before {
  content: "›";
  font-size: 40px;
  line-height: 1;
}

.c-media-modal__counter {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: #fff;
  font-family: "Inter", sans-serif, "Noto Sans JP", sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  white-space: nowrap;
  z-index: 2;
}

.is-media-clickable {
  cursor: pointer;
}

.is-media-clickable:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .c-media-modal__inner {
    width: 95%;
    height: 80%;
  }

  .c-media-modal__close {
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
  }

  .c-media-modal__close::before {
    font-size: 24px;
  }

  .c-media-modal__arrow {
    width: 40px;
    height: 40px;
  }

  .c-media-modal__arrow--prev {
    left: 5px;
  }

  .c-media-modal__arrow--next {
    right: 5px;
  }

  .c-media-modal__arrow::before {
    font-size: 32px;
  }

  .c-media-modal__counter {
    bottom: 5px;
    font-size: 12px;
  }
}
