/* 캘린더 게시판 스킨 스타일 */

.board-calendar-container {
    width: 100%;
    max-width: 100%;
    margin: 20px 0;
    clear: both;
    overflow: hidden;
}

/* 캘린더 헤더 */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    box-sizing: border-box;
}

.calendar-navigation {
    display: flex;
    align-items: center;
    gap: 20px;
}

.calendar-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
}

.btn-nav {
    padding: 8px 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-nav:hover {
    background: #3788d8;
    color: white;
    border-color: #3788d8;
}

.calendar-actions {
    display: flex;
    gap: 10px;
}

/* 캘린더 그리드 */
.calendar-grid {
    width: 100%;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-sizing: border-box;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #3788d8;
    color: white;
}

.weekday {
    padding: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: white;
}

.calendar-day {
    min-height: 120px;
    border: 1px solid #e0e0e0;
    padding: 35px 0 5px 0;
    /* 상단 날짜 공간 확보, 좌우 패딩 제거 */
    position: relative;
    background: white;
    cursor: pointer;
    transition: background-color 0.2s;
    box-sizing: border-box;
}

.calendar-day:hover {
    background: #f8f9fa;
}

.calendar-day.empty {
    background: #fafafa;
    cursor: default;
}

.calendar-day.today {
    background: #fff9e6;
}

.calendar-day.weekend .day-number {
    color: #e74c3c;
}

.day-number {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    z-index: 1;
}

.calendar-day.today .day-number {
    color: #009dde;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.calendar-day.today .day-number::after {
    content: " 오늘";
    font-size:14px;
    margin-left:4px;
    font-weight: normal;
} 

.day-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 4px;
    /* 기본 좌우 여백 */
}

/* 일정 바 */
.event-bar {
    display: block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    text-decoration: none;
    color: white;
    transition: opacity 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 1px;
    position: relative;
    z-index: 2;
}

.event-bar:hover {
    opacity: 0.8;
    text-decoration: none;
}

.event-title {
    font-weight: 500;
}

/* 여러날 일정 스타일 */
.event-multi-day {
    position: relative;
}

.event-multi-day.event-start {
    border-top-left-radius: 3px;
    border-bottom-left-radius: 3px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    margin-right: -5px;
    /* 오른쪽 여백 제거하여 다음 날짜와 연결 */
    padding-right: 0;
    z-index: 3;
}

.event-multi-day.event-end {
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: -5px;
    /* 왼쪽 여백 제거하여 이전 날짜와 연결 */
    padding-left: 0;
    z-index: 3;
}

.event-multi-day.event-continue {
    border-radius: 0;
    margin-left: -5px;
    margin-right: -5px;
    z-index: 3;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .calendar-header {
        flex-direction: column;
        gap: 15px;
    }

    .calendar-title {
        font-size: 20px;
    }

    .calendar-day {
        min-height: 80px;
        padding-top: 25px;
        /* 모바일에서 상단 여백 조정 */
    }

    .day-number {
        font-size: 14px;
        top: 4px;
        left: 4px;
    }

    .event-bar {
        font-size: 11px;
        padding: 3px 6px;
    }

    .weekday {
        padding: 8px 4px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .calendar-day {
        min-height: 60px;
    }

    .event-bar {
        font-size: 10px;
        padding: 2px 4px;
    }

    .day-number {
        font-size: 12px;
    }
}