/* rebouse-cleaning custom lightbox */

/* ===== Gallery mode (data-fancybox 単画像グループ向け) ===== */
.wonder-lightbox-body .gallery-swiper .gallery-slide {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  box-sizing: border-box;
}
.wonder-lightbox-body .gallery-swiper .gallery-img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 70vh;
  height: auto;
  object-fit: contain !important;
  background: #000;
  image-rendering: auto;
  margin: 0 auto;
}
@media screen and (max-width: 560px) {
  .wonder-lightbox-body .gallery-swiper .gallery-img {
    max-height: 55vh;
  }
}

/* 通常表示時: 1個目以降のペアは非表示 */
.wonder-result-main-element .wonder-img-block.extra-pair,
.col-el .wonder-img-block.extra-pair,
.wonder-img-block.extra-pair {
  display: none !important;
}

/* ペア切替Swiper (モーダル内外側) - 必須Swiperコアスタイル自前付与 */
.wonder-lightbox-body .pair-swiper {
  position: relative;
  width: 100%;
  overflow: hidden !important;
  padding-bottom: 28px; /* pagination分 */
  box-sizing: border-box;
}
.wonder-lightbox-body .pair-swiper > .swiper-wrapper {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  width: 100%;
  box-sizing: content-box;
  transition-property: transform;
}
.wonder-lightbox-body .pair-swiper > .swiper-wrapper > .swiper-slide {
  flex-shrink: 0 !important;
  width: 100% !important;
  max-width: 100%;
  height: auto;
  box-sizing: border-box;
  padding: 0 8px;
}
.wonder-lightbox-body .pair-swiper .pair-swiper-button-prev,
.wonder-lightbox-body .pair-swiper .pair-swiper-button-next {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.wonder-lightbox-body .pair-swiper .pair-swiper-button-prev {
  left: 4px;
}
.wonder-lightbox-body .pair-swiper .pair-swiper-button-next {
  right: 4px;
}
.wonder-lightbox-body .pair-swiper .pair-swiper-button-prev:hover,
.wonder-lightbox-body .pair-swiper .pair-swiper-button-next:hover {
  background: rgba(0, 0, 0, 0.85);
}
/* 矢印を自前でCSS描画 (Swiper標準iconフォント不使用) */
.wonder-lightbox-body .pair-swiper .pair-swiper-button-prev::after,
.wonder-lightbox-body .pair-swiper .pair-swiper-button-next::after {
  content: '' !important;
  display: block;
  width: 14px;
  height: 14px;
  border-top: 3px solid #fff;
  border-right: 3px solid #fff;
  font-family: inherit !important;
  font-size: 0 !important;
}
.wonder-lightbox-body .pair-swiper .pair-swiper-button-prev::after {
  transform: rotate(-135deg);
  margin-left: 6px;
}
.wonder-lightbox-body .pair-swiper .pair-swiper-button-next::after {
  transform: rotate(45deg);
  margin-right: 6px;
}
.wonder-lightbox-body .pair-swiper .swiper-button-disabled {
  opacity: 0.4;
  pointer-events: none;
}
.wonder-lightbox-body .pair-swiper .pair-swiper-pagination {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  text-align: center;
}
.wonder-lightbox-body .pair-swiper .pair-swiper-pagination .swiper-pagination-bullet {
  background: #666;
  opacity: 0.6;
  margin: 0 4px;
}
.wonder-lightbox-body .pair-swiper .pair-swiper-pagination .swiper-pagination-bullet-active {
  background: #f67009;
  opacity: 1;
}
/* モーダル内のペアは全て表示 */
.wonder-lightbox-body .wonder-img-block,
.wonder-lightbox-body .wonder-img-block.extra-pair {
  display: flex !important;
}

.wonder-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  box-sizing: border-box;
  pointer-events: none;
}
.wonder-lightbox-overlay.is-open {
  display: flex;
  pointer-events: auto;
}
.wonder-lightbox-inner {
  position: relative;
  width: 100%;
  max-width: 1200px;
  max-height: 90vh;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.wonder-lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wonder-lightbox-close:hover {
  background: rgba(0, 0, 0, 0.85);
}
.wonder-lightbox-body {
  padding: 16px;
  max-height: 90vh;
  overflow: auto;
}
.wonder-lightbox-body .wonder-img-block {
  display: flex;
  gap: 12px;
  width: 100%;
}
.wonder-lightbox-body .wonder-img-left,
.wonder-lightbox-body .wonder-img-right {
  flex: 1;
  min-width: 0;
  position: relative;
}
.wonder-lightbox-body div.sub-style-status.wonder-img-index,
.wonder-lightbox-body div.sub-style-status.wonder-img-index-right {
  display: block !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: auto !important;
  bottom: auto !important;
  width: 50% !important;
  max-width: none !important;
  padding: 10px 12px !important;
  text-align: center !important;
  z-index: 10 !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}
.wonder-lightbox-body div.sub-style-status.wonder-img-index > div,
.wonder-lightbox-body div.sub-style-status.wonder-img-index-right > div {
  width: 100% !important;
}
/* Beforeラベル: インラインstyle未指定時のフォールバック（濃グレー） */
.wonder-lightbox-body .wonder-img-index:not([style*="background"]) {
  background-color: #3f3f3f;
}
.wonder-lightbox-body .wonder-result-triangle {
  display: block;
}
.wonder-lightbox-body .wonder-result-img-wrapper {
  position: relative;
}
.wonder-lightbox-body .wonder-img-scroll-container {
  width: 100%;
}
.wonder-lightbox-body .swiper-wrapper-img img,
.wonder-lightbox-body .wonder-img-scroll-container img {
  width: 100%;
  height: 55vh;
  max-height: 55vh;
  object-fit: cover !important;
  background: #000;
  display: block;
}
/* 内側(画像枠内)Swiperの左右ボタン・paginationは不要 → 非表示 */
.wonder-lightbox-body .swiper-button-prev-img,
.wonder-lightbox-body .swiper-button-next-img,
.wonder-lightbox-body .swiper-pagination-img {
  display: none !important;
}
.wonder-lightbox-body .swiper-button-prev,
.wonder-lightbox-body .swiper-button-next {
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  --swiper-navigation-size: 22px;
}
.wonder-lightbox-body .swiper-button-prev:hover,
.wonder-lightbox-body .swiper-button-next:hover {
  background: rgba(0, 0, 0, 0.8);
}
.wonder-lightbox-body .swiper-pagination-bullet {
  background: #fff;
  opacity: 0.6;
}
.wonder-lightbox-body .swiper-pagination-bullet-active {
  opacity: 1;
}
@media screen and (max-width: 560px) {
  .wonder-lightbox-overlay {
    padding: 8px 4px;
  }
  .wonder-lightbox-inner {
    max-height: 95vh;
    border-radius: 4px;
  }
  .wonder-lightbox-close {
    top: 4px;
    right: 4px;
    width: 32px;
    height: 32px;
    font-size: 20px;
  }
  .wonder-lightbox-body {
    padding: 4px;
  }
  /* SP: Before/After 縦積み */
  .wonder-lightbox-body .wonder-img-block {
    flex-direction: column !important;
    gap: 6px;
  }
  .wonder-lightbox-body .wonder-img-left,
  .wonder-lightbox-body .wonder-img-right {
    width: 100%;
  }
  /* 縦並び時の三角矢印は邪魔 → 非表示 */
  .wonder-lightbox-body .wonder-result-triangle {
    display: none !important;
  }
  /* 画像サイズSP調整 */
  .wonder-lightbox-body .swiper-wrapper-img img,
  .wonder-lightbox-body .wonder-img-scroll-container img {
    height: 38vh;
    max-height: 38vh;
  }
  /* ラベル SP: 文字&padding縮小、幅は画像の45% */
  .wonder-lightbox-body div.sub-style-status.wonder-img-index,
  .wonder-lightbox-body div.sub-style-status.wonder-img-index-right {
    width: 45% !important;
    padding: 6px 8px !important;
  }
  .wonder-lightbox-body div.sub-style-status.wonder-img-index span,
  .wonder-lightbox-body div.sub-style-status.wonder-img-index-right span {
    font-size: 13px !important;
  }
  /* ペア切替ボタンSP */
  .wonder-lightbox-body .pair-swiper .pair-swiper-button-prev,
  .wonder-lightbox-body .pair-swiper .pair-swiper-button-next {
    width: 38px;
    height: 38px;
  }
  .wonder-lightbox-body .pair-swiper .pair-swiper-button-prev::after,
  .wonder-lightbox-body .pair-swiper .pair-swiper-button-next::after {
    width: 10px;
    height: 10px;
    border-top-width: 2px;
    border-right-width: 2px;
  }
  /* pagination bullet SP */
  .wonder-lightbox-body .pair-swiper .pair-swiper-pagination .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    margin: 0 3px;
  }
}

