/* 스케줄 달력 스타일 */

.calendar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 달력 헤더 */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    padding: 20px;
    background: #f4f5f8;
    border-radius: 10px;
}

.calendar-title {
    font-size: 28px;
    font-weight: bold;
    color: #475781;
    min-width: 200px;
    text-align: center;
}

.calendar-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #d7d7d7;
    color: #475781;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.calendar-nav-btn:hover {
    background: #475781;
    border-color: #475781;
    color: #fff;
    transform: scale(1.1);
}

.calendar-nav-btn i {
    font-size: 16px;
}

/* 달력 그리드 */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    background: #cdd7e1;
    border: 1px solid #cdd7e1;
    margin-bottom: 60px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 요일 헤더 */
.calendar-day-header {
    background: #475781;
    color: #fff;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
}

.calendar-day-header.sunday {
    color: #ff6b6b;
}

.calendar-day-header.saturday {
    color: #66b3ff;
}

/* 날짜 셀 */
.calendar-day {
    background: #fff;
    min-height: 120px;
    padding: 10px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    min-width: 0;
}

.calendar-day:hover {
    overflow: visible;
    z-index: 1;
}

.calendar-day.empty {
    background: #f9f9f9;
    cursor: default;
}

.calendar-day:not(.empty):hover {
    background: #f4f5f8;
}

/* 오늘 날짜 강조 */
.calendar-day.today {
    background: #f0f7ff;
    border: 1px solid #a8c5e6;
    box-shadow: 0 0 0 1px rgba(71, 87, 129, 0.15);
}

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

/* 날짜 번호 */
.day-number {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

/* 이벤트 영역 */
.day-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
    overflow: visible;
    width: 100%;
    max-width: 100%;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #475781;
    border-radius: 4px;
    font-size: 13px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    height: 28px;
    width: 100%;
    box-sizing: border-box;
}

.event-item:hover {
    background: #36487d;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    width: max-content;
    max-width: 400px;
    padding: 6px 12px;
    z-index: 100;
    position: relative;
}

.event-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    flex-shrink: 0;
}

.event-item:hover .event-dot {
    background: #a8c5e6;
}

.event-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    transition: all 0.3s ease;
    line-height: 1.2;
    flex: 1;
    min-width: 0;
    letter-spacing: -0.02em;
}

.event-item:hover .event-title {
    white-space: nowrap;
    overflow: visible;
    text-overflow: initial;
    flex: none;
    letter-spacing: normal;
}

/* 이벤트가 있는 날 표시 */
.calendar-day.has-events {
    border-left: 3px solid #475781;
}

/* 이벤트 목록 섹션 */
.event-list-section {
    margin-top: 60px;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 10px;
}

.event-list-section h3 {
    font-size: 24px;
    font-weight: bold;
    color: #475781;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #475781;
}

.event-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.event-list-item {
    padding: 15px 20px;
    background: #fff;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid #475781;
    transition: all 0.2s ease;
}

.event-list-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.event-list-item a {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    color: #333;
}

.event-date {
    font-weight: bold;
    color: #475781;
    font-size: 14px;
    min-width: 100px;
}

.event-name {
    font-size: 16px;
    flex: 1;
}

.event-list-item:hover .event-name {
    color: #475781;
}

.no-events {
    text-align: center;
    padding: 40px 20px;
    color: #8f929e;
    font-size: 16px;
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
    .calendar-grid {
        gap: 0;
    }

    .calendar-day {
        min-height: 100px;
        padding: 8px;
    }

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

    .event-item {
        font-size: 11px;
        padding: 3px 5px;
    }
}

@media (max-width: 768px) {
    .calendar-container {
        padding: 20px 10px;
    }

    .calendar-header {
        gap: 15px;
        padding: 15px;
    }

    .calendar-title {
        font-size: 22px;
        min-width: 150px;
    }

    .calendar-nav-btn {
        width: 35px;
        height: 35px;
    }

    .calendar-day {
        min-height: 80px;
        padding: 5px;
    }

    .calendar-day-header {
        padding: 10px 5px;
        font-size: 14px;
    }

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

    .event-item {
        font-size: 10px;
        padding: 2px 4px;
        gap: 4px;
    }

    .event-dot {
        width: 4px;
        height: 4px;
    }

    .event-list-section {
        padding: 20px;
    }

    .event-list-section h3 {
        font-size: 20px;
    }

    .event-list-item a {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .event-date {
        min-width: auto;
        font-size: 12px;
    }

    .event-name {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .calendar-title {
        font-size: 18px;
        min-width: 120px;
    }

    .calendar-day {
        min-height: 60px;
        padding: 3px;
    }

    .calendar-day-header {
        padding: 8px 2px;
        font-size: 12px;
    }

    .day-number {
        font-size: 12px;
        margin-bottom: 4px;
    }

    /* 모바일에서는 이벤트 제목을 숨기고 점만 표시 */
    .event-title {
        display: none;
    }

    .event-item {
        padding: 2px;
        background: transparent;
    }

    .event-dot {
        width: 6px;
        height: 6px;
        background: #475781;
    }
}
