/* カレンダー全体の枠組み */
.calendar {
    display: flex;
    flex-flow: column;
}
.calendar .header .month-year {
    padding-top: 8px;
    padding-bottom: 8px;
    color: #6c757d;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
}
.calendar .days {
    display: flex;
    flex-flow: wrap;
}
.calendar .days .day_name {
    width: calc(100% / 7);
    border-right: 1px solid #ddd;
    padding: 6px;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    background-color: #1c4074;
    text-align: center;
}
.calendar .days .day_name:nth-child(7) {
    border: none;
}
/* PC 表示のセルサイズと共通装飾 */
.calendar .days .day_num {
    flex-flow: column;
    width: calc(100% / 7);
    border-right: 1px solid #e6e9ea;
    border-bottom: 1px solid #e6e9ea;
    padding: 6px;
    color: #212529;
    cursor: pointer;
    min-height: 140px;
}
.calendar .days .day_num div.text-date {
    text-align: right;
}
.calendar .days .day_num .date-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
}
.calendar .days .day_num .date-header .text-date {
    margin: 0;
}
.calendar .days .day_num .date-header .icon-holiday {
    flex-shrink: 0;
}
/* 料金など各イベント行の共通スタイル */
.calendar .days .day_num .event {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    margin-bottom: 0;
    color: #1165b0;
    text-align: right;
    font-size: 16px;
    line-height: 1.2;
}
.calendar .days .day_num .event.text-promotion {
    color: #1165b0;
}
.calendar .days .day_num .event.text-contact {
    color: #1165b0;
}
.calendar .days .day_num .event.blue {
    background-color: #518fce;
}
.calendar .days .day_num .event.red {
    background-color: #ce5151;
}
.calendar .days .day_num:nth-child(7n+1) {
    border-left: 1px solid #e6e9ea;
}
.calendar .days .day_num:hover {
    background-color: #fdfdfd;
}
.calendar .days .day_num.ignore {
    background-color: #fdfdfd;
    color: #ced2d4;
    cursor: inherit;
}
.calendar .days .day_num.selected {
    background-color: #f1f2f3;
    cursor: inherit;
}
.calendar .days .day_num.checked {
    background-color: #dbb2b2;
    cursor: inherit;
}
.calendar .days .day_num.weekend {
    color: red;
}
.calendar .days .day_num.holiday {
    color: red;
}
.calendar .days .day_num .event.cal-green_fee:not(:empty) {
    display: inline-flex;
    width: 100%;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    gap: 2px;
    overflow: hidden;
    text-overflow: clip;
}
/* PC 会員ラベル (CT/Web) の表示 */
.calendar .days .day_num .event.cal-green_fee.text-blue:not(:empty)::before {
    content: 'CT会員';
    font-size: 13px;
    color: inherit;
}
.calendar .days .day_num .event.cal-green_fee.text-black:not(:empty)::before {
    content: 'WEB会員';
    font-size: 13px;
    color: inherit;
}
.calendar .days .day_num .event.cal-green_fee:not(:empty)::before {
    display: block;
    letter-spacing: 0.5px;
}

/* モバイル向けのセル高さとラベル調整 */
@media screen and (max-width: 767px) {
    .calendar .days .day_num {
        font-size: 11px;
        min-height: 68px;
    }
    .calendar .days .day_num .event {
        font-size: 12px;
        line-height: 1.1;
    }
    .calendar .days .day_num .event.cal-green_fee.text-blue:not(:empty)::before {
        content: 'CT';
        font-size: 11px;
    }
    .calendar .days .day_num .event.cal-green_fee.text-black:not(:empty)::before {
        content: 'WB';
        font-size: 11px;
    }
    .calendar .days .day_num .event.cal-green_fee:not(:empty) {
        gap: 1px;
        letter-spacing: 0.25px;
    }
    /*モバイルカレンダー祝日アイコン調整*/
    .calendar .days .day_num .date-header {
        gap: 0px;
    }
    .calendar .days .day_num .date-header .icon-holiday {
        min-width: auto;
        padding: 0 3px;
        font-size: 10px;
        line-height: 1.1;
    }
}
.red-text-calendar {
    color: #F00 !important;
}

/* SweetAlert popup positioning for calendar */
@media screen and (max-width: 767px) {
    .calendar-fee-modal.swal2-popup {
        top: 90px !important;
        left: 50% !important;
        margin: 0 !important;
        transform: translate(-50%, 0) !important;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
    }
}
/* カレンダーアイコン*/
.icon-weekend {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: orange;
    border-radius: 50%;
    margin-right: 4px;
}
.icon-holiday {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 16px;
    padding: 0 4px;
    /* background-image: url('/assets/images/icon-holiday.png'); */
    background-color: transparent;
    color: #d00;
    font-size: 12px;
    line-height: 1;
    font-weight: 600;
    border-radius: 8px;
}
.icon-holiday::before {
    content: '祝日';
}
