.calendar {
    /* 아코디언 효과를 위해 overflow는 유지 */
    overflow: hidden;
    width: 60%;
    margin: 0 auto;
    transition: max-height 1s ease;
}

/* 접힘 상태 */
.calendar.collapsed {
    min-height: 43px;
}

/* 펼쳐진 상태 */
.calendar.expanded {
    flex: 0 0 90%; /* 숫자 합계로 비율 조정 */
}

/* 섹션 헤더: 전체 줄 높이를 48px로 잡고 수직 중앙 정렬 */
.accordion-header {
    display: flex;
    justify-content: space-between; /* 왼쪽에 타이틀, 오른쪽에 버튼 */
    align-items: center;            /* 수직 중앙 정렬 */
    height: 48px;                   /* 헤더 높이 (원하는 값으로 조정) */
    padding: 0 10px;
    box-sizing: border-box;
}

#accordion-icon {
    font-size: 1.2rem;
    filter: grayscale(100%);
}

/* calendar.css */
.calendar-wrapper {
    padding: 10px;
    /* 연속 스크롤을 위해 최대 높이와 세로 스크롤 추가 */
    height: 90%;  /* 원하는 높이로 조정 */
    overflow-y: auto;
}

/* 달력 사이의 구분(여러 달이 연속으로 표시될 경우) */
.month-block {
    margin-bottom: 20px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
}

.calendar-cell {
    border: 1px solid #eee;
    min-height: 80px;
    border-radius: 6px;
    padding: 4px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin: 0;
}

/* 날짜 표시 */
.calendar-cell .day-number {
    font-weight: bold;
    margin-bottom: 4px;
}

/* 셀 하단의 테마 컨테이너: 좌측에는 태그, 우측에는 체크박스 */
.theme-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

/* 왼쪽 영역: 테마 태그들을 세로로 정렬 */
.theme-tags {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* 오른쪽 영역: 체크박스들을 세로로 정렬 */
.theme-checkboxes {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

/* 테마 태그 스타일 (기본 상태: 낮은 불투명도) */
.theme-tag {
    border-radius: 4px;
    color: white;
    padding: 2px 4px;
    font-size: 1rem;
    white-space: nowrap;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 활성화된 테마 태그 (체크박스 선택 시) */
.theme-tag.active {
    opacity: 1;
}

/* 메달 요소: CSS에서 background-image 지정 */
.medal {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 4px;
}

.medal.medal-1 {
    background-image: url('../../static/image/medal(2)_gold.png');
}

.medal.medal-2 {
    background-image: url('../../static/image/medal(2)_silver.png');
}

.medal.medal-3 {
    background-image: url('../../static/image/medal(2)_brown.png');
}

/* 체크박스 기본 스타일 */
.theme-checkbox {
    cursor: pointer;
    /* 추가 스타일은 필요에 따라 조정 */
}

.theme-row {
    border-radius: 10px;
}

.theme-checkbox {
    /* 브라우저 기본 체크박스 모양 제거 (각 브라우저별 접두사) */
    -webkit-appearance: none; /* Safari, iOS 등 */
    -moz-appearance: none;    /* Firefox (일부 버전) */
    appearance: none;

    /* 크기, 모양, 테두리 */
    width: 16px;
    height: 16px;
    border: 2px solid #555;  /* 원하는 테두리 색상 */
    border-radius: 50%;      /* 둥근 모양 */
    background-color: #fff;  /* 기본 배경색 (체크 안 된 상태) */
    cursor: pointer;
    outline: none;           /* 포커스 테두리 제거 (원한다면 유지) */
    margin-left: 8px;        /* 필요 시 좌우 여백 */
}

/* 체크된 상태: 내부를 원하는 색상으로 채움 */
.theme-checkbox:checked {
    background-color: #4079BF;  /* 원하는 색상 */
    border-color: white;      /* 테두리 색상도 통일 */
}

/* 포커스 시 시각적 효과 (선택사항) */
.theme-checkbox:focus {
    outline: 2px auto #aaa; /* 포커스 시 표시, 필요 시 제거 가능 */
}

.calendar .section-title {
    font-weight: bold;
}

.calendar .section-title .weekday{
    font-weight: bold;
    color: #66aaff;
    margin-left: 5px;
}
