/* ============================================
   活动报名卡片样式
   适配 wx_card 系统 + 深色模式
   ============================================ */

/* ── CSS 变量（亮色默认值） ── */
.Attend {
    --card-bg: #fff;
    --card-text: #333;
    --card-text-secondary: #666;
    --card-text-muted: #888;
    --card-border: rgba(0,0,0,.06);
    --card-shadow: 0 2px 12px rgba(0,0,0,0.06);
    --header-bg: rgba(0,0,0,.03);
    --header-text: inherit;
    --header-border: rgba(0,0,0,.125);
    --divider: rgba(0,0,0,.06);
    --li-border: rgba(0,0,0,.03);
    --members-hover: rgba(0,0,0,.02);

    display: block;
    width: 100%;
    padding: 30px 0;
}
.Attend * {
    margin: 0;
    text-indent: 0 !important;
}

/* ── 深色模式 ── */
html[data-theme="dark"] .Attend {
    --card-bg: #1e1e2a;
    --card-text: #c0c0d0;
    --card-text-secondary: #888;
    --card-text-muted: #666;
    --card-border: #3a3a50;
    --card-shadow: 0 2px 8px rgba(0,0,0,0.3);
    --header-bg: #2a2a3c;
    --header-text: #c0c0d0;
    --header-border: #3a3a50;
    --divider: #3a3a50;
    --li-border: #3a3a50;
    --members-hover: rgba(255,255,255,.04);
}

/* ── 卡片容器 ── */
.Attend_item {
    border: 1px solid var(--card-border);
    background-color: var(--card-bg);
    border-radius: 3px;
    box-shadow: var(--card-shadow);
    color: var(--card-text);
}
.Attend_item + .Attend_item {
    margin-top: 12px;
}
.Attend_item span {
    display: inline;
}

/* ── 卡片头部（wx_card 风格） ── */
.Attend_header {
    font-size: 14px;
    font-weight: 600;
    padding: 10px 16px;
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    color: var(--header-text);
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 3px 3px 0 0;
}
.Attend_header .header-badge {
    margin-left: auto;
    background: rgba(0,0,0,.05);
    padding: 1px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 400;
    color: #999;
}
html[data-theme="dark"] .Attend_header .header-badge {
    background: rgba(255,255,255,.08);
    color: #888;
}

