/* ============================================
   달력 위젯 스타일
   ============================================ */

/* 달력 위젯 */
.calendar-widget {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.calendar-widget__header {
    background: #003d82;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-widget__title {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
}

.calendar-nav-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
    transition: 0.3s;
}

.calendar-nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.calendar-widget__body {
    padding: 20px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.calendar-weekday {
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    color: #666;
    padding: 10px 0;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    height: 90px;  /* 120px에서 90px로 축소 */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 6px 4px;  /* 8px에서 6px로 축소 */
    font-size: 13px;
    color: #333;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.calendar-day:hover:not(.calendar-day--empty) {
    background: #e3f2fd;
    transform: scale(1.05);
}

.calendar-day--empty {
    cursor: default;
    visibility: hidden;
}

.calendar-day--today {
    background: #1976d2;
    color: #fff;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

.calendar-day--today:hover {
    background: #1565c0;
}

/* 일요일 빨간색 */
.calendar-day:nth-child(7n+1):not(.calendar-day--empty):not(.calendar-day--today) {
    color: #f44336;
}

/* 토요일 파란색 */
.calendar-day:nth-child(7n):not(.calendar-day--empty):not(.calendar-day--today) {
    color: #2196f3;
}

/* 달력 날짜 셀 헤더 */
.calendar-day__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 4px;
}

.calendar-day__number {
    font-size: 14px;
    font-weight: 600;
    text-align: left;
}

/* 신청 정보가 있는 날짜 */
.calendar-day--has-application {
    background: #e3f2fd;
    border: 2px solid #2196f3;
}

.calendar-day--has-application:hover {
    background: #bbdefb;
    transform: scale(1.02);
}

/* 신청 마감 */
.calendar-day--full {
    background: #ffebee;
    border: 2px solid #f44336;
}

.calendar-day--full:hover {
    background: #ffcdd2;
}

/* 신청 정보 표시 */
.calendar-application-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    font-size: 10px;
}

.calendar-application-schools {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
}

.calendar-application-school-item {
    color: #666;
    text-align: left;
    line-height: 1.3;
    font-size: 9px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.calendar-application-school-item:hover {
    color: #9b7fd6;
    font-weight: 600;
    transform: translateX(2px);
}

.calendar-application-count {
    font-weight: 700;
    color: #1976d2;
    font-size: 11px;
}

.calendar-day--full .calendar-application-count {
    color: #d32f2f;
}

/* 오늘 날짜 (신청 정보가 있는 경우) */
.calendar-day--today.calendar-day--has-application .calendar-day__number {
    color: #1976d2;
}

.calendar-day--today.calendar-day--full .calendar-day__number {
    color: #d32f2f;
}

/* 선택된 날짜 */
.calendar-day--selected {
    background: #fff3cd !important;
    border: 2px solid #ffc107 !important;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.2);
}

.calendar-day--selected:hover {
    background: #ffe69c !important;
}

/* 선택된 날짜의 숫자 강조 */
.calendar-day--selected .calendar-day__number {
    color: #d39e00;
    font-weight: 700;
}

/* 반응형 */
@media (max-width: 768px) {
    .calendar-day {
        height: 80px;  /* 100px에서 80px로 축소 */
        padding: 5px 3px;  /* 6px에서 5px로 축소 */
        font-size: 12px;
        overflow: hidden;
    }

    .calendar-day__number {
        font-size: 12px;
    }

    .calendar-application-count {
        font-size: 10px;
    }

    .calendar-application-school-item {
        font-size: 8px;
    }
}

@media (max-width: 576px) {
    .calendar-weekday {
        font-size: 11px;
    }

    .calendar-day {
        font-size: 11px;
    }
}

/* 더보기 버튼 스타일 */
.calendar-application-more {
    display: flex;
    align-items: center;
    gap: 4px;
}

.calendar-more-button {
    background: none;
    border: none;
    color: #9b7fd6;
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.2s ease;
    text-decoration: underline;
}

.calendar-more-button:hover {
    background: #f3f0ff;
    color: #7e57c2;
    text-decoration: none;
}

.calendar-more-button:active {
    transform: scale(0.95);
}

/* 반응형: 모바일에서는 더보기 버튼을 조금 더 크게 */
@media (max-width: 768px) {
    .calendar-more-button {
        font-size: 10px;
        padding: 3px 5px;
    }
}