/**
 * ACF Calendar Field CSS - 日本の祝日対応
 * ファイル名: calendar-field.css
 * テーマのCSSフォルダに配置してください
 */

/* カレンダーヘッダー（曜日表示） */




.calendar-container {
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    overflow: hidden;
}

.calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.calendar-nav {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 3px;
    color: #495057;
}



.calendar-title {
    font-weight: bold;
    font-size: 16px;
    color: #495057;
}

.calendar-header {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.calendar-weekday {
    flex: 1;
    padding: 8px 4px;
    text-align: center;
    font-weight: bold;
    font-size: 12px;
    color: #495057;
}

.calendar-days {
    display: flex;
    flex-direction: column;
}

.calendar-week {
    display: flex;
}

.calendar-day {
    flex: 1;
    min-height: 60px;
    border: 1px solid #e9ecef;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 4px 2px;
    transition: all 0.2s;
    position: relative;
}

.calendar-day:hover {
    background: #f8f9fa;
}

.calendar-day.selected {
    background: #007bff;
    color: white;
}

.calendar-day.today {
    background: #fff3cd;
    border-color: #ffeaa7;
}

.calendar-day.holiday {
    background: #ffe6e6;
    border-color: #ff9999;
}

.calendar-day.holiday .day-number {
    color: #dc3545;
}



.day-number {
    font-size: 14px;
}

.holiday-name {
    font-size: 9px;
    color: #dc3545;
    text-align: center;
    line-height: 1.1;
    margin-top: 2px;
    word-break: break-all;
    max-width: 100%;
}

.selected-dates {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.selected-date {
    display: inline-block;
    background: #1DB7DA;
    color: white;
    padding: 4px 8px;
    margin: 2px;
    border-radius: 12px;
    font-size: 12px;
}
.calendar-day.selected:before {
    position: absolute;
    content: "深谷日赤";
    left: 50%;
    transform: translateX(-50%);
    bottom: 16px;
    font-weight: bold;
    font-family: "Noto Sans JP", sans-serif;
}
.calendar-day.closed-day::before{
    position: absolute;
    content: "休診日";
    left: 50%;
    transform: translateX(-50%);
    bottom: 16px;
    font-weight: bold;
    font-family: "Noto Sans JP", sans-serif;
}
.calendar-day.weekend.closed-day::before{
    position: absolute;
    content: "休診日";
    left: 50%;
    transform: translateX(-50%);
    bottom: 16px;
    font-weight: bold;
    font-family: "Noto Sans JP", sans-serif;
}
.calendar-day.weekend.closed-day span.day-number{
    color: #fff!important;
}
.remove-date {
    background: none;
    border: none;
    color: white;
    margin-left: 5px;
    cursor: pointer;
}

.no-dates {
    color: #6c757d;
    font-style: italic;
    margin: 0;
}
          
.calendar-header {
    display: flex;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.calendar-weekday {
    flex: 1;
    padding: 8px 4px;
    text-align: center;
    font-weight: bold;
    font-size: 12px;
    color: #495057;
}

.calendar-weekday.saturday, .calendar-weekday.thursday {
    color: #0577BE;
}

.calendar-weekday.sunday {
    color: #dc3545;
}

/* カレンダー日付 */
.calendar-day {
    position: relative;
    min-height: 60px;
    border: 1px solid #e9ecef;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 4px 2px;
}

.calendar-day:hover {
    background-color: #f8f9fa;
}

.calendar-day.selected, .calendar-day.selected.weekend {
    background-color: #1DB7DA;
    color: white;
}
.calendar-day.closed-day, .calendar-day.weekend.closed-day:not(.top_calendar .calendar-day.closed-day){
    background-color: #dc3545;
    color: #fff!important;

}
.calendar-day.today {
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.calendar-day.today.selected {
    background-color: #0056b3;
}

.calendar-day.other-month {
    opacity: .5;
}

/* 週末のスタイル */
.calendar-day.weekend {
    background-color: #f8f9fa;
}

.calendar-day.weekend .day-number {
    color: #6c757d;
}

/* 日曜日始まりの場合の色設定 */
/* 日曜日（週の1番目の要素） */
.calendar-week .calendar-day:nth-child(1) .day-number {
    color: #dc3545; /* 赤 */
}

/* 土曜日（週の7番目の要素） */
.calendar-week .calendar-day:nth-child(7) .day-number {
    color: #007bff; /* 青 */
}

/* 祝日のスタイル */
.calendar-day.holiday {
    background-color: #ffe6e6;
    border-color: #ff9999;
}

.calendar-day.holiday .day-number {
    color: #dc3545;
}

.calendar-day.holiday.selected {
    background-color: #dc3545;
    color: white;
}

/* 祝日名の表示 */
.holiday-name {
    font-size: 13px;
    color: #dc3545;
    text-align: center;
    line-height: 1.1;
    margin-top: 2px;
    display: block;
    word-break: break-all;
    max-width: 100%;
}

.calendar-day.selected .holiday-name {
    color: white;
}

/* 日付番号 */
.day-number {
    font-weight: normal;
    font-size: 14px;
}

.calendar-day.today .day-number {
    font-weight: bold;
}

/* 選択済み日付リスト */
.selected-date.holiday {
    background-color: #ffe6e6;
    border-color: #ff9999;
}

.selected-date.holiday .remove-date {
    color: #dc3545;
}

/* カレンダーコンテナの基本スタイル */
.calendar-container {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background-color: white;
   font-family: "Oswald", "Noto Sans JP", sans-serif;
}

.calendar-title {
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-bottom: 1px solid #dee2e6;
    text-align: center;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-nav {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 3px;
}

.calendar-nav:hover {
   opacity: .8;
}

.calendar-days {
    display: flex;
    flex-direction: column;
}

.calendar-week {
    display: flex;
}

.calendar-week .calendar-day {
    flex: 1;
}

/* 選択済み日付表示エリア */
.selected-dates {
    margin-top: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.selected-dates-list h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #495057;
}

.selected-date {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 4px 8px;
    margin: 2px;
    border-radius: 12px;
    font-size: 12px;
    position: relative;
}

.remove-date {
    background: none;
    border: none;
    color: white;
    margin-left: 5px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.remove-date:hover {
    color: #ffcccb;
}

.no-dates {
    color: #6c757d;
    font-style: italic;
    margin: 0;
}


/* トップページ用 */
.top_calendar .calendar-title{
    font-family: "Oswald", sans-serif!important;
    font-size: 25px;
    font-weight: 500;
    background: none!important;
    border-width: 0px!important;
}
.top_calendar .calendar-container, .top_calendar .calendar-navigation, .top_calendar .calendar-header, .top_calendar .calendar-day{
    background: none;
    border-width: 0px;
}
.top_calendar .calendar-weekday{
    font-family: "Noto Sans JP", sans-serif!important;
    font-size: 20px;
    font-weight: 500;
}
.top_calendar .day-number{
    font-size: 23px;
    color: #000;
}
.top_calendar .calendar-day.selected {
    background-color: #FFC533;
    color: white!important;
    border-radius: 10px;
    color: #0577BE;
}
.top_calendar .calendar-day.selected::before{
    color: #0577BE;
}
.top_calendar .calendar-day{
    min-height: 80px;
    margin-bottom: 10px;
    cursor: auto;
}
 .top_calendar .calendar-header{
    padding-top: 10px;
    padding-bottom: 10px;
 }
 .top_calendar {
    width: 77%;
}
.calendar_p.has-text-align-left.is-style-sme-alert.has-border-color.has-sm-sub-accent-border-color.has-sm-text-alt-background-color.has-background{
    width: 77%;
    font-weight: bold;
}
.others-text{
    width: 77%;
    color: #dc3545;
}
.top_calendar .calendar-day.selected:before {
    font-size: 13px;
    font-weight: normal;
}
.top_calendar .calendar-day.closed-day .day-number{
      color: #dc3545;
}
.top_calendar .calendar-day.closed-day{
      color: #dc3545;
}
.top_calendar .calendar-day.closed-day span.day-number{
    color: #dc3545!important;
}
.top_calendar .calendar-day.closed-day::before{
    font-weight: normal;
    font-size: 13px;
    color: #dc3545;
}
.top_calendar .calendar-day.closed-day, .calendar-day.weekend.closed-day:not(.calendar-day.closed-day, .calendar-day.weekend.closed-day){
    background: none;
}
/* トップページ用の日曜日・土曜日の色設定 */
.top_calendar .calendar-week .calendar-day:nth-child(1) .day-number {
    color: #dc3545; /* 日曜日：赤 */
    font-weight: bold;
}

.top_calendar .calendar-week .calendar-day:nth-child(7) .day-number {
    color: #0577BE; /* 土曜日：青 */
    font-weight: bold;
}
.top_calendar .calendar-week .calendar-day:nth-child(5) .day-number{
   color: #0577BE; /* 木曜：青 */
   font-weight: bold;
}
.top_calendar .calendar-day.holiday .day-number {
    color: #dc3545!important;
    font-weight: bold;
}
span.top_calendar_news {
   background-color: #ffffff;
    padding: 10px 20px;
    border-radius: 30px;
    color: #0577BE;
    font-weight: bold;
}
button.calendar-prev.calendar-nav.disabled{
    opacity: 0.2;
    pointer-events: none;
    cursor: default;
}
.calendar-nav img{
    width: 40px;
    height: 40px;
}

/* レスポンシブ対応 */
@media (max-width: 1130px) {
    .top_calendar, .calendar_p.has-text-align-left.is-style-sme-alert.has-border-color.has-sm-sub-accent-border-color.has-sm-text-alt-background-color.has-background, .others-text{
        width: 100%;
    }
}
@media (max-width: 902px){
    .calendar-day.selected:before{
        left: initial;
        transform: initial;
    }
    .calendar-day.closed-day::before{
        left: initial;
        transform: initial;
    }
}
@media (max-width: 768px) {
    .calendar-day {
        min-height: 45px;
        font-size: 12px;
    }
    
    .holiday-name {
        font-size: 8px;
    }
    
    .day-number {
        font-size: 12px;
    }
   
}
@media (max-width: 600px){
    .top_calendar .calendar-title{
        font-size: 20px;
    }
    .calendar-nav img {
    width: 30px;
    height: 30px;
}
.top_calendar .calendar-weekday{
    font-size: 18px;
    padding: 0px;
}
.top_calendar .day-number{
    font-size: 20px;
}
.top_calendar .calendar-day.selected:before {
    font-size: 10px;
    font-weight: normal;
    letter-spacing: -1px;
}
.top_calendar .calendar-day.closed-day::before {
    font-size: 8px;
    font-weight: normal;
    letter-spacing: -1px;
}
.top_calendar .calendar-day {
    min-height: 70px;
    margin-bottom: 5px;
}

}
