/* ====================================================================
   付费咨询模块样式 - consult.css
   ==================================================================== */

/* ------------------------------------------------------------------
   1. 咨询 Tab 导航
   ------------------------------------------------------------------ */
.consult-tabs {
    display: flex;
    gap: 0;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 4px;
    margin-bottom: 20px;
}
.consult-tabs .tab-item {
    flex: 1;
    text-align: center;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 15px;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.consult-tabs .tab-item:hover {
    color: #374151;
    background: #f9fafb;
}
.consult-tabs .tab-item.active {
    background: #845ADF;
    color: #fff;
    box-shadow: 0 2px 8px rgba(132, 90, 223, 0.3);
}
.consult-tabs .tab-item .badge {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 10px;
}
.consult-tabs .tab-item.active .badge {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

/* ------------------------------------------------------------------
   2. 侧边栏样式（从 questions 提取的通用样式）
   ------------------------------------------------------------------ */
.sidebar-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    margin-bottom: 16px;
    overflow: hidden;
}
.sidebar-card-header {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sidebar-card-header .title {
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar-card-body {
    padding: 16px;
}

/* ------------------------------------------------------------------
   3. 咨询列表卡片
   ------------------------------------------------------------------ */
.consult-card {
    display: flex;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 20px;
    margin-bottom: 12px;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.consult-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: #d1d5db;
}
.consult-card-body {
    flex: 1;
    min-width: 0;
}
.consult-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.consult-card-title:hover {
    color: #845ADF;
}
.consult-card-summary {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.consult-card-footer {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.consult-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #6b7280;
}
.consult-card-meta a {
    color: #6b7280;
    text-decoration: none;
}
.consult-card-meta a:hover {
    color: #845ADF;
}

/* ------------------------------------------------------------------
   4. 价格徽章
   ------------------------------------------------------------------ */
.price-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}
.price-badge.reward {
    background: #fef3c7;
    color: #b45309;
}
.price-badge.consult {
    background: #ede9fe;
    color: #6d28d9;
}

/* ------------------------------------------------------------------
   5. 状态徽章
   ------------------------------------------------------------------ */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}
.status-badge.open       { background: #d1fae5; color: #065f46; }
.status-badge.pending     { background: #fef3c7; color: #92400e; }
.status-badge.answered    { background: #dbeafe; color: #1e40af; }
.status-badge.completed   { background: #d1fae5; color: #065f46; }
.status-badge.accepted    { background: #ede9fe; color: #5b21b6; }
.status-badge.cancelled   { background: #f3f4f6; color: #6b7280; }
.status-badge.refunded    { background: #fee2e2; color: #991b1b; }
.status-badge.negotiating { background: #fff7ed; color: #9a3412; }

/* ------------------------------------------------------------------
   6. 类型标签
   ------------------------------------------------------------------ */
.type-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}
.type-tag.reward {
    background: #fef3c7;
    color: #92400e;
}
.type-tag.consult {
    background: #ede9fe;
    color: #5b21b6;
}

/* ------------------------------------------------------------------
   7. 专家等级徽章
   ------------------------------------------------------------------ */
.expert-level-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}
.expert-level-badge.trial   { background: #f3f4f6; color: #6b7280; }
.expert-level-badge.junior  { background: #dbeafe; color: #1e40af; }
.expert-level-badge.quality { background: #fef3c7; color: #92400e; }
.expert-level-badge.gold    { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #b45309; border: 1px solid #fbbf24; }

/* ------------------------------------------------------------------
   8. 专家卡片（网格）
   ------------------------------------------------------------------ */
.expert-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.expert-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 24px 20px;
    text-align: center;
    transition: all 0.2s ease;
}
.expert-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: #c4b5fd;
}
.expert-card .avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
    border: 3px solid #f3f4f6;
    display: block;
}
.expert-card .name {
    font-weight: 600;
    color: #111827;
    font-size: 15px;
    margin-bottom: 4px;
}
.expert-card .name a {
    color: inherit;
    text-decoration: none;
}
.expert-card .name a:hover {
    color: #845ADF;
}
.expert-card .expert-title {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.expert-card .stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 12px;
}
.expert-card .stats .value {
    font-weight: 600;
    color: #374151;
}
.expert-card .price {
    font-size: 20px;
    font-weight: 700;
    color: #845ADF;
    margin-bottom: 12px;
}
.expert-card .price small {
    font-size: 12px;
    font-weight: 400;
    color: #9ca3af;
}

/* 专家列表项（横向） */
.expert-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    margin-bottom: 12px;
    transition: box-shadow 0.15s ease;
}
.expert-list-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.expert-list-item .avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.expert-list-item .info {
    flex: 1;
    min-width: 0;
}
.expert-list-item .name {
    font-weight: 600;
    font-size: 15px;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.expert-list-item .desc {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.expert-list-item .meta {
    display: flex;
    gap: 16px;
    margin-top: 6px;
    font-size: 12px;
    color: #9ca3af;
}
.expert-list-item .actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}
.expert-list-item .actions .price {
    font-size: 18px;
    font-weight: 700;
    color: #845ADF;
}

/* ------------------------------------------------------------------
   9. 回答卡片
   ------------------------------------------------------------------ */
.answer-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 20px;
    margin-bottom: 16px;
}
.answer-card.accepted {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
}
.answer-card .answer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.answer-card .author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.answer-card .author-info .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.answer-card .answer-content {
    font-size: 15px;
    line-height: 1.7;
    color: #374151;
}

/* 追问 */
.followup-item {
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 8px;
    margin-top: 12px;
    border-left: 3px solid #845ADF;
}
.followup-item.reply {
    border-left-color: #10b981;
    margin-left: 24px;
}

/* ------------------------------------------------------------------
   10. 协商时间线
   ------------------------------------------------------------------ */
.negotiation-timeline {
    position: relative;
    padding-left: 28px;
}
.negotiation-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}
.timeline-item {
    position: relative;
    padding-bottom: 20px;
}
.timeline-item:last-child {
    padding-bottom: 0;
}
.timeline-item .dot {
    position: absolute;
    left: -24px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #845ADF;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #845ADF;
}
.timeline-item .dot.success { background: #10b981; box-shadow: 0 0 0 2px #10b981; }
.timeline-item .dot.warning { background: #f59e0b; box-shadow: 0 0 0 2px #f59e0b; }
.timeline-item .dot.danger  { background: #ef4444; box-shadow: 0 0 0 2px #ef4444; }
.timeline-item .dot.gray    { background: #9ca3af; box-shadow: 0 0 0 2px #9ca3af; }
.timeline-item .content {
    background: #fff;
    border-radius: 8px;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
}
.timeline-item .time {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 6px;
}

/* ------------------------------------------------------------------
   11. 退款进度
   ------------------------------------------------------------------ */
.refund-progress {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 20px 0;
}
.refund-step {
    flex: 1;
    text-align: center;
}
.refund-step .step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-bottom: 6px;
}
.refund-step.active .step-dot    { background: #845ADF; color: #fff; }
.refund-step.completed .step-dot { background: #10b981; color: #fff; }
.refund-step .step-label         { font-size: 12px; color: #9ca3af; }
.refund-step.active .step-label    { color: #845ADF; font-weight: 500; }
.refund-step.completed .step-label { color: #065f46; }
.refund-step-line {
    flex: 0.5;
    height: 2px;
    background: #e5e7eb;
    margin-bottom: 24px;
}
.refund-step-line.completed { background: #10b981; }

/* ------------------------------------------------------------------
   12. 统计面板
   ------------------------------------------------------------------ */
.stat-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 20px;
    text-align: center;
}
.stat-card .icon   { font-size: 24px; margin-bottom: 8px; }
.stat-card .value  { font-size: 28px; font-weight: 700; color: #111827; }
.stat-card .label  { font-size: 13px; color: #6b7280; margin-top: 4px; }
.stat-card.purple  { border-top: 3px solid #845ADF; }
.stat-card.purple .icon { color: #845ADF; }
.stat-card.green   { border-top: 3px solid #10b981; }
.stat-card.green .icon  { color: #10b981; }
.stat-card.yellow  { border-top: 3px solid #f59e0b; }
.stat-card.yellow .icon { color: #f59e0b; }
.stat-card.blue    { border-top: 3px solid #3b82f6; }
.stat-card.blue .icon   { color: #3b82f6; }

/* ------------------------------------------------------------------
   13. 筛选栏
   ------------------------------------------------------------------ */
.filter-bar {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.filter-bar .filter-label {
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}
.filter-bar .filter-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ------------------------------------------------------------------
   14. 金额输入
   ------------------------------------------------------------------ */
.amount-input-group {
    position: relative;
}
.amount-input-group .currency {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: 600;
    color: #845ADF;
}
.amount-input-group input {
    padding-left: 32px;
    font-size: 18px;
    font-weight: 600;
}
.amount-slider {
    width: 100%;
    accent-color: #845ADF;
}

/* ------------------------------------------------------------------
   15. 空状态
   ------------------------------------------------------------------ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}
.empty-state .icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.6;
}
.empty-state .title {
    font-size: 18px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 8px;
}
.empty-state .desc {
    font-size: 14px;
    margin-bottom: 24px;
    color: #9ca3af;
}

/* ------------------------------------------------------------------
   16. 截止时间
   ------------------------------------------------------------------ */
.deadline-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 13px;
}
.deadline-info.urgent { background: #fee2e2; color: #991b1b; }
.deadline-info.normal { background: #f3f4f6; color: #6b7280; }

/* ------------------------------------------------------------------
   17. 排序按钮组
   ------------------------------------------------------------------ */
.sort-group .btn-sm {
    padding: 5px 14px;
    font-size: 13px;
    border-radius: 6px;
}

/* ------------------------------------------------------------------
   18. 响应式
   ------------------------------------------------------------------ */
@media (max-width: 992px) {
    .expert-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    .consult-card {
        flex-direction: column;
    }
    .expert-list-item {
        flex-direction: column;
        text-align: center;
    }
    .expert-list-item .actions {
        align-items: center;
    }
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .consult-tabs {
        flex-direction: column;
    }
    .consult-tabs .tab-item {
        border-radius: 6px;
    }
    .consult-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}
