/**
 * 子比帖子前缀插件 - 前端样式
 * 
 * 包含：
 * 1. 前缀标签样式
 * 2. 薪资标签样式
 * 3. 发帖表单样式
 */

/* ============================================
   一、前缀标签基础样式
   ============================================ */

.badge-prefix {
    display: inline-block;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.6;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
}

/* 蓝色 */
.badge-prefix.jb-blue {
    background-color: rgba(52, 152, 219, 0.15);
    color: #3498db;
}

/* 绿色 */
.badge-prefix.jb-green {
    background-color: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}

/* 红色 */
.badge-prefix.jb-red {
    background-color: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

/* 黄色 */
.badge-prefix.jb-yellow {
    background-color: rgba(241, 196, 15, 0.15);
    color: #f39c12;
}

/* 紫色 */
.badge-prefix.jb-purple {
    background-color: rgba(155, 89, 182, 0.15);
    color: #9b59b6;
}

/* 青色 */
.badge-prefix.jb-cyan {
    background-color: rgba(26, 188, 156, 0.15);
    color: #1abc9c;
}

/* 橙色 */
.badge-prefix.jb-orange {
    background-color: rgba(230, 126, 34, 0.15);
    color: #e67e22;
}

/* 粉色 */
.badge-prefix.jb-pink {
    background-color: rgba(233, 30, 99, 0.15);
    color: #e91e63;
}

/* ============================================
   二、薪资标签样式
   ============================================ */

.badge-salary {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    border-radius: 2px;
    vertical-align: middle;
    background-color: rgba(230, 126, 34, 0.12);
    color: #e67e22;
}

/* 薪资标签悬停效果 */
.badge-salary:hover {
    background-color: rgba(230, 126, 34, 0.2);
}

/* ============================================
   三、发帖表单样式
   ============================================ */

.salary-field-wrapper {
    background-color: var(--main-bg-color);
    border-radius: var(--main-radius);
    padding: 15px;
    box-shadow: 0 0 10px var(--main-shadow);
}

.salary-field-wrapper .salary-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--main-border-color, #e5e5e5);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: var(--main-bg-color);
    color: var(--main-color);
}

.salary-field-wrapper .salary-input:focus {
    outline: none;
    border-color: var(--key-color);
    box-shadow: 0 0 0 2px rgba(var(--key-color-rgb, 52, 152, 219), 0.2);
}

.salary-field-wrapper .salary-input::placeholder {
    color: var(--muted-color, #999);
}

/* ============================================
   四、列表标题样式优化
   ============================================ */

/* 帖子列表中的标题样式 */
.forum-posts .forum-title .badge-prefix,
.forum-posts .forum-title .badge-salary {
    margin-top: -2px;
}

/* 小屏幕适配 */
@media (max-width: 768px) {
    .badge-prefix {
        font-size: 11px;
        padding: 0 6px;
    }
    
    .badge-salary {
        font-size: 11px;
        padding: 2px 6px;
    }
    
    .salary-field-wrapper {
        padding: 12px;
    }
    
    .salary-field-wrapper .salary-input {
        padding: 8px 10px;
        font-size: 13px;
    }
}

/* ============================================
   五、详情页薪资显示
   ============================================ */

/* 帖子详情页薪资信息 */
.job-salary-info {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    background-color: rgba(230, 126, 34, 0.1);
    border-radius: 4px;
    margin-bottom: 15px;
}

.job-salary-info .salary-label {
    font-size: 13px;
    color: var(--muted-2-color, #666);
    margin-right: 8px;
}

.job-salary-info .salary-value {
    font-size: 16px;
    font-weight: 600;
    color: #e67e22;
}

/* ============================================
   六、深色模式适配
   ============================================ */

.theme-dark .badge-prefix.jb-blue {
    background-color: rgba(52, 152, 219, 0.25);
}

.theme-dark .badge-prefix.jb-green {
    background-color: rgba(46, 204, 113, 0.25);
}

.theme-dark .badge-prefix.jb-red {
    background-color: rgba(231, 76, 60, 0.25);
}

.theme-dark .badge-prefix.jb-yellow {
    background-color: rgba(241, 196, 15, 0.25);
}

.theme-dark .badge-prefix.jb-purple {
    background-color: rgba(155, 89, 182, 0.25);
}

.theme-dark .badge-prefix.jb-cyan {
    background-color: rgba(26, 188, 156, 0.25);
}

.theme-dark .badge-prefix.jb-orange {
    background-color: rgba(230, 126, 34, 0.25);
}

.theme-dark .badge-prefix.jb-pink {
    background-color: rgba(233, 30, 99, 0.25);
}

.theme-dark .badge-salary {
    background-color: rgba(230, 126, 34, 0.2);
}

/* ============================================
   七、动画效果
   ============================================ */

.badge-prefix,
.badge-salary {
    transition: all 0.2s ease;
}

.badge-prefix:hover,
.badge-salary:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
