/* メインラッパー */
.ac-wrapper {
  display: flex;
  gap: 30px;
  margin: 20px 0;
  flex-wrap: wrap;
}

/* リストコンテナ */
.ac-list-container {
  flex: 1;
  min-width: 280px;
  background: #f8f9fa;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.ac-list-container h3 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 18px;
  font-weight: 600;
}

.ac-list-content {
  max-height: 500px;
  overflow-y: auto;
}

/* リストアイテム */
#ac-date-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#ac-date-list li {
  background: white;
  margin-bottom: 12px;
  padding: 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.2s ease;
}

#ac-date-list li:hover {
  transform: translateX(5px);
}

#ac-date-list li.type-休診 {
  border-left: 4px solid #e74c3c;
}

#ac-date-list li.type-不在 {
  border-left: 4px solid #3498db;
}

/* 日付表示 */
.ac-date {
  font-weight: 600;
  color: #2c3e50;
  min-width: 120px;
}

.ac-type {
  background: #ecf0f1;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

.type-休診 .ac-type {
  background: #ffe5e5;
  color: #c0392b;
}

.type-不在 .ac-type {
  background: #e3f2fd;
  color: #2980b9;
}

.ac-reason {
  color: #7f8c8d;
  font-size: 14px;
  flex: 1;
}

/* カレンダーコンテナ */
.ac-calendar-container {
  flex: 2;
  min-width: 400px;
}

/* FullCalendarカスタマイズ */
#ac-calendar .fc-event {
  border: none;
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 13px;
  cursor: pointer;
}

#ac-calendar .fc-event.type-休診 {
  /* background-color: #e74c3c; */
}

#ac-calendar .fc-event.type-不在 {
  /* background-color: #3498db; */
}

#ac-calendar .fc-today {
  background-color: #fff9e6 !important;
  overflow: hidden;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .ac-wrapper {
    flex-direction: column;
  }

  .ac-list-container,
  .ac-calendar-container {
    min-width: 100%;
  }
}

/* 既存のスケジュールセクションに合わせたスタイル */
.schedule__container .ac-calendar-container {
  width: 100%;
  height: 100%;
}

#ac-calendar {
  background: #fff;
  border-radius: 20px;
  padding: 2rem 1.5rem;
}

/* FullCalendarのカスタマイズ（既存デザインに合わせる） */
#ac-calendar .fc-header-toolbar {
  margin-bottom: 20px;
}

#ac-calendar .fc-toolbar h2 {
  font-size: 24px;
  font-weight: 600;
  color: #333;
}

#ac-calendar .fc-button {
  background: #f0f0f0;
  border: none;
  color: #333;
  padding: 8px 15px;
  border-radius: 5px;
  font-size: 14px;
  transition: all 0.3s ease;
}

#ac-calendar .fc-button:hover {
  background: #e0e0e0;
}

#ac-calendar .fc-button-primary:not(:disabled):active,
#ac-calendar .fc-button-primary:not(:disabled).fc-button-active {
  background: #2c3e50;
  color: #fff;
}

/* カレンダーグリッド */
#ac-calendar .fc-day-grid-container {
  overflow: hidden;
}

#ac-calendar .fc-day {
  background: #fafafa;
}

#ac-calendar .fc-day-header {
  padding: 0.6875rem 0;
  font-weight: 600;
  color: #666;
}



#ac-calendar .fc-sun .fc-day-header {
  color: #e74c3c;
}

#ac-calendar .fc-sat .fc-day-header {
  color: #3498db;
}

/* イベントスタイル */
#ac-calendar .fc-event {
  border: none;
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 12px;
  margin: 2px;
}

#ac-calendar .fc-event.type-休診 {
  /* background-color: #ff6b6b; */
  color: white;
}

