@charset "UTF-8";

/* 練習施設カレンダー(practicerangeページ専用) */

/* --- カレンダーへの導線ボタン(6ボタンの下段) --- */
.practiceRangeCalendar__link {
  margin-top: 14px;
}

/* 全幅で下段に置く。矢印の配置は上の6ボタン(.practiceRangeList-item > a)に合わせる */
.practiceRangeCalendar__btn {
  align-items: center;
  background-color: #fff;
  border: 1px solid #050505;
  box-sizing: border-box;
  color: #050505;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  padding: 1em;
  text-align: center;
  width: 100%;
}

.practiceRangeCalendar__btn::after {
  aspect-ratio: 2/1;
  background-image: url("../images/practicerange/ico_arrow_bottom.svg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100%;
  content: "";
  display: inline-block;
  /* SVGは stroke="white" のため、白地のこのボタンでは反転して黒にする */
  filter: invert(1);
  max-width: 10px;
  width: 100%;
}

.practiceRangeCalendar__btn:focus-visible {
  outline: 2px solid #050505;
  outline-offset: 3px;
}

@media screen and (min-width: 768px) {
  .practiceRangeCalendar__link {
    margin-top: 22px;
  }
}

/* --- SCHEDULEセクション --- */
/* クリック時のオフセットはcommon.jsのスムーススクロールが担当。
   これはURL直叩き・JS無効時に固定ヘッダーへ潜り込ませないための保険 */
#schedule {
  scroll-margin-top: calc(8vw + 40px);
}

@media screen and (min-width: 768px) {
  #schedule {
    scroll-margin-top: 105px;
  }
}

/* --- カレンダー本体 --- */
/* 読み上げ用のpcal__liveをこの中に収めるため */
.pcal {
  position: relative;
}

.pcal__stage {
  min-height: 160px;
  position: relative;
  text-align: center;
}

.pcal__canvas {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  display: block;
  margin: 0 auto;
  max-width: 100%;
}

.pcal__stage:focus-visible {
  outline: 2px solid #bd8a00;
  outline-offset: 4px;
}

.pcal__message {
  margin: 0 auto;
  max-width: 34em;
  padding: 2em 0;
}

.pcal[data-state="loading"] .pcal__message,
.pcal[data-state="ready"] .pcal__message {
  display: none;
}

/* --- ページ送り --- */
.pcal__nav {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 0 0 14px;
}

.pcal__nav--bottom {
  margin: 14px 0 0;
}

/* 作者スタイルのdisplayはUAスタイルのhiddenより強いので明示的に打ち消す */
.pcal__nav[hidden] {
  display: none;
}

.pcal__counter {
  font-size: 14px;
  min-width: 4.5em;
  text-align: center;
}

.pcal__btn {
  align-items: center;
  background-color: #050505;
  border: 0;
  border-radius: 0;
  box-sizing: border-box;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 14px;
  gap: 8px;
  justify-content: center;
  line-height: 1.2;
  min-height: 44px;
  padding: 10px 14px;
  transition: opacity 0.3s linear;
  -webkit-transition: opacity 0.3s linear;
}

/* 矢印は6ボタンと同じSVGを回転して流用する(黒地なので反転は不要) */
.pcal__btn--prev::before,
.pcal__btn--next::after {
  aspect-ratio: 2/1;
  background-image: url("../images/practicerange/ico_arrow_bottom.svg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100%;
  content: "";
  flex: none;
  width: 10px;
}

.pcal__btn--prev::before {
  transform: rotate(90deg);
}

.pcal__btn--next::after {
  transform: rotate(-90deg);
}

.pcal__btn:hover {
  opacity: 0.5;
}

.pcal__btn:focus-visible {
  outline: 2px solid #bd8a00;
  outline-offset: 2px;
}

.pcal__btn:disabled {
  cursor: default;
  opacity: 0.3;
}

@media screen and (min-width: 768px) {
  .pcal__nav {
    gap: 16px;
  }

  .pcal__counter,
  .pcal__btn {
    font-size: 16px;
  }

  .pcal__btn {
    padding: 10px 24px;
  }
}

/* --- 読み込み中 --- */
.pcal__spinner {
  border: 3px solid #ddd;
  border-radius: 50%;
  border-top-color: #bd8a00;
  display: none;
  height: 32px;
  left: 50%;
  margin: -16px 0 0 -16px;
  position: absolute;
  top: 50%;
  width: 32px;
}

.pcal[data-state="loading"] .pcal__spinner {
  animation: pcal-spin 0.8s linear infinite;
  display: block;
}

@keyframes pcal-spin {
  to {
    transform: rotate(360deg);
  }
}

/* --- PDFへのリンク(常設) --- */
.pcal__fallback {
  margin-top: 1.2em;
  text-align: center;
}

.pcal__fallback a {
  text-decoration: underline;
}

.pcal__fallback a:focus-visible {
  outline: 2px solid #bd8a00;
  outline-offset: 2px;
}

/* --- スクリーンリーダー用 --- */
.pcal__live {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@media (prefers-reduced-motion: reduce) {
  .pcal[data-state="loading"] .pcal__spinner {
    animation-duration: 3s;
  }

  .pcal__btn,
  .practiceRangeCalendar__btn {
    transition: none;
    -webkit-transition: none;
  }
}
