/* =============================================
  common.css
  動画モーダル＋受講完了管理
  ============================================= */

/* --- サムネイルクリッカブルエリア --- */
.video-thumb-wrap {
  display: inline-block;
  position: relative;
  cursor: pointer;
  width: 550px;
  max-width: 100%;
  line-height: 0;
}

.video-thumb-wrap img {
  display: block;
  width: 100%;
  height: auto;
}


/* --- 受講完了オーバーレイ --- */
.video-thumb-wrap .watched-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.video-thumb-wrap.is-watched .watched-overlay {
  display: flex;
}

/* 受講完了状態ではサムネイルをクリック不可に */
.video-thumb-wrap.is-watched {
  /* cursor: pointer; */
  /* pointer-events: none; */
}

.watched-overlay .watched-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  font-size: 2rem;
  font-weight: bold;
  letter-spacing: 0.06em;
}

/* チェックボックス枠（CSS描画） */
.watched-label .check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 0.125rem solid #fff;
  border-radius: 0.2rem;
  flex-shrink: 0;
}

/* レ点 */
.watched-label .check-icon::after {
  content: '';
  display: block;
  width: 0.4rem;
  height: 0.85rem;
  border-right: 0.2rem solid #fff;
  border-bottom: 0.2rem solid #fff;
  transform: rotate(45deg) translate(-0.05rem, -0.1rem);
}

.btn-reset-watch-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
}

/* --- 再生時間 --- */
.btn-reset-watch-wrap p {
  align-self: center;
  display: flex;
}
.theme-icon-time {
  background-image: url(/assets/event-corp/icons/icon_time.svg);
  display: inline-block;
  width: 17px;
  height: 21px;
  margin-right: 5px;
}

/* --- 未視聴に戻すボタン --- */
.btn-reset-watch {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: bold;
  border: none;
  cursor: default;
  pointer-events: none;
  background: #EFEFEF;
  color: #A5A5A5;
  border: 1px solid #CCC;
  transition: background 0.2s ease;
  width: 134px;
  height: 35px;
}

.btn-reset-watch.is-active {
  background: #009682;
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 2px 0px rgba(0, 0, 0, 0.2);
}

.btn-reset-watch.is-active:hover {
  /* background: #155bb5; */
  opacity: .5;
}

/* --- モーダル背景 --- */
.video-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.video-modal-backdrop.is-open {
  display: flex;
}

/* --- iframeラッパー（16:9） --- */
.video-modal-body {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-modal-body iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}


/* ============================================
  campaign-slide
============================================ */
.info-panels .box:has(.campaign-slide) .container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.info-panels .box:has(.campaign-slide) .campaign-slide {
  margin-top: auto;
  margin-bottom: auto;
}

.campaign-slide {
  overflow: hidden;
}

.campaign-slide .js-swiper {
  overflow: visible;
  transition: opacity 0.2s;
}

.campaign-slide .swiper-wrapper {
  align-items: center;
}

.campaign-slide .swiper-slide {
  opacity: 0.5;
  /* transform: scale(0.9); */
  /* transition: opacity 0.3s, transform 0.3s, width 0s; */
  display: flex;
  justify-content: center;
  max-width: 420px;
  width: 100%;
}

.campaign-slide .swiper-slide img {
  width: 100%;
  height: auto;
  display: block;
}

.campaign-slide .swiper-slide-active {
  opacity: 1;
  transform: scale(1);
}

.campaign-slide .campaign-slide-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.campaign-slide .swiper-button-prev,
.campaign-slide .swiper-button-next {
  position: static;
  top: auto;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background-color: #2e9b5e;
  background-image: none;
  margin: 0;
  transform: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.campaign-slide .swiper-button-prev::after,
.campaign-slide .swiper-button-next::after {
  display: block !important;
  font-size: 40px;
  font-weight: lighter;
  color: #fff;
  position: relative;
  top: -4px;
}

.campaign-slide .swiper-button-prev::after {
  content: '‹';
}

.campaign-slide .swiper-button-next::after {
  content: '›';
}

.campaign-slide .swiper-pagination {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
}

.campaign-slide .swiper-pagination-bullet {
  background: #ccc;
  opacity: 1;
  margin: 0;
  cursor: pointer;
  user-select: none;
}

.campaign-slide .swiper-pagination-bullet-active {
  background: #009682;
}

.info-panels .grid {
  border-radius: 10px;
  padding: 40px 30px;
}
.info-panels .box {
  box-shadow: 0 2px 2px 0px rgba(0, 0, 0, 0.2);
}


/* ============================================
  progress-ring
============================================ */
.progress-ring {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}

.progress-ring-container {
  position: relative;
}

.progress-ring-svg {
  transform: rotate(-90deg);
}

.progress-ring-track {
  fill: none;
  stroke: #C1C1C1;
  stroke-width: 26;
}
.progress-ring-fill-white {
  fill: none;
  stroke: #fff;
  stroke-width: 26;
  stroke-linecap: butt;
  transition: stroke-dasharray 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  stroke-dasharray: 0 var(--ring-circumference);
}
.progress-ring-fill {
  fill: none;
  stroke: #009682;
  stroke-width: 26;
  stroke-linecap: butt;
  transition: stroke-dasharray 1.2s cubic-bezier(0.4, 0, 0.2, 1),
              stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  stroke-dasharray: 0 var(--ring-circumference);
  stroke-dashoffset: calc(var(--ring-gap) * -1);
}

.progress-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  cursor: default;
}

/* サークル内：三要素を重ねるための基準ブロック */
.progress-ring-fraction {
  position: relative;
  width: 100px;
  height: 100px;
}

/* サークル内：分子（大きい数字）のフォント設定 */
.progress-ring-fraction .progress-ring-watched {
  position: absolute;
  top: -25px;
  left: -20px;
  font-size: 5.3125rem;
  font-weight: bold;
  color: #009682;
  line-height: 1;
  text-align: center;
  width: 85px;
}

/* サークル内：スラッシュのフォント設定（rotateで角度を明示指定） */
.progress-ring-fraction .progress-ring-slash {
  position: absolute;
  bottom: -12px;
  right: 40px;
  width: 4px;
  height: 95px;
  transform: rotate(45deg);
  transform-origin: center;
}

/* サークル内：スラッシュをCSSで描画（疑似要素） */
.progress-ring-fraction .progress-ring-slash::before {
  content: '';
  display: block;
  width: 4px;
  height: 95px;
  background-color: #727171;
}

/* サークル内：分母（全体数）のフォント設定 */
.progress-ring-fraction .progress-ring-denom {
  position: absolute;
  bottom: -12px;
  right: -12px;
  font-size: 3rem;
  font-weight: bold;
  color: #727171;
  line-height: 1;
  text-align: center;
  width: 50px;
}