/* 달력 기본 스타일 */
.calendar-all {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    width: 100%; float: left; margin-bottom: 50px
}

.weekdays {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.weekdays li {
    flex: 1;
    width: calc(100% / 7);
    padding: 12px 5px;
    text-align: center;
    font-weight: bold;
    border-right: 1px solid #ddd;
    font-size: 14px;
    box-sizing: border-box;
}

.weekdays li:last-child {
    border-right: none;
}

/* 요일별 색상 */
.weekdays li:nth-child(1) { /* 일요일 */
    color: #dc3545;
}

.weekdays li:nth-child(7) { /* 토요일 */
    color: #007bff;
}

.days {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.day_li {
    width: calc(100% / 7);
    min-height: 80px;
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    padding: 8px 5px;
    display: flex;
    flex-direction: column;
    position: relative;
    background: white;
    cursor: pointer;
    transition: background-color 0.2s;
    box-sizing: border-box;
}

.day_li:hover {
    background: #f8f9fa;
}

.day_li:nth-child(7n) {
    border-right: none; /* 토요일 */
}

.day-number {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 3px;
    text-align: left;
    align-self: flex-start;
}

/* 요일별 색상 - 일요일 (첫 번째) */
.day_li:nth-child(7n+1) .day-number {
    color: #dc3545;
}

/* 요일별 색상 - 토요일 (일곱 번째) */
.day_li:nth-child(7n) .day-number {
    color: #007bff;
}

/* 오늘 날짜 */
.day_li.today {
    background: #e3f2fd;
}

.day_li.today .day-number {
    background: #2196f3;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* 일정이 있는 날 */
.day_li.dayon {
    background: #fff3e0;
}

/* 클릭된 날 */
.day_li.active {
    background: #e1f5fe;
    position: relative;

    z-index: 10;
}
.day_li.active:before {
     border: 2px solid  var(--primary)!important;
content: ""; width: 100%; height: 100%; position: absolute; left: 0px; top: 0px

}

  
/* 다른 달 날짜 */
.day_li.other-month {
    background: #f8f9fa;
    color: #6c757d;
    width: calc(100% / 7);
    min-height: 80px;
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    padding: 8px 5px;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s;
    box-sizing: border-box;
}

.day_li.other-month .day-number {
    color: #adb5bd;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 3px;
    text-align: left;
    align-self: flex-start;
}

/* 일정 제목 표시 */
.day-schedules {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-top: 2px;
    align-items: flex-start;
    width: 100%;
}

.schedule-title {
    font-size: 14px;
    background: rgba(33, 150, 243, 0.1);
    color: #1976d2;
    padding: 2px 4px;
    border-radius: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid rgba(33, 150, 243, 0.2);
    font-weight: 500;
    text-align: left;
}

/* 각 게시물별 색상 클래스 */
.schedule-color-0 { /* 파란색 */
    background: rgba(33, 150, 243, 0.1) !important;
    color: #1976d2 !important;
    border-color: rgba(33, 150, 243, 0.2) !important;
}

.schedule-color-1 { /* 초록색 */
    background: rgba(76, 175, 80, 0.1) !important;
    color: #2e7d32 !important;
    border-color: rgba(76, 175, 80, 0.2) !important;
}

.schedule-color-2 { /* 주황색 */
    background: rgba(255, 152, 0, 0.1) !important;
    color: #f57c00 !important;
    border-color: rgba(255, 152, 0, 0.2) !important;
}

.schedule-color-3 { /* 보라색 */
    background: rgba(156, 39, 176, 0.1) !important;
    color: #7b1fa2 !important;
    border-color: rgba(156, 39, 176, 0.2) !important;
}

.schedule-color-4 { /* 빨간색 */
    background: rgba(244, 67, 54, 0.1) !important;
    color: #d32f2f !important;
    border-color: rgba(244, 67, 54, 0.2) !important;
}

.schedule-color-5 { /* 청록색 */
    background: rgba(0, 188, 212, 0.1) !important;
    color: #0097a7 !important;
    border-color: rgba(0, 188, 212, 0.2) !important;
}

.schedule-color-6 { /* 갈색 */
    background: rgba(121, 85, 72, 0.1) !important;
    color: #5d4037 !important;
    border-color: rgba(121, 85, 72, 0.2) !important;
}

.schedule-color-7 { /* 청회색 */
    background: rgba(96, 125, 139, 0.1) !important;
    color: #455a64 !important;
    border-color: rgba(96, 125, 139, 0.2) !important;
}

.schedule-color-8 { /* 핑크색 */
    background: rgba(233, 30, 99, 0.1) !important;
    color: #c2185b !important;
    border-color: rgba(233, 30, 99, 0.2) !important;
}

.schedule-color-9 { /* 남색 */
    background: rgba(63, 81, 181, 0.1) !important;
    color: #303f9f !important;
    border-color: rgba(63, 81, 181, 0.2) !important;
}

.schedule-more {
    font-size: 8px;
    background: rgba(0,0,0,0.1);
    padding: 1px 3px;
    border-radius: 2px;
    text-align: center;
    color: #666;
    margin-top: 1px;
}

/* 하단 상세 내용 영역 */
.schedule-content-area {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    width: 100%;
    box-sizing: border-box; width: 100%; float: left
}

.schedule-details {
    line-height: 1.6;; width: 100%; float: left
}

.schedule-item {
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #2196f3;
}

.schedule-item h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 25px;
    font-weight: 600;
}

.schedule-content {
    color: #555;
    font-size: 14px;
    line-height: 1.8;
}

.no-schedule {
    text-align: center;
    color: #6c757d;
    padding: 40px 20px;
    font-style: italic;
    background: white;
    border-radius: 8px;
}

/* 달력 헤더 */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 20px;
    background: white;
    border-bottom: 1px solid #ddd;
}

.calendar-month {
    display: flex;
    gap: 2px;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-align: center;
    flex: 1;
    justify-content: center;
}

.year {
    color: #000;
    font-size: 26px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.year:hover {
    background: rgba(0,0,0,0.05);
}

.month {
    color: #2196f3;
    font-size: 26px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.month:hover {
    background: rgba(33, 150, 243, 0.1);
}

.nav-btn {
    background: #2196f3;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.nav-btn:hover {
    background: #1976d2;
}

.selected-date {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 15px;
    width: 100%;
    box-sizing: border-box; width: 100%; float: left
}

.date-info {
    display: flex;
    align-items: center;
    gap: 10px;  width: 100%; float: left
}

.date-label {
    font-size:calc(var(--tit-mds-size) * 0.9);
    font-weight: 800;
    color: #000; margin-bottom: 30px;   width: 100%; float: left; padding-left: 40px; position:relative
}

.date-label:before {
 content: "\e8dc";    font-family: unicons-line; position: absolute; left: 0px; top: 0px; font-weight: 500; font-size: 30px
}

/* 년도/월 선택 팝업 */
.date-picker-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 20px;
    z-index: 1000;
    min-width: 300px;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.popup-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.popup-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    padding: 5px;
}

.popup-close:hover {
    color: #333;
}

.year-grid, .month-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.year-item, .month-item {
    padding: 10px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.year-item:hover, .month-item:hover {
    background: #f8f9fa;
    border-color: #2196f3;
}

.year-item.selected, .month-item.selected {
    background: #2196f3;
    color: white;
    border-color: #2196f3;
}

.popup-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.popup-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.popup-btn.primary {
    background: #2196f3;
    color: white;
}

.popup-btn.secondary {
    background: #f5f5f5;
    color: #333;
}
