@charset "UTF-8";

:root {
  /* カラーパレット */
  --color-primary: #74a92d;
  --color-primary-light: rgba(116, 169, 45, 0.05);
  --color-primary-shadow: #c9dbd3;
  --color-white: #fff;
  --color-light-gray: #ececec;
  --color-black: #000;
  --color-gray: #999;
  --color-border: #ccc;
  --color-border-light: #e5e7eb;
  --color-saturday: #e2ecfc;
  --color-sunday: #ffebeb;
}

.c-calendar .desc {
  margin-bottom: 16px;
  font-size: 14px;
  padding: 20px;
  background: var(--color-primary-light);
  border-radius: 8px;
}

.calendar-month-title {
  text-align: center;
  margin-bottom: 15px;
  font-size: 20px;
  font-weight: bold;
}

.c-calendar .calendar-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-border);
}

/* 横スクロールカレンダー用のテーブルスタイル */
.worktable {
  border-collapse: collapse;
  width: 100%;
  min-width: 100%;
  background: var(--color-white);
}

.worktable th,
.worktable td {
  border: 1px solid var(--color-border);
  padding: 8px 4px;
  text-align: center;
  font-size: 13px;
  min-width: 50px;
  white-space: nowrap;
}

.worktable thead th {
  background: var(--color-white);
  font-weight: bold;
}

.worktable thead th.week_sat {
  background-color: var(--color-saturday);
}

.worktable thead th.week_sun,
.worktable thead th.holiday {
  background-color: var(--color-sunday);
}

.worktable tbody td.name {
  position: sticky;
  left: 0;
  background: var(--color-white);
  font-weight: bold;
  text-align: left;
  padding-left: 8px;
  z-index: 5;
  min-width: 100px;
  white-space: nowrap;
}

.worktable-label-month {
  position: sticky;
  left: 0;
  background: var(--color-white);
  z-index: 15;
  min-width: 100px;
  font-size: 18px;
}

.worktable-label-month span {
  font-size: 24px;
  font-weight: bold;
}

/* ステータス表示 */
.worktable span.status-s13 {
  color: #f74231;
  font-weight: bold;
}

/* 区切り文字のスタイル */
.worktable .separator {
  color: var(--color-gray);
  font-weight: normal;
  margin: 0 2px;
}

/* 小さいテキスト（医師名の補足情報など） */
.small_size {
  font-size: 10px;
  color: var(--color-gray);
  font-weight: normal;
}

/* 偶数行の背景色（見やすさ向上） */
.worktable tbody tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.02);
}

.is-loading {
  position: relative;
  min-height: 200px;
}

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

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

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

.is-loading .desc,
.is-loading .calendar-wrapper {
  display: none;
}

/* スマホ対応のスタイル */
@media (max-width: 767px) {
  .calendar-month-title {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .c-calendar .desc {
    padding: 15px;
    font-size: 12px;
  }

  .worktable th,
  .worktable td {
    font-size: 11px;
    padding: 6px 2px;
  }

  .worktable tbody td.name {
    min-width: 80px;
    font-size: 12px;
    padding-left: 6px;
  }

  .worktable-label-month {
    min-width: 80px;
    font-size: 16px;
  }

  .worktable-label-month span {
    font-size: 20px;
  }

  .worktable .status {
    font-size: 12px;
  }

  .small_size {
    font-size: 9px;
  }
}

@media (min-width: 768px) {
  .c-calendar .calendar-table-wrap {
    max-width: 1200px;
    margin: 0 auto;
  }
}
