/* 热点日历网站 - 日历组件样式 */

/* 日历容器样式 */
.calendar-sidebar {
    width: 320px;
    padding: 24px;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.calendar-sidebar:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* 日历头部 */
.calendar-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

/* 统一的日期选择框 */
.date-picker {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 12px;
    padding: 10px 16px;
    border: 2px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    gap: 10px;
}

/* 引号样式 */
.picker-quote {
    font-size: 16px;
    font-weight: 700;
    color: #999;
    font-family: 'Arial', sans-serif;
}

/* 导航按钮样式 */
.nav-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #d9d9d9;
    background-color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #666;
}

.nav-btn:hover {
    background-color: #1890ff;
    border-color: #1890ff;
    color: #fff;
}

/* 月份导航按钮特殊样式 */
.month-nav-btn {
    font-size: 16px;
    font-weight: 500;
}

/* 年份导航按钮特殊样式 */
.year-nav-btn {
    font-size: 14px;
    font-weight: 600;
    width: 40px;
    height: 36px;
    background-color: #f5f5f5;
    border-color: #d9d9d9;
}

.year-nav-btn:hover {
    background-color: #722ed1;
    border-color: #722ed1;
}

/* 年月显示样式 */
.year-display, .month-display {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    text-align: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    min-width: 60px;
    display: inline-block;
    white-space: nowrap;
    vertical-align: middle;
}

/* 操作按钮区域 */
.calendar-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.action-btn {
    padding: 10px 20px;
    border: 1px solid #d9d9d9;
    background-color: #fff;
    color: #666;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 80px;
}

.action-btn:hover {
    border-color: #40a9ff;
    color: #40a9ff;
}

.action-btn.primary {
    border: 1px solid #1890ff;
    background-color: #1890ff;
    color: #fff;
}

.action-btn.primary:hover {
    background-color: #40a9ff;
    border-color: #40a9ff;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
}

.action-btn:active {
    transform: translateY(1px);
}



/* 日历网格 - 星期标题区域 */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 20px;
    width: 100%;
}

/* 星期标题样式 */
.calendar-grid .calendar-weekday {
    text-align: center;
    padding: 12px 4px;
    font-size: 13px;
    font-weight: 700;
    color: #666;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

/* 日期格子样式 */
.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    background-color: #fff;
    user-select: none;
}

/* 当前月日期 */
.calendar-day:not(.other-month) {
    color: #333;
    border-color: #e9ecef;
}

/* 其他月日期 */
.calendar-day.other-month {
    color: #ccc;
    background-color: #f8f9fa;
    border-color: #e9ecef;
    cursor: default;
}



/* 有热点数据的日期 */
.calendar-day.has-data {
    position: relative;
}

.calendar-day.has-data::after {
    content: '';
    position: absolute;
    bottom: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #52c41a;
    animation: pulse 2s infinite;
}

/* 今天日期 */
.calendar-day.today {
    border-color: #1890ff;
    background-color: #e6f7ff;
    font-weight: 700;
    color: #1890ff;
    box-shadow: 0 0 0 1px #1890ff;
}

/* 选中的日期 */
.calendar-day.selected {
    background-color: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

.calendar-day.selected:hover {
    background-color: #40a9ff;
    border-color: #40a9ff;
}

/* 确保日历宽度响应式 */
@media (max-width: 1024px) {
    .calendar-sidebar {
        width: 280px;
        padding: 20px;
    }
    
    .current-year {
        font-size: 18px;
    }
    
    .current-month {
        font-size: 20px;
    }
    
    .calendar-day {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .calendar-sidebar {
        width: 100%;
        margin-bottom: 20px;
        border-radius: 12px;
    }
    
    .calendar-day {
        font-size: 13px;
        border-radius: 8px;
    }
    
    .calendar-legend {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .legend-item {
        flex: 1 1 45%;
        max-width: 45%;
        justify-content: center;
    }
}

/* 鼠标悬停效果 */
.calendar-day:not(.other-month):hover:not(.selected) {
    border-color: #40a9ff;
    background-color: #f0f7ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.15);
}

/* 选中的日期 */
.calendar-day.selected {
    background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
    color: #fff;
    border-color: #1890ff;
    font-weight: 700;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(24, 144, 255, 0.2);
}

.calendar-day.selected:hover {
    background: linear-gradient(135deg, #40a9ff 0%, #69c0ff 100%);
}

/* 今天且选中的日期 */
.calendar-day.today.selected {
    background: linear-gradient(135deg, #52c41a 0%, #73d13d 100%);
    border-color: #52c41a;
}

.calendar-day.today.selected:hover {
    background: linear-gradient(135deg, #73d13d 0%, #95de64 100%);
}

/* 选中日期的热点指示器 */
.calendar-day.selected.has-data::after {
    background-color: #fff;
}

/* 其他月日期的热点指示器 */
.calendar-day.other-month.has-data::after {
    background-color: #bfbfbf;
    animation: none;
}

/* 未来日期样式 */
.calendar-day.future-date {
    opacity: 0.5;
    cursor: not-allowed;
}

.calendar-day.future-date:hover {
    border-color: #d9d9d9 !important;
    background-color: #f5f5f5 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* 日历图例 */
.calendar-legend {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 13px;
    color: #666;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.legend-item:hover {
    background-color: #f8f9fa;
}

.legend-dot {
    width: 16px;
    height: 16px;
    border-radius: 6px;
    border: 2px solid #d9d9d9;
    flex-shrink: 0;
}

.legend-dot.today {
    border-color: #1890ff;
    background-color: #e6f7ff;
}

.legend-dot.selected {
    background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
    border-color: #1890ff;
}

.legend-dot.has-data {
    position: relative;
    background-color: #fff;
}

.legend-dot.has-data::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background-color: #52c41a;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* 日历选择器（弹出式）- 适配移动端 */
@media (max-width: 768px) {
    .calendar-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        z-index: 2000;
        transition: left 0.3s ease-out;
        overflow-y: auto;
    }
    
    .calendar-sidebar.show {
        left: 0;
    }
    
    .calendar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1999;
        display: none;
        backdrop-filter: blur(2px);
        transition: opacity 0.3s ease-out;
    }
    
    .calendar-overlay.show {
        display: block;
    }
}

/* 动画效果 */
@keyframes pulse {
    0% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
    70% {
        transform: translateX(-50%) scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
}

/* 响应式优化 */
@media (max-width: 480px) {
    .calendar-sidebar {
        padding: 16px;
    }
    
    .calendar-header {
        gap: 12px;
    }
    
    .year-btn, .month-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .current-year {
        font-size: 16px;
    }
    
    .current-month {
        font-size: 18px;
    }
    
    .calendar-today-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}