/* ====== 日历样式 ====== */
.calendar-container {
    padding: 1rem !important;
    position: relative;
}

/* 日历选择器样式 */
.calendar-selectors {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.year-selector,
.month-selector {
    padding: 8px 12px;
    border: 1px solid #ffcccc;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s;
    color: #cc0000;
    flex: 1;
    min-width: 90px;
}

.year-selector:hover,
.month-selector:hover {
    border-color: #ff6b6b;
}

.year-selector:focus,
.month-selector:focus {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2);
}

/* 本月按钮样式 */
.today-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff4d4d 100%);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    margin-left: 10px;
    min-width: 80px;
}

.today-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.today-btn:active {
    transform: translateY(0);
}

.calendar-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #ffe6e6;
    border-top: 3px solid #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.calendar-error {
    text-align: center;
    padding: 2rem;
    color: #ff3333;
    background: #fff5f5;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid #ffcccc;
}

.retry-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff4d4d 100%);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    margin-top: 1rem;
}

.calendar {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.calendar-nav-btn {
    background: #ffe6e6;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    color: #cc0000;
    order: 0;
}

.calendar-nav-btn:hover {
    background: #ffcccc;
}

.calendar-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.calendar-nav-btn:disabled:hover {
    background: #ffe6e6;
}

.calendar-month-year {
    font-weight: 600;
    font-size: 1.1rem;
    color: #cc0000;
    text-align: center;
    flex: 1;
    min-width: 120px;
    order: 1;
}

.calendar-nav-btn:last-child {
    order: 2;
}

.calendar th {
    padding: 0.2rem 0;
    font-weight: 600;
    color: #ff6666;
    font-size: 0.9rem;
    text-align: center;
}

.calendar td {
    width: 14.28%;
    height: 40px;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    position: relative;
}

.calendar td:hover:not(.disabled):not(.empty) {
    background-color: #fff5f5;
}

.calendar td.active-date {
    background-color: #ff6b6b !important;
    color: white !important;
    font-weight: bold;
}

.calendar td.has-event {
    color: #ff6b6b;
    font-weight: 600;
}

.calendar td.has-event::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background-color: #ff6b6b;
    border-radius: 50%;
}

.calendar td.disabled {
    color: #ffcccc !important;
    cursor: not-allowed !important;
    background-color: #fff5f5 !important;
}

.calendar td.empty {
    background-color: transparent !important;
    cursor: default !important;
}

.calendar td.today {
    background-color: #ffe6e6;
    border: 1px solid #ffcccc;
    color: #cc0000;
}