#ac-calendar .fc-event.type-不在 {
  /* background-color: #4ecdc4; */
  color: white;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .schedule__container {
    flex-direction: column;
  }

  .schedule__image {
    margin-top: 30px;
    width: 100%;
  }

  #ac-calendar {
    padding: 1rem;
  }
  #ac-calendar .fc-day-number {
    margin: 0;
  }
}

/* フォントの定義 */
@font-face {
  font-family: "NanumMyeongjo";
  src: url("../../themes/Plume Clinic/assets/font/NanumMyeongjo-Regular.ttf")
    format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "ZenKakuGothicNew";
  src: url("../../themes/Plume Clinic/assets/font/ZenKakuGothicNew-Light.ttf")
    format("truetype");
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: "NunitoSans";
  src: url("../../themes/Plume Clinic/assets/font/NunitoSans-VariableFont_YTLC,opsz,wdth,wght.ttf")
    format("truetype");
  font-weight: 200;
  font-style: normal;
}

/* カスタムヘッダー */
.custom-calendar-header {
  text-align: center;
  font-family: "NanumMyeongjo", serif;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.custom-calendar-header .month-number {
  font-size: 3rem;
  line-height: 1;
  font-weight: normal;
}

@media (max-width: 768px) {
  .custom-calendar-header .month-number {
    font-size: 3rem;
    line-height: 1;
    font-weight: normal;
  }
}

.custom-calendar-header .year-month-text {
  font-size: 1rem;
  color: #272727;
  letter-spacing: 0.05em;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.custom-calendar-header .year {
  display: block;
}

.custom-calendar-header .month {
  display: block;
  text-transform: uppercase;
}

/* FullCalendarの既存ヘッダーを非表示 */
#ac-calendar .fc-header-toolbar {
  display: none;
}

/* カレンダーグリッドのスタイル */
#ac-calendar {
  font-family: "NanumMyeongjo", serif;
}

#ac-calendar .fc-view-container {
  border: none;
}

#ac-calendar table {
  width: 100%;
  border-collapse: collapse;
}

#ac-calendar .fc-day-header {
  padding: 11px 0;
  text-align: center;
  font-size: 0.875rem;
  font-weight: normal;
  color: #666;
  border-bottom: 1px solid #e0e0e0;
}

#ac-calendar .fc-day-grid .fc-day {
  border: 1px solid #e0e0e0;
  background: transparent;
}

#ac-calendar .fc-day-number {
  text-align: center;
  /* padding: 10px; */
  font-size: 1rem;
  color: #666;
  margin: 4px 22px 6px;
}

@media (max-width: 768px) {
  #ac-calendar .fc-day-number {
    margin: 0 11px;
  }
  .fc-basic-view .fc-body .fc-row {
    height: 2.8rem!important;
    min-height: auto;
  }
}

#ac-calendar .fc-day-grid .fc-day.fc-sun .fc-day-number {
  color: #e74c3c;
}

#ac-calendar .fc-day-grid .fc-day.fc-sat .fc-day-number {
  color: #3498db;
}

/* イベント（休診日）のスタイル */
#ac-calendar .fc-event {
  background: transparent;
  border: none;
  color: #666;
  font-size: 0.75rem;
  text-align: center;
  padding: 2px;
}

@media (max-width: 768px) {
  #ac-calendar .fc-event {
    padding: 0px 2p;
  }
}

#ac-calendar .fc-event.type-休診 {
  color: #666;
}

#ac-calendar .fc-event.type-不在 {
  color: #e74c3c;
}

/* ナビゲーション矢印 */
.calendar-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1.5rem;
  color: #999;
  transition: color 0.3s ease;
}

.calendar-nav:hover {
  color: #333;
}

.calendar-nav.prev {
  left: 20px;
}

.calendar-nav.prev::before,
.calendar-nav.next::before {
  display: block;
  width: 0.875rem;
  height: 1.5rem;
  position: absolute;
  content: "";
  background-repeat: no-repeat;
  background-size: contain;
}

