/* ============================================
   [B2CHILD] 2026-07-08 财富页 — 抽奖中奖记录面板
   影响: b2child/Sidebars/sidebar.php gold 区块
   v2: 纵向卡片布局 — 金额徽章 + 卡号凹槽 + 底栏操作
   ============================================ */

/* === 面板容器 === */
.diy-gold-lottery .widget-title {
    display: flex !important;
    align-items: center;
    gap: 6px;
    padding: 14px 16px 10px !important;
    margin: 0 !important;
    border-bottom: 1px solid #f3f4f6 !important;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
}
.diy-gold-lottery-title-icon {
    font-size: 16px;
    line-height: 1;
}

.diy-gold-lottery-inner {
    padding: 0 0 8px;
    min-height: 60px;
}

/* === 加载中 === */
.diy-gold-lottery-loading {
    text-align: center;
    padding: 20px 0;
    font-size: 12px;
    color: #9ca3af;
}

/* === 空状态 === */
.diy-gold-lottery-empty {
    text-align: center;
    padding: 24px 16px;
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.8;
}
.diy-gold-lottery-empty-icon {
    font-size: 28px;
    display: block;
    margin-bottom: 8px;
}
.diy-gold-lottery-empty a {
    color: var(--b2color, #009966);
    font-weight: 600;
    text-decoration: none;
}
.diy-gold-lottery-empty a:hover {
    text-decoration: underline;
}

/* ===== 单条记录 ===== */
.diy-gold-lottery-item {
    padding: 14px 16px 12px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.15s;
}
.diy-gold-lottery-item:last-child {
    border-bottom: none;
}
.diy-gold-lottery-item:hover {
    background: #fafbfc;
}

/* === 顶部行：金额徽章 + 标签 === */
.diy-gold-lottery-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.diy-gold-lottery-badge {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    font-weight: 700;
    line-height: 1.2;
}
.diy-gold-lottery-badge.win {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: #059669;
}
.diy-gold-lottery-badge.redeemed {
    background: #f3f4f6;
    color: #9ca3af;
}
.diy-gold-lottery-badge-amount {
    font-size: 15px;
}
.diy-gold-lottery-badge-unit {
    font-size: 10px;
    font-weight: 500;
}
.diy-gold-lottery-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}
.diy-gold-lottery-label b {
    color: var(--b2color, #009966);
    font-weight: 700;
}

/* === 中间：卡号凹槽背景框（独占一行） === */
.diy-gold-lottery-card-box {
    position: relative;
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f2f3f5;
    /* 凹下质感：内阴影 */
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.08), inset 0 -1px 0 rgba(255,255,255,0.6);
    overflow: hidden;
}
/* 顶部细亮线增强立体感 */
.diy-gold-lottery-card-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0,0,0,0.06);
    border-radius: 8px 8px 0 0;
    pointer-events: none;
}
.diy-gold-lottery-card-num {
    display: block;
    font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    letter-spacing: 0.3px;
    line-height: 1.5;
    word-break: break-all;
}
.diy-gold-lottery-card-num.masked {
    color: #b0b7c3;
}
.diy-gold-lottery-card-label {
    font-size: 10px;
    color: #9ca3af;
    margin-right: 6px;
    font-weight: 500;
}

/* === 底部行：时间 + 操作按钮 === */
.diy-gold-lottery-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.diy-gold-lottery-time {
    color: #9ca3af;
    font-size: 11px;
}

/* 兑换按钮 */
.diy-gold-lottery-redeem-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 5px 14px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--b2color, #009966), color-mix(in srgb, var(--b2color, #009966) 75%, #004d33));
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.4;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,153,102,0.2);
}
.diy-gold-lottery-redeem-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,153,102,0.3);
}
.diy-gold-lottery-redeem-btn:active {
    transform: scale(0.96);
}
.diy-gold-lottery-redeem-btn.redeeming {
    background: #b0b7c3;
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
}

/* 已兑换标签 */
.diy-gold-lottery-redeemed-label {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 12px;
    border-radius: 12px;
    background: #f3f4f6;
    color: #9ca3af;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

/* === 分页 === */
.diy-gold-lottery-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 16px 14px;
    border-top: 1px solid #f3f4f6;
}
.diy-gold-lottery-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    transition: all 0.15s;
    padding: 0;
}
.diy-gold-lottery-page-btn:hover:not(:disabled) {
    border-color: var(--b2color, #009966);
    color: var(--b2color, #009966);
}
.diy-gold-lottery-page-btn:disabled {
    opacity: 0.35;
    cursor: default;
}
.diy-gold-lottery-page-info {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
    min-width: 50px;
    text-align: center;
}