/* ===== モーダル内タイトル帯 (card-el title) - 元カードと同等の外観に固定 ===== */
/* 元カードのタイトル帯背景 (#F67309) と整合。インラインstyleのオレンジを上書き */
.wonder-lightbox-body .wonder-result-main-title-wrapper {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px;
  padding: 10px 20px !important;
  min-height: 0 !important;
  max-height: none;
  height: auto !important;
  width: 100%;
  box-sizing: border-box;
  margin: 0 !important;
  position: relative;
  overflow: hidden;
  background-color: #F67309 !important;
}
/* アイコン枠: 元カード仕様 (85x85 白背景 + 水色枠) に揃える。画像は50x50固定で中央配置 */
.wonder-lightbox-body .wonder-result-main-title-wrapper .wonder-title-icon {
  flex: 0 0 auto !important;
  width: 85px !important;
  height: 85px !important;
  max-width: 85px !important;
  max-height: 85px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50% !important;
  background: #fff !important;
  border: 5px solid #F67309 !important;
  overflow: visible !important;
  position: relative !important;
  display: block !important;
}
.wonder-lightbox-body .wonder-result-main-title-wrapper .wonder-title-icon img {
  width: 50px !important;
  height: 50px !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: 20% !important;
  margin: 0 auto !important;
  display: block;
}
.wonder-lightbox-body .wonder-result-main-title-wrapper .wonder-title-text-wrapper {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: auto !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  text-align: center;
}
.wonder-lightbox-body .wonder-result-main-title-wrapper .wonder-title-text-wrapper > div {
  width: 100%;
}
.wonder-lightbox-body .wonder-result-main-title-wrapper .wonder-title-text-wrapper span,
.wonder-lightbox-body .wonder-result-main-title-wrapper .wonder-title-text-wrapper span span {
  font-size: 24px !important;
  line-height: 1.3 !important;
}
/* タイトル帯でアイコン分オフセットを打ち消し中央寄せ風に (アイコン幅85px + gap12px) */
.wonder-lightbox-body .wonder-result-main-title-wrapper .wonder-title-text-wrapper {
  margin-right: 97px !important;
}
@media screen and (max-width: 560px) {
  .wonder-lightbox-body .wonder-result-main-title-wrapper {
    padding: 6px 10px !important;
    gap: 8px;
  }
  .wonder-lightbox-body .wonder-result-main-title-wrapper .wonder-title-icon {
    width: 55px !important;
    height: 55px !important;
    max-width: 55px !important;
    max-height: 55px !important;
    border-width: 3px !important;
  }
  .wonder-lightbox-body .wonder-result-main-title-wrapper .wonder-title-icon img {
    width: 32px !important;
    height: 32px !important;
  }
  .wonder-lightbox-body .wonder-result-main-title-wrapper .wonder-title-text-wrapper {
    margin-right: 63px !important;
  }
  .wonder-lightbox-body .wonder-result-main-title-wrapper .wonder-title-text-wrapper span,
  .wonder-lightbox-body .wonder-result-main-title-wrapper .wonder-title-text-wrapper span span {
    font-size: 16px !important;
  }
}