/* ── wx_card 开启 → 渐变头部 ── */
.Attend.wx-card-gradient .Attend_header {
    background: linear-gradient(135deg, #e17055 0%, #fdcb6e 100%);
    color: #fff;
    border-bottom: none;
}
.Attend.wx-card-gradient .Attend_header .header-badge {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* ── 信息卡片 ── */
.Attend_info {
    padding: 12px 16px;
}
.Attend_info_row {
    display: flex;
    align-items: baseline;
    line-height: 1.8;
    font-size: 14px;
    color: var(--card-text);
}
.Attend_label {
    color: var(--card-text-secondary) !important;
    min-width: 48px;
    flex-shrink: 0;
    font-size: 13px;
}
.Attend_divider {
    height: 1px;
    background: var(--divider);
    margin: 8px 0;
}

/* ── 报名操作区 ── */
.Attend_action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 12px;
}
.Attend_action_info {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.Attend_action_info .text-muted {
    color: var(--card-text-muted) !important;
    font-size: 13px;
}
.Attend_action_btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.Attend_hint {
    font-size: 12px !important;
    color: var(--card-text-muted) !important;
}

/* ── 签到二维码 ── */
.Attend .Attend_item .signInQrcode {
    display: block;
    width: 150px;
    height: 150px;
    margin-bottom: 8px;
}
.Attend .Attend_item .signInQrcode img {
    width: 100%;
    height: 100%;
}

/* ── 状态标签 ── */
.Attend .Attend_item .Alert {
    position: relative;
    padding: 3px 10px;
    border: 1px solid transparent;
    border-radius: .25rem;
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
    display: inline-block;
    font-size: 12px;
}
html[data-theme="dark"] .Attend .Attend_item .Alert {
    color: #7dff7d;
    background-color: #1a2a1a;
    border-color: #2a4a2a;
}

/* ── 报名按钮 ── */
.Attend .Attend_item .attend_btn {
    display: inline-block;
    padding: 6px 20px;
    background-color: #16baaa;
    color: white;
    border-radius: 3px;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
}
.Attend .Attend_item .attend_btn:hover {
    opacity: 0.85;
}

/* ── 成员列表折叠区 ── */
.Attend_members_header {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    color: var(--card-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}
.Attend_members_header:hover {
    background-color: var(--members-hover);
}
.toggle_arrow {
    font-size: 14px;
    color: var(--card-text-muted) !important;
    transition: transform .2s;
}

/* ── 成员列表 ── */
.Attend .Attend_item .Events_Users {
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--card-border);
}
.Attend .Attend_item .Events_Users li {
    line-height: 2;
    display: flex;
    align-items: center;
    padding: 5px 16px;
    font-size: 13px;
    color: var(--card-text);
}
.Attend .Attend_item .Events_Users li .Eauthor {
    margin-left: 4px;
    color: var(--card-text);
}
.Attend .Attend_item .Events_Users li + li {
    border-top: 1px solid var(--li-border);
}
.Attend .Attend_item .Events_Users li span.badge {
    background-color: #16baaa;
    color: white;
    padding: 2px 6px;
    font-size: 75%;
    display: inline-block;
    margin-left: auto;
    border-radius: 3px;
    line-height: 1.5;
}
.Attend .Attend_item .Events_Users li span.badge.initiator {
    background-color: #d35400;
    margin-left: 6px;
}
.Attend .Attend_item .Events_Users li span.badge.assistant {
    background-color: #27ae60;
    color: #fff;
    margin-left: 6px;
}
.Attend .Attend_item .Events_Users li span.badge.me {
    background-color: #e67e22;
    margin-left: 6px;
}
.Attend .Attend_item .Events_Users li a.badge.remove {
    background-color: #dc3545;
    color: #fff;
    padding: 2px 6px;
    font-size: 75%;
    display: inline-block;
    margin-left: 6px;
    border-radius: 3px;
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
}
.Attend .Attend_item .Events_Users li a.badge.remove:hover {
    background-color: #c82333;
}

/* ── 签到成功反馈 ── */
.signInSuccess {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    background: #d4edda;
    border: 2px solid #c3e6cb;
    border-radius: 8px;
    color: #155724;
    font-size: 16px;
    font-weight: bold;
    animation: signInPop .4s ease;
}
html[data-theme="dark"] .signInSuccess {
    background: #1a2a1a;
    border-color: #2a4a2a;
    color: #7dff7d;
}
@keyframes signInPop {
    0% { opacity: 0; transform: scale(.8); }
    50% { transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

/* ── 自定义 Toast 弹窗 ── */
.wx-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999999;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    animation: wxToastIn .35s ease;
    max-width: 460px;
    background: #fff;
    color: #333;
    border: 1px solid rgba(0,0,0,0.06);
    line-height: 1.5;
}
html[data-theme="dark"] .wx-toast {
    background: #2a2a3c;
    color: #c0c0d0;
    border-color: #3a3a50;
    box-shadow: 0 8px 30px rgba(0,0,0,0.35);
}
.wx-toast .wx-toast-icon {
    font-size: 22px;
    font-weight: 700;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.wx-toast.wx-toast-success .wx-toast-icon {
    background: #e8f8e8;
    color: #27ae60;
}
html[data-theme="dark"] .wx-toast.wx-toast-success .wx-toast-icon {
    background: rgba(39,174,96,0.2);
    color: #4cdb7a;
}
.wx-toast.wx-toast-error .wx-toast-icon {
    background: #fce8e8;
    color: #e74c3c;
}
html[data-theme="dark"] .wx-toast.wx-toast-error .wx-toast-icon {
    background: rgba(231,76,60,0.2);
    color: #ff6b6b;
}
.wx-toast.wx-toast-info .wx-toast-icon {
    background: #e8f0fe;
    color: #3498db;
}
html[data-theme="dark"] .wx-toast.wx-toast-info .wx-toast-icon {
    background: rgba(52,152,219,0.2);
    color: #5dade2;
}
@keyframes wxToastIn {
    from { opacity: 0; transform: translate(-50%, -60%); }
    to   { opacity: 1; transform: translate(-50%, -50%); }
}
.wx-toast.wx-toast-hide {
    opacity: 0;
    transform: translate(-50%, -60%);
    transition: opacity .3s, transform .3s;
}

/* ── 报名条件列表 ── */
.Attend_conditions {
    padding: 8px 16px;
}
.Attend_cond_row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    line-height: 1.8;
    padding: 2px 0;
}
.Attend_cond_row .cond_icon {
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}
.Attend_cond_row.met .cond_icon { color: #27ae60; }
.Attend_cond_row.unmet .cond_icon { color: #e74c3c; }
.Attend_cond_row.unmet .cond_text { color: #e74c3c; }
.Attend_cond_row .cond_hint {
    color: #999;
    font-size: 12px;
    margin-left: 2px;
}
html[data-theme="dark"] .Attend_cond_row .cond_hint { color: #666; }
html[data-theme="dark"] .Attend_cond_row.met .cond_icon { color: #4cdb7a; }
html[data-theme="dark"] .Attend_cond_row.unmet .cond_icon,
html[data-theme="dark"] .Attend_cond_row.unmet .cond_text { color: #ff6b6b; }

