/* 캘린더 페이지 PC 레이아웃 - 화면 꽉 채우기 */

@media (min-width: 769px) {
    /* 캘린더 헤더 강제 표시 */
    .calendar-page .page-header {
        display: block !important;
        visibility: visible !important;
        padding: 16px 16px 12px 16px !important;
        flex-shrink: 0;
        border-bottom: 1px solid var(--gray-200);
        background: white;
        z-index: 10;
    }
    
    /* 1줄 레이아웃 */
    .calendar-header-single-line {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 16px;
    }
    
    /* 년도/월 선택 스타일 */
    .calendar-title-group {
        display: flex;
        align-items: center;
        gap: 4px;
        flex-shrink: 0;
    }
    
    .year-select,
    .month-select {
        font-size: 24px;
        font-weight: 700;
        color: var(--premium-primary-600, #0D9488);
        border: none;
        background: transparent;
        cursor: pointer;
        padding: 4px 8px;
        border-radius: 6px;
    }
    
    .year-select:hover,
    .month-select:hover {
        background: var(--gray-100, #f3f4f6);
    }
    
    .year-select:focus,
    .month-select:focus {
        outline: 2px solid var(--premium-primary-500, #14B8A6);
        outline-offset: 2px;
    }
    
    .title-separator {
        font-size: 20px;
        font-weight: 600;
        color: var(--gray-600, #6b7280);
    }
    
    .calendar-controls {
        display: flex !important;
        gap: 8px !important;
        margin-top: 0 !important;
        flex-shrink: 0;
    }
    
    .calendar-controls .btn {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    /* 캘린더 컨텐츠 영역 - 남은 공간 100% 활용 */
    .calendar-page .page-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 0 !important;
    }
    
    .calendar-view {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        height: 100%;
    }
    
    /* 캘린더 그리드 - 화면 꽉 채우기 */
    .calendar-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        grid-template-rows: auto repeat(6, 1fr); /* 요일 헤더 + 6주 */
        gap: 0;
        background: white;
        border: 2px solid var(--gray-300);
        border-radius: 8px;
        overflow: hidden;
        height: 100%;
        flex: 1;
    }
    
    .calendar-weekday {
        background: var(--gray-100);
        padding: 12px 8px;
        text-align: center;
        font-size: 13px;
        font-weight: 600;
        color: var(--gray-700);
        border-right: 1px solid var(--gray-300);
        border-bottom: 2px solid var(--gray-300);
    }
    
    /* 일요일 빨간색 */
    .calendar-weekday:nth-child(1) {
        color: #DC2626;
    }
    
    .calendar-weekday:last-child {
        border-right: none;
    }
    
    .calendar-day {
        background: white;
        min-height: 0; /* min-height 제거 */
        height: 100%; /* 그리드 셀 전체 채우기 */
        padding: 8px;
        cursor: pointer;
        transition: background-color 0.2s;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        border-right: 1px solid var(--gray-200);
        border-bottom: 1px solid var(--gray-200);
    }
    
    .calendar-day:nth-child(7n) {
        border-right: none;
    }
    
    .calendar-day:nth-last-child(-n+7) {
        border-bottom: none;
    }
    
    .calendar-day.empty {
        background: var(--gray-50);
        cursor: default;
    }
    
    /* 다른 달 날짜 스타일 */
    .calendar-day.other-month {
        background: var(--gray-50);
        opacity: 0.6;
    }
    
    .calendar-day.other-month .day-number {
        color: var(--gray-400);
    }
    
    .calendar-day:not(.empty):hover {
        background: var(--gray-50);
    }
    
    .calendar-day.today {
        background: rgba(13, 148, 136, 0.05); /* Teal */
        border: 2px solid var(--premium-primary-600);
    }
    
    .calendar-day.today .day-number {
        background: var(--premium-primary-600);
        color: white;
    }
    
    .day-header {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 4px;
        margin-bottom: 8px;
        flex-shrink: 0;
    }
    
    .day-number {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        font-size: 14px;
        font-weight: 600;
        flex-shrink: 0;
    }
    
    /* 일요일 날짜 빨간색 */
    .calendar-day.sunday .day-number {
        color: #DC2626;
    }
    
    .calendar-day.sunday.today .day-number {
        background: #DC2626;
        color: white;
    }
    
    .lunar-day {
        font-size: 10px;
        color: var(--gray-500);
        font-weight: 400;
        line-height: 1.2;
        flex-shrink: 0;
        margin-left: 2px;
    }
    
    .day-content {
        display: flex;
        flex-direction: column;
        gap: 4px;
        overflow-y: auto;
        flex: 1;
        min-height: 0;
    }
    
    .day-content::-webkit-scrollbar {
        width: 4px;
    }
    
    .day-content::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .day-content::-webkit-scrollbar-thumb {
        background: var(--gray-300);
        border-radius: 2px;
    }
    
    /* 이벤트 배지 크기 조정 */
    .event-badge {
        font-size: 11px;
        padding: 4px 6px;
        border-radius: 4px;
        background: var(--gray-100);
        color: var(--gray-700);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex-shrink: 0;
    }
    
    .event-badge.confirmed {
        background: rgba(16, 185, 129, 0.1);
        color: var(--success);
    }
    
    .event-badge.done {
        background: var(--gray-200);
        color: var(--gray-600);
    }
    
    .event-badge.hold {
        background: rgba(245, 158, 11, 0.1);
        color: var(--warning);
    }
    
    .work-dot {
        font-size: 12px;
        color: var(--premium-primary-600);
        font-weight: 600;
    }
}

/* 반응형 - 작은 화면 (1366×768) */
@media (min-width: 769px) and (max-width: 1599px) {
    .calendar-day {
        padding: 6px;
    }
    
    .day-number {
        width: 24px;
        height: 24px;
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .event-badge {
        font-size: 10px;
        padding: 3px 5px;
    }
    
    .current-month {
        font-size: 16px !important;
    }
}

/* 반응형 - 큰 화면 (1920×1080) */
@media (min-width: 1600px) {
    .calendar-day {
        padding: 10px;
    }
    
    .day-number {
        width: 32px;
        height: 32px;
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .event-badge {
        font-size: 12px;
        padding: 5px 8px;
    }
    
    .current-month {
        font-size: 20px !important;
    }
}
