/* ============================================================
   每日签到侧边栏小工具
   配色与签到中心一致：主色珊瑚红，成功态浅绿
   外层已由 B2 section.widget.box 提供白底卡片，此处不再画卡片
   ============================================================ */

.b2child-dsign {
    --ds-primary: #fd4c73;
    --ds-primary-2: #ff6a4d;
    --ds-text: #22252e;
    --ds-text-sub: #9aa0ab;
    --ds-line: #f0f1f4;
    --ds-success-bg: #e9f9f0;
    --ds-success-text: #23a064;
    --ds-success-line: #cdeede;
}

/* ---------- 头部 ---------- */

.b2child-dsign .ds-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.b2child-dsign .ds-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ds-text);
}

.b2child-dsign .ds-wave {
    display: block;
    width: 24px;
    height: 5px;
    margin-top: 3px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 6'%3E%3Cpath d='M1 3 Q4 0.5 7 3 T13 3 T19 3 T25 3' fill='none' stroke='%23fd4c73' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.b2child-dsign .ds-more {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    line-height: 1;
    color: var(--ds-text-sub);
    text-decoration: none;
    transition: color .2s;
}

.b2child-dsign .ds-more .b2font {
    font-size: 12px;
}

.b2child-dsign .ds-more:hover {
    color: var(--ds-primary);
}

/* ---------- 统计数字 ---------- */

.b2child-dsign .ds-stats {
    display: flex;
    margin-bottom: 14px;
}

.b2child-dsign .ds-stat {
    flex: 1;
    text-align: center;
}

.b2child-dsign .ds-stat:first-child {
    border-right: 1px solid var(--ds-line);
}

.b2child-dsign .ds-stat b {
    display: block;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--ds-text);
}

.b2child-dsign .ds-stat span {
    font-size: 12px;
    color: var(--ds-text-sub);
}

/* ---------- 签到按钮 ---------- */

.b2child-dsign .ds-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 40px;
    margin: 0 0 16px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: filter .2s, background-color .2s;
}

.b2child-dsign .ds-btn .b2font {
    font-size: 16px;
}

.b2child-dsign .ds-btn-go {
    color: #fff;
    background: linear-gradient(120deg, var(--ds-primary), var(--ds-primary-2) 60%, #ff9040);
    box-shadow: 0 6px 14px rgba(253, 76, 115, .22);
}

.b2child-dsign .ds-btn-go:hover:not(:disabled) {
    filter: brightness(1.05);
}

.b2child-dsign .ds-btn-go:active:not(:disabled) {
    filter: brightness(.96);
}

.b2child-dsign .ds-btn-done {
    color: var(--ds-success-text);
    background: var(--ds-success-bg);
    border: 1px solid var(--ds-success-line);
    cursor: default;
}

.b2child-dsign .ds-btn-loading {
    color: var(--ds-text-sub);
    background: #f4f5f7;
    cursor: wait;
}

.b2child-dsign .ds-btn-loading .b2font {
    font-size: 14px;
}

.b2child-dsign .ds-btn:disabled {
    box-shadow: none;
}

/* CSS 旋转环（b2font 无加载图标，用纯样式实现，非 Emoji） */
.b2child-dsign .ds-spin {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ds-rotate .7s linear infinite;
}

@keyframes ds-rotate {
    to { transform: rotate(360deg); }
}

/* ---------- 本周日历 ---------- */

.b2child-dsign .ds-week {
    margin-bottom: 14px;
}

.b2child-dsign .ds-week-head,
.b2child-dsign .ds-week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    justify-items: center;
}

.b2child-dsign .ds-week-head {
    margin-bottom: 8px;
}

.b2child-dsign .ds-week-head span {
    font-size: 12px;
    color: var(--ds-text-sub);
}

.b2child-dsign .ds-week-head span.is-today {
    color: var(--ds-primary);
    font-weight: 700;
}

.b2child-dsign .ds-day {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    font-size: 12px;
    font-style: normal;
    border-radius: 50%;
    background: #f4f5f7;
    color: #b6bac4;
    user-select: none;
}

.b2child-dsign .ds-day .b2font {
    font-size: 14px;
}

.b2child-dsign .ds-day.is-signed {
    color: #fff;
    background: linear-gradient(135deg, var(--ds-primary), var(--ds-primary-2));
    box-shadow: 0 3px 8px rgba(253, 76, 115, .28);
}

.b2child-dsign .ds-day.is-current {
    background: #fff;
    color: var(--ds-primary);
    border: 1.5px solid var(--ds-primary);
    font-weight: 700;
}

.b2child-dsign .ds-day.is-future {
    background: transparent;
    border: 1px dashed #dde0e6;
}

/* ---------- 底部今日签到 ---------- */

.b2child-dsign .ds-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--ds-line);
    color: var(--ds-text);
    text-decoration: none;
}

.b2child-dsign a.ds-foot:hover {
    color: var(--ds-text);
}

.b2child-dsign .ds-foot-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--ds-text-sub);
    white-space: nowrap;
}

.b2child-dsign .ds-foot-label .b2font {
    font-size: 14px;
    color: var(--ds-primary);
}

.b2child-dsign .ds-foot-label b {
    font-weight: 700;
    color: var(--ds-text);
}

.b2child-dsign .ds-avatars {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.b2child-dsign .ds-avatar {
    width: 22px;
    height: 22px;
    margin-left: -8px;
    border: 2px solid #fff;
    border-radius: 50%;
    object-fit: cover;
    background: #f4f5f7;
}

.b2child-dsign .ds-avatar:first-child {
    margin-left: 0;
}
