@charset "UTF-8";

.calendar-container table {
  border: 1px solid #c6c6c6;
}

.calendar-container th {
  font-size: 14px;
  font-weight: normal;
  text-align: center !important;
  width: calc(100% / 8);
}

.calendar-container th:first-child {
  border-left: none;
}

.calendar-container .tc_date {
  padding: 5px 0;
  font-size: 12px;
  text-align: center;
}

.calendar-container .tc_date:first-child {
  border-left: none;
}

.calendar-container .tc_sche {
  vertical-align: top;
  border-left: solid 1px #c6c6c6;
  border-bottom: solid 1px #c6c6c6;
  padding: 2px;
  height: 150px;
}

.calendar-container .tc_sche:first-child {
  border-left: none;
}

.calendar-container tr:last-child .tc_sche {
  border-bottom: none;
}

.calendar-container td.saturday,
.calendar-container th.saturday {
  color: #0059b3;
  background-color: #e6f2ff;
}

.calendar-container td.sunday,
.calendar-container th.sunday,
.calendar-container td.holiday {
  color: #cc0000;
  background-color: #ffebeb;
}

.calendar-container td span {
  color: #fff;
  display: block;
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 11px;
  text-align: left;
  margin-bottom: 2px;
}

.loading {
  position: relative;
  height: 150px;
}

.loading:before {
  content: "読み込み中";
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, 40px);
}

.loading:after {
  content: "";
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(0deg);
  width: 50px;
  height: 50px;
  border: 5px solid #000;
  border-right: 5px solid transparent;
  border-radius: 50%;
  animation: loading 2s linear infinite;
}

@keyframes loading {
  0% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.9;
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
    opacity: 0.3;
  }
}

/* スマホ対応 */
@media screen and (max-width: 768px) {
  .calendar-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .calendar-container table {
    min-width: 750px;
    white-space: nowrap;
    border-collapse: collapse;
  }

  .calendar-container th {
    font-size: 12px;
    padding: 6px 3px;
    line-height: 1.2;
  }

  .calendar-container .tc_date {
    font-size: 10px;
    padding: 5px 3px;
  }

  .calendar-container .tc_sche {
    padding: 3px;
    height: 80px;
  }

  .calendar-container td span {
    font-size: 9px;
    padding: 2px 4px;
    margin: 0 1px 1px 0;
    white-space: nowrap;
    display: block;
    line-height: 1.2;
    border-radius: 3px;
  }

  /* 横スクロールのヒント表示 */
  .calendar-container::before {
    content: "← 左右にスワイプできます →";
    display: block;
    text-align: center;
    font-size: 12px;
    color: #999;
    font-style: italic;
  }
}