.calendar-nav.prev::before {
  background-image: url(../../img/arrow-right.png);
  left: 0;
}

.calendar-nav.next::before {
  background-image: url(../../img/arrow-left.png);
  right: 0;
}

.calendar-nav.next {
  right: 20px;
}

/* カレンダー下部の情報 */
.calendar-info {
  display: flex;
  justify-content: center;
  gap: 2.8125rem;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  color: #666;
}

.calendar-info-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.calendar-info-text {
  font-family: "ZenKakuGothicNew", sans-serif;
  font-weight: 300;
}

.fc-day-header span{
  font-family: "ZenKakuGothicNew", sans-serif;
  font-weight: 300;
  font-size: 0.8745rem;
}

@media (max-width: 768px) {
  
  .fc-day-header span{
    font-family: "ZenKakuGothicNew", sans-serif;
    font-weight: 300;
    font-size: 0.75rem;
  }
}

.calendar-info-time {
  font-family: "NunitoSans", sans-serif;
  font-weight: 200;
}

@media (max-width: 768px) {
  .calendar-info {
    padding: 0 1rem;
    justify-content: space-between;
    gap: 0;
  }
  .calendar-info-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
  }
}

/* .fc-basic-view .fc-day {
  height: 2.5rem !important;
} */

/* カレンダーラッパー */
.custom-calendar-wrapper {
  position: relative;
  background: #fff;
  padding: 2rem;
}
@media (max-width: 768px) {
  .custom-calendar-wrapper {
    position: relative;
    background: #fff;
    padding: 2rem 1.5rem;
  }
}

.fc-title {
  font-family: "ZenKakuGothicNew", sans-serif;
  white-space: wrap;
}

@media (max-width: 768px) {
  .fc-title {
    font-size: 0.625rem;
  }
}

/* 必須フィールドのマーク */
.required {
  color: #d63638;
  font-weight: bold;
}

/* 繰り返しオプション */
.repeat-options {
  background: #f0f0f1;
  transition: all 0.3s ease;
}

.repeat-options td,
.repeat-options th {
  padding: 15px 10px !important;
}

/* メタボックスのテーブル */
#ac_absence_details .form-table th {
  width: 150px;
}

/* 投稿一覧の改善 */
.column-absence_date {
  width: 150px;
}

.column-absence_type {
  width: 80px;
}

.column-absence_repeat {
  width: 120px;
}

/* 繰り返し投稿の行を視覚的に区別 */
.post-type-absence_days
  tr.status-publish:has(
    td.column-absence_repeat span:contains("繰り返し生成")
  ) {
  background-color: #f6f7f7;
}

/* フィルターセレクトボックス */
.tablenav .actions select {
  margin-right: 6px;
}

/* 既存のCSSに追加する部分のみ抜粋 */

/* リストアイテムの新しいタイプ */
#ac-date-list li.type-午前休診 {
  border-left: 4px solid #ff9800;
}

#ac-date-list li.type-午後休診 {
  border-left: 4px solid #9c27b0;
}

/* タイプ表示の新しいスタイル */
.type-午前休診 .ac-type {
  background: #fff3e0;
  color: #e65100;
}

.type-午後休診 .ac-type {
  background: #f3e5f5;
  color: #6a1b9a;
}

/* カレンダーイベントの新しいスタイル */
#ac-calendar .fc-event.type-午前休診 {
  color: #ff6f00;
}

#ac-calendar .fc-event.type-午後休診 {
  color: #7b1fa2;
}

/* リストアイテムの追加クラス */
.absence-type-morning {
  border-left-color: #ff9800 !important;
}

.absence-type-afternoon {
  border-left-color: #9c27b0 !important;
}

.absence-type-morning .absence-type {
  background: #fff3e0;
  color: #e65100;
}

.absence-type-afternoon .absence-type {
  background: #f3e5f5;
  color: #6a1b9a;
}