/* 万年历月历页样式 */

/* 搜索区（复用基础视觉，日期选择器行） */
.dict-hero {
    text-align: center;
    padding: 30px 0 20px;
}

.dict-hero h1 {
    font-size: 32px;
    color: #2d3748;
    margin-bottom: 10px;
}

.dict-hero h1 i {
    color: #667eea;
    margin-right: 8px;
}

.dict-hero p {
    color: #718096;
    font-size: 16px;
    margin-bottom: 26px;
}

.wnl-picker {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wnl-picker select {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 15px;
    color: #2d3748;
    background: white;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s;
}

.wnl-picker select:focus {
    border-color: #667eea;
}

.wnl-picker button {
    border: none;
    background: #667eea;
    color: white;
    padding: 11px 26px;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.wnl-picker button:hover {
    background: #5a67d8;
}

.today-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 2px solid #667eea;
    color: #667eea;
    background: white;
    padding: 9px 22px;
    border-radius: 10px;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.15s;
}

.today-btn:hover {
    background: #667eea;
    color: white;
}

/* 月历导航 */
.calendar-section {
    margin: 26px 0 40px;
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.calendar-title {
    font-size: 22px;
    color: #2d3748;
    margin: 0;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    padding: 8px 20px;
    color: #4a5568;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.15s;
}

.nav-btn:hover:not(.disabled) {
    border-color: #667eea;
    color: #667eea;
}

.nav-btn.disabled {
    color: #cbd5e0;
    cursor: not-allowed;
    background: #f7fafc;
}

/* 月历主体 */
.calendar {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
}

.cal-weekrow,
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.cal-week {
    text-align: center;
    padding: 14px 0;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    background: #f7fafc;
    border-bottom: 1px solid #edf2f7;
}

.cal-week.weekend {
    color: #e53e3e;
}

.cal-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-height: 92px;
    padding: 10px 6px 8px;
    border-right: 1px solid #edf2f7;
    border-bottom: 1px solid #edf2f7;
    text-decoration: none;
    transition: background 0.15s, box-shadow 0.15s;
}

.cal-cell:nth-child(7n) {
    border-right: none;
}

.cal-cell.blank {
    background: #fafbfc;
    pointer-events: none;
}

.cal-cell:not(.blank):hover {
    background: #f6f8ff;
    box-shadow: inset 0 0 0 2px #667eea;
    z-index: 1;
}

.cal-solar {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
    line-height: 1.2;
}

.cal-cell.today .cal-solar {
    color: #667eea;
}

.cal-cell.today {
    background: #f0f3ff;
    box-shadow: inset 0 0 0 2px #667eea;
}

.cal-lunar {
    font-size: 12px;
    color: #718096;
}

.cal-event {
    font-size: 12px;
    color: #e53e3e;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cal-cell.rest {
    background: #fffafa;
}

.cal-cell.work {
    background: #fffdf5;
}

.cal-badge {
    display: inline-block;
    font-style: normal;
    font-size: 11px;
    border-radius: 4px;
    padding: 0 6px;
    margin-left: 4px;
    vertical-align: middle;
    color: white;
    line-height: 16px;
}

.badge-rest {
    background: #e53e3e;
}

.badge-work {
    background: #dd6b20;
}

.cal-legend {
    margin: 14px 4px 0;
    color: #a0aec0;
    font-size: 13px;
}

.cal-legend i {
    margin-right: 4px;
}

.legend-rest {
    font-style: normal;
    color: #e53e3e;
    font-weight: 700;
}

.legend-work {
    font-style: normal;
    color: #dd6b20;
    font-weight: 700;
}

/* 移动端 */
@media (max-width: 768px) {
    .dict-hero h1 {
        font-size: 24px;
    }

    .cal-cell {
        min-height: 64px;
        padding: 6px 2px;
    }

    .cal-solar {
        font-size: 16px;
    }

    .cal-lunar,
    .cal-event {
        font-size: 11px;
    }

    .cal-badge {
        font-size: 10px;
        padding: 0 4px;
    }

    .calendar-title {
        font-size: 18px;
    }

    .nav-btn {
        padding: 7px 12px;
        font-size: 13px;
    }
}
