/**
 * 优惠券管理模块样式
 * Coupon Management Module Styling
 */

/* ==================== 表格样式 ==================== */
.coupon-table {
    font-size: 13px;
}

.coupon-table th {
    font-weight: 600;
    color: #333;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    padding: 12px 8px;
    white-space: nowrap;
}

.coupon-table td {
    padding: 12px 8px;
    vertical-align: middle;
    border-bottom: 1px solid #eee;
}

.coupon-table tbody tr:hover {
    background-color: #f5f7fa;
}

/* ==================== 优惠券名称样式 ==================== */
.coupon-name {
    font-weight: 500;
    color: var(--text-primary, #333);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

.coupon-name:hover {
    color: var(--primary-color, #667eea);
}

.coupon-id {
    font-size: 11px;
    color: var(--text-disabled, #999);
    margin-top: 2px;
}

/* ==================== 状态标签样式 ==================== */
.coupon-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* 生效中 - 绿色 */
.coupon-status.coupon-status-active {
    background-color: #e6f7e6;
    color: #52c41a;
}

/* 未开始 - 橙色 */
.coupon-status.coupon-status-pending {
    background-color: #fff7e6;
    color: #faad14;
}

/* 已结束 - 灰色 */
.coupon-status.coupon-status-ended {
    background-color: #f5f5f5;
    color: #999;
}

/* 未知状态 */
.coupon-status.coupon-status-unknown {
    background-color: #f5f5f5;
    color: #666;
}

/* ==================== 推广方式标签样式 ==================== */
.coupon-support-type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* 全网公开推广 - 蓝色 */
.coupon-support-type.support-public {
    background-color: #e6f4ff;
    color: #1890ff;
}

/* 领券中心渠道 - 紫色 */
.coupon-support-type.support-center {
    background-color: #f9f0ff;
    color: #722ed1;
}

/* 未知类型 */
.coupon-support-type.support-unknown {
    background-color: #f5f5f5;
    color: #666;
}

/* 高潜转化用户券 - 橙色 */
.coupon-support-type.support-high-potential {
    background-color: #fff7e6;
    color: #fa8c16;
}

/* 购物车营销券 - 绿色 */
.coupon-support-type.support-cart {
    background-color: #e6f7e6;
    color: #52c41a;
}

/* 复购券 - 红色 */
.coupon-support-type.support-repurchase {
    background-color: #fff1f0;
    color: #f5222d;
}

/* ==================== 优惠券类型标签样式 ==================== */
.coupon-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
    margin-top: 4px;
}

.coupon-type-badge.badge-high-potential {
    background-color: #fff7e6;
    color: #fa8c16;
    border: 1px solid #ffd591;
}

.coupon-type-badge.badge-cart {
    background-color: #e6f7e6;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.coupon-type-badge.badge-default {
    background-color: #f5f5f5;
    color: #666;
    border: 1px solid #d9d9d9;
}

/* ==================== 优惠内容样式 ==================== */
.discount-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.discount-value {
    font-weight: 600;
    color: #ff4d4f;
    font-size: 14px;
}

.discount-scope {
    font-size: 11px;
    color: #999;
}

/* ==================== 时间信息样式 ==================== */
.coupon-time-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
}

.coupon-time-info .time-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.coupon-time-info .time-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
}

/* 领 - 绿色 */
.coupon-time-info .time-item:first-child .time-label {
    background-color: #52c41a;
}

/* 用 - 蓝色 */
.coupon-time-info .time-item:last-child .time-label {
    background-color: #1890ff;
}

/* ==================== 店铺名称样式 ==================== */
.shop-name-cell {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #666;
}

/* ==================== 自动续期开关样式 ==================== */
.coupon-table .form-check-input {
    width: 2.5em;
    height: 1.25em;
    cursor: pointer;
}

.coupon-table .form-check-input:checked {
    background-color: #52c41a;
    border-color: #52c41a;
}

.coupon-table .form-check-input:focus {
    border-color: #52c41a;
    box-shadow: 0 0 0 0.2rem rgba(82, 196, 26, 0.25);
}

/* ==================== 筛选卡片样式 ==================== */
#couponTab .card,
#couponCenterTab .card {
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
}

#couponTab .card-body,
#couponCenterTab .card-body {
    padding: 16px;
}

/* ==================== 分页样式优化 ==================== */
.coupon-table + nav .pagination {
    margin-bottom: 0;
}

.coupon-table + nav .page-link {
    padding: 6px 12px;
    font-size: 13px;
}

/* ==================== 空状态和加载状态 ==================== */
.coupon-table tbody .text-muted i {
    font-size: 3rem;
    color: #d9d9d9;
}

.coupon-table tbody .text-muted p {
    color: #999;
    font-size: 14px;
}

/* ==================== 响应式调整 ==================== */
@media (max-width: 1200px) {
    .coupon-table th,
    .coupon-table td {
        padding: 10px 6px;
    }
    
    .coupon-name {
        max-width: 140px;
    }
    
    .shop-name-cell {
        max-width: 80px;
    }
}
