/* --------------------------------------------------------------------------
   6.2 Checkin Calendar - 签到日历
   -------------------------------------------------------------------------- */

/* ==================== 签到日历样式 ==================== */

/* 签到日历模态框 */
.uap-checkin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
}

.uap-checkin-modal {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: uapModalIn 0.25s ease-out;
}

.uap-checkin-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.uap-checkin-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.uap-checkin-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.15s;
    padding: 0;
}

.uap-checkin-modal-close svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke: currentColor;
}

.uap-checkin-modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.uap-checkin-modal-close:focus {
    outline: none;
    background: #e5e7eb;
}

.uap-checkin-modal .uap-checkin-stats {
    display: flex;
    justify-content: space-around;
    padding: 16px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    margin-bottom: 16px;
}

/* 连续签到奖励信息 */
.uap-streak-bonus-info {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 16px;
    border: 1px solid #fde68a;
}

.uap-streak-bonus-title {
    display: block;
    font-size: 12px;
    color: #92400e;
    margin-bottom: 10px;
    font-weight: 500;
    text-align: center;
}

.uap-streak-bonus-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.uap-streak-bonus-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    font-size: 12px;
    border: 1px solid #fcd34d;
    transition: all 0.2s;
}

.uap-streak-bonus-item.achieved {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

.uap-streak-bonus-item .uap-bonus-days {
    font-weight: 500;
    color: #78350f;
}

.uap-streak-bonus-item .uap-bonus-points {
    font-weight: 700;
    color: #d97706;
}

.uap-streak-bonus-item.achieved .uap-bonus-days,
.uap-streak-bonus-item.achieved .uap-bonus-points {
    color: #fff;
}

.uap-checkin-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid #f0f0f0;
}

.uap-checkin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.uap-checkin-header .uap-section-title {
    margin: 0;
}

.uap-checkin-stats {
    display: flex;
    gap: 24px;
}

.uap-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.uap-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
}

.uap-stat-label {
    font-size: 12px;
    color: #9ca3af;
}

/* 日历容器 */
.uap-calendar-container {
    background: #fafafa;
    border-radius: 10px;
    padding: 16px;
}

/* 日历导航 */
.uap-calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.uap-calendar-prev,
.uap-calendar-next {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.15s;
    padding: 0;
}

.uap-calendar-prev svg,
.uap-calendar-next svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke: currentColor;
}

.uap-calendar-prev:hover:not(:disabled),
.uap-calendar-next:hover:not(:disabled),
.uap-calendar-prev:focus:not(:disabled),
.uap-calendar-next:focus:not(:disabled) {
    background: #f3f4f6;
    color: #1f2937;
}

.uap-calendar-prev:focus,
.uap-calendar-next:focus {
    outline: none;
    background: #f3f4f6;
    border-color: #d1d5db;
}

.uap-calendar-prev:disabled,
.uap-calendar-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.uap-calendar-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

/* 星期标题 */
.uap-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.uap-calendar-weekdays span {
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
    padding: 8px 0;
}

/* 日期网格 */
.uap-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.uap-calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 8px;
    position: relative;
    transition: all 0.15s;
}

.uap-calendar-day.empty {
    background: transparent;
}

.uap-calendar-day .day-num {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    line-height: 1;
}

/* 今天 */
.uap-calendar-day.today {
    background: #f0f9ff;
    border: 2px solid #3b82f6;
}

.uap-calendar-day.today .day-num {
    color: #3b82f6;
    font-weight: 600;
}

/* 已签到 - 简洁绿色圆点设计 */
.uap-calendar-day.checked {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.uap-calendar-day.checked::after {
    content: '';
    position: absolute;
    bottom: 6px;
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
}

.uap-calendar-day.checked .day-num {
    color: #059669;
    font-weight: 600;
}

.uap-calendar-day.checked.today {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #10b981;
}

/* 未来日期 */
.uap-calendar-day.future {
    opacity: 0.4;
}

.uap-calendar-day.future .day-num {
    color: #d1d5db;
}

/* 移动端适配 */
@media (max-width: 640px) {
    .uap-checkin-modal {
        padding: 20px;
        border-radius: 12px;
        max-width: calc(100% - 32px);
    }

    .uap-checkin-modal-title {
        font-size: 16px;
    }

    .uap-checkin-modal .uap-checkin-stats {
        padding: 12px;
        gap: 8px;
    }

    .uap-checkin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .uap-checkin-stats {
        width: 100%;
        justify-content: space-around;
    }

    .uap-stat-value {
        font-size: 18px;
    }

    .uap-calendar-day .day-num {
        font-size: 13px;
    }

    .uap-calendar-day.checked::after {
        width: 5px;
        height: 5px;
        bottom: 5px;
    }
}

