/**
 * 职位列表页样式 - 三列布局重构版
 */

/* ========== 三列整体布局 ========== */
.jobs-three-col {
    display: grid;
    grid-template-columns: 220px 1fr 220px;
    gap: 20px;
    align-items: flex-start;
    padding: 10px 0 40px;
}

/* ========== 左侧筛选栏 ========== */
.jobs-filter-sidebar {
    position: sticky;
    top: 120px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}
.jobs-filter-sidebar::-webkit-scrollbar { width: 3px; }
.jobs-filter-sidebar::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }

/* 折叠面板 */
.fc {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid #eef0f4;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.fc:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.fc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}
.fc-head:hover {
    background: #f8f9fb;
}
.fc-head span {
    display: flex;
    align-items: center;
    gap: 5px;
}
.fc-arrow {
    font-size: 10px;
    color: #bbb;
    transition: transform 0.2s;
    font-style: normal;
}
.fc-body {
    padding: 10px 12px 12px;
    border-top: 1px solid #f2f3f6;
}

/* 下拉选择框 */
.fc-selects {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.fc-sel {
    width: 100%;
    padding: 7px 28px 7px 10px;
    border: 1px solid #e4e7ec;
    border-radius: 6px;
    font-size: 12px;
    color: #333;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 3.5l3.5 3.5 3.5-3.5' stroke='%23aaa' stroke-width='1.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 8px center;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.fc-sel:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.08);
}
.fc-sel-sub {
    margin-left: 8px;
    background-color: #fafbfd;
    border-color: #edf0f4;
}

/* 标签 */
.fc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.ft {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
    background: #f4f5f7;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}
.ft:hover {
    background: #e0edfb;
    color: #2563eb;
}
.ft-on {
    background: #2563eb;
    color: #fff;
    font-weight: 500;
}

/* 清除按钮 */
.fc-clear {
    display: inline-block;
    margin-top: 8px;
    font-size: 11px;
    color: #999;
    text-decoration: none;
    padding: 2px 8px;
    border-radius: 4px;
    transition: all 0.15s;
}
.fc-clear:hover {
    color: #2563eb;
    background: rgba(37,99,235,0.05);
}

/* 旧样式兼容清理 */
.filter-card { background: #fff; border-radius: 10px; padding: 14px 14px 10px; margin-bottom: 14px; box-shadow: 0 1px 6px rgba(0,0,0,0.06); border: 1px solid #f0f0f0; }
.filter-card-title { font-size: 13px; font-weight: 700; color: #333; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #f5f5f5; display: flex; align-items: center; gap: 5px; }
.filter-card-icon { font-size: 14px; }
.tag-group { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-tag { display: inline-block; padding: 5px 12px; border-radius: 6px; font-size: 12px; color: #555; background: #f5f6f8; border: 1px solid #eef0f3; text-decoration: none; transition: all 0.15s ease; white-space: nowrap; cursor: pointer; line-height: 1.4; }
.filter-tag:hover { background: #e8f4fd; color: #2563eb; border-color: #b3d9f7; }
.filter-tag.active { background: #2563eb; color: #fff; border-color: #2563eb; font-weight: 500; box-shadow: 0 2px 6px rgba(37,99,235,0.25); }
.filter-level { margin-bottom: 6px; }
.filter-level:last-child { margin-bottom: 0; }
.filter-level-label { font-size: 11px; color: #999; margin-bottom: 6px; padding-left: 2px; }
.filter-level-2 { padding-left: 4px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed #eef0f3; }
.filter-level-3 { padding-left: 4px; margin-top: 6px; padding-top: 6px; border-top: 1px dashed #f0f2f5; }
.filter-level-2 .filter-tag, .filter-level-3 .filter-tag { font-size: 11px; padding: 3px 10px; }
.filter-clear-btn { display: block; margin-top: 10px; font-size: 12px; color: #999; text-decoration: none; text-align: center; padding: 5px 0; border-radius: 6px; transition: all 0.2s; }
.filter-clear-btn:hover { color: #2563eb; background: rgba(37,99,235,0.04); }
.cascade-group { display: flex; flex-direction: column; gap: 6px; }
.cascade-select { width: 100%; padding: 9px 32px 9px 12px; border: 1.5px solid #e8ecf1; border-radius: 8px; font-size: 13px; color: #333; background: #fff; -webkit-appearance: none; appearance: none; cursor: pointer; outline: none; transition: all 0.2s; box-sizing: border-box; }
.cascade-sub { margin-left: 10px; font-size: 12px; padding: 7px 30px 7px 10px; border-color: #eef1f5; background-color: #fafbfc; }
.filter-select-wrap { position: relative; }
.filter-select { width: 100%; padding: 8px 32px 8px 12px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 13px; color: #333; background: #fff; -webkit-appearance: none; appearance: none; cursor: pointer; outline: none; transition: border-color 0.2s; box-sizing: border-box; }
.filter-select:focus { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,0.1); }
.region-group { width: 100%; margin-bottom: 4px; }
.region-group .region-parent { margin-bottom: 4px; }
.region-children { display: flex; flex-wrap: wrap; gap: 4px; padding-left: 6px; margin-bottom: 4px; }

/* ========== 中间职位列表 ========== */
.jobs-main-content {
    min-width: 0;
}

/* 搜索栏 */
.jobs-search-bar {
    background: #fff;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
}
.search-form {
    display: flex;
    gap: 10px;
    align-items: center;
}
.search-input-wrap {
    flex: 1;
}
.search-input-wrap input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.search-input-wrap input:focus { border-color: #2563eb; }
.search-btn {
    padding: 10px 22px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.search-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,164,255,0.3);
}
.search-reset-btn {
    padding: 10px 16px;
    background: #f5f5f5;
    color: #666;
    border-radius: 8px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}
.search-reset-btn:hover { background: #e5e7eb; color: #333; }

/* 已选筛选条件 */
.active-filters-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 13px;
}
.active-filters-label { color: #888; font-weight: 500; }
.active-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 20px;
    color: #856404;
    font-size: 12px;
}
.chip-remove {
    color: #aaa;
    text-decoration: none;
    font-size: 14px;
    line-height: 1;
    margin-left: 2px;
    transition: color 0.2s;
}
.chip-remove:hover { color: #f00; }
.clear-all-filters {
    font-size: 12px;
    color: #aaa;
    text-decoration: none;
    margin-left: 4px;
}
.clear-all-filters:hover { color: #f00; }

/* 排序栏 */
.jobs-sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
}
.jobs-total { font-size: 13px; color: #666; }
.jobs-total strong { color: #2563eb; font-weight: 700; }
.jobs-sort-options { display: flex; gap: 6px; }
.sort-link {
    font-size: 12px;
    color: #666;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 20px;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.sort-link:hover,
.sort-link.active {
    color: #2563eb;
    background: #e6f7fc;
    border-color: #99DDF0;
}

/* ========== 职位卡片 ========== */
.job-list { display: flex; flex-direction: column; gap: 10px; }

.job-list .job-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
    text-decoration: none;
    color: inherit;
    transition: all 0.22s ease;
    cursor: pointer;
    position: relative;
}
.job-list .job-card:hover {
    box-shadow: 0 4px 18px rgba(0,164,255,0.12);
    border-color: #2563eb;
    transform: translateY(-2px);
}

/* 左侧公司LOGO */
.job-list .job-company-logo-wrap {
    flex-shrink: 0;
}
.job-list .job-company-logo {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    background: #e6f7fc;
    border: 1px solid #e5e7eb;
    display: block;
}
.job-list .job-company-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e6f7fc, #cceef7);
    color: #2563eb;
    font-size: 18px;
    font-weight: 700;
}

/* 职位信息 */
.job-list .job-info { flex: 1; min-width: 0; }
.job-list .job-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.job-list .job-title {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    transition: color 0.2s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.job-list .job-card:hover .job-title { color: #2563eb; }
.job-list .job-salary {
    font-size: 14px;
    font-weight: 700;
    color: #FF6B35;
    white-space: nowrap;
}
.job-list .job-company-name {
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.job-list .job-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}
.job-list .job-meta-item { display: flex; align-items: center; gap: 3px; }
.job-list .job-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.job-list .job-tag {
    display: inline-block;
    padding: 2px 8px;
    background: #e6f7fc;
    color: #2563eb;
    border-radius: 4px;
    font-size: 11px;
    transition: all 0.2s;
}
.job-list .job-card:hover .job-tag { background: #e0f0ff; }

/* 右箭头 */
.job-list .job-card-arrow {
    font-size: 20px;
    color: #ddd;
    flex-shrink: 0;
    transition: color 0.2s;
}
.job-list .job-card:hover .job-card-arrow { color: #2563eb; }

/* 空状态 */
.jobs-empty {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.jobs-empty-icon { font-size: 52px; margin-bottom: 12px; opacity: 0.25; }
.jobs-empty-text { font-size: 15px; color: #999; margin-bottom: 16px; }
.jobs-empty-reset {
    display: inline-block;
    padding: 8px 24px;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}
.jobs-empty-reset:hover { background: #1d4ed8; }

/* ========== 分页 ========== */
.jobs-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: 24px 0 10px;
    padding: 14px 0;
}
.page-num, .page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}
.page-num:hover, .page-btn:hover { background: #e6f7fc; border-color: #2563eb; color: #2563eb; }
.page-num.active { background: #2563eb; border-color: #2563eb; color: #fff; font-weight: 600; }
.page-ellipsis { color: #bbb; padding: 0 4px; }

/* ========== 右侧推荐栏 ========== */
.jobs-right-sidebar {
    position: sticky;
    top: 120px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}
.jobs-right-sidebar::-webkit-scrollbar { width: 4px; }
.jobs-right-sidebar::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

/* 统计卡片 */
.sidebar-stats-card {
    background: linear-gradient(135deg, #1d4ed8, #2563eb 60%, #3b82f6);
    border-radius: 10px;
    padding: 16px 12px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    color: #fff;
    box-shadow: 0 4px 14px rgba(0,164,255,0.25);
}
.sidebar-stat-item { text-align: center; flex: 1; }
.sidebar-stat-num { display: block; font-size: 22px; font-weight: 800; line-height: 1.2; }
.sidebar-stat-label { display: block; font-size: 11px; opacity: 0.85; margin-top: 2px; }
.sidebar-stat-divider { width: 1px; height: 36px; background: rgba(255,255,255,0.3); }

/* 通用侧边栏卡片 */
.sidebar-card {
    background: #fff;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 14px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
}
.sidebar-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 推荐企业列表 */
.sidebar-company-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-company-item {
    border-bottom: 1px solid #f5f5f5;
}
.sidebar-company-item:last-child { border-bottom: none; }
.sidebar-company-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 2px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
    border-radius: 6px;
}
.sidebar-company-link:hover { background: #f8fbff; }
.sidebar-company-logo {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e6f7fc;
}
.sidebar-company-logo img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-logo-placeholder {
    font-size: 16px;
    font-weight: 700;
    color: #2563eb;
}
.sidebar-company-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sidebar-company-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-company-jobs {
    font-size: 11px;
    color: #2563eb;
}
.sidebar-company-arrow { font-size: 16px; color: #ddd; transition: color 0.2s; }
.sidebar-company-link:hover .sidebar-company-arrow { color: #2563eb; }

.sidebar-more-link {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: 12px;
    color: #2563eb;
    text-decoration: none;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s;
}
.sidebar-more-link:hover { background: #e6f7fc; }

/* 发布职位卡片 */
.sidebar-post-job-card { background: linear-gradient(135deg, #fff9f0, #fff5e6); border-color: #ffe0b2; }
.sidebar-post-desc { font-size: 12px; color: #888; margin: 0 0 12px; line-height: 1.6; }
.sidebar-post-btn {
    display: block;
    text-align: center;
    padding: 10px;
    background: linear-gradient(135deg, #FF6B35, #e85d2a);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}
.sidebar-post-btn:hover {
    background: linear-gradient(135deg, #e85d2a, #d4501f);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255,107,53,0.3);
}

/* ========== 响应式 ========== */
@media (max-width: 1200px) {
    .jobs-three-col {
        grid-template-columns: 200px 1fr 200px;
        gap: 16px;
    }
}

@media (max-width: 1024px) {
    .jobs-three-col {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .jobs-filter-sidebar,
    .jobs-right-sidebar {
        position: static;
        max-height: none;
        overflow-y: visible;
    }
    .sidebar-stats-card {
        display: flex;
    }
    /* 移动端筛选折叠 - 改为横向滚动 */
    .jobs-filter-sidebar {
        display: flex;
        flex-wrap: nowrap;
        gap: 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 8px;
    }
    .jobs-filter-sidebar::-webkit-scrollbar {
        display: none;
    }
    .jobs-filter-sidebar .fc {
        flex: 0 0 auto;
        min-width: 160px;
        margin-bottom: 0;
        position: relative;
    }
    .jobs-filter-sidebar .fc-body {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 200px;
        background: #fff;
        z-index: 100;
        box-shadow: 0 4px 16px rgba(0,0,0,0.15);
        border-radius: 0 0 10px 10px;
        border: 1px solid #eee;
        border-top: 2px solid var(--primary, #2563eb);
    }
    .jobs-filter-sidebar .fc.active .fc-body {
        display: block;
    }
    .jobs-filter-sidebar .fc-head {
        cursor: pointer;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
    .mobile-filter-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .jobs-three-col { padding-top: 0; }

    /* 移动端筛选栏优化 */
    .jobs-filter-sidebar {
        gap: 8px;
        padding-bottom: 6px;
    }
    .jobs-filter-sidebar .fc {
        min-width: 140px;
    }
    .jobs-filter-sidebar .fc-head {
        padding: 8px 10px;
        font-size: 12px;
    }

    /* 移动端下拉面板内容样式 */
    .jobs-filter-sidebar .fc-body .fc-selects {
        padding: 10px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .jobs-filter-sidebar .fc-body .fc-sel {
        width: 100%;
        padding: 8px 10px;
        font-size: 13px;
        border: 1px solid #e5e7eb;
        border-radius: 6px;
        background: #fff;
    }
    .jobs-filter-sidebar .fc-body .fc-tags {
        padding: 10px;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }
    .jobs-filter-sidebar .fc-body .ft {
        padding: 6px 12px;
        font-size: 12px;
    }
    .jobs-filter-sidebar .fc-body .fc-clear {
        display: block;
        text-align: center;
        padding: 8px;
        border-top: 1px solid #f0f0f0;
        font-size: 12px;
        color: var(--primary, #2563eb);
    }

    /* 右侧栏优化 - 统计卡片置顶 */
    .jobs-right-sidebar {
        order: -1;
        margin-bottom: 8px;
    }
    .sidebar-stats-card {
        margin-bottom: 0;
        padding: 12px 10px;
    }
    .sidebar-stat-num {
        font-size: 18px;
    }
    .sidebar-stat-label {
        font-size: 10px;
    }
    .sidebar-card:not(.sidebar-stats-card) {
        display: none;
    }

    /* 职位卡片优化 */
    .job-list .job-card {
        padding: 12px;
        gap: 10px;
    }
    .job-list .job-company-logo {
        width: 36px;
        height: 36px;
    }
    .job-list .job-title {
        font-size: 13px;
    }
    .job-list .job-salary {
        font-size: 13px;
    }
    .job-list .job-company-name {
        font-size: 11px;
    }
    .job-list .job-meta {
        gap: 6px;
        font-size: 11px;
    }
    .job-list .job-tag {
        font-size: 10px;
        padding: 2px 6px;
    }
    .job-list .job-card-arrow {
        display: none;
    }

    /* 搜索栏优化 */
    .search-form {
        flex-wrap: wrap;
        gap: 8px;
    }
    .search-input-wrap {
        width: 100%;
    }
    .search-input-wrap input {
        font-size: 16px;
        padding: 12px 14px;
    }
    .search-btn, .search-reset-btn {
        flex: 1;
        text-align: center;
        min-height: 44px;
    }

    /* 排序栏优化 */
    .jobs-sort-bar {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
        padding: 12px;
    }
    .jobs-sort-options {
        flex-wrap: wrap;
        gap: 4px;
    }
    .sort-link {
        padding: 4px 8px;
        font-size: 11px;
    }
    .sort-divider {
        display: none;
    }

    /* 已选筛选条件优化 */
    .active-filters-bar {
        padding: 8px 10px;
    }
    .active-filter-chip {
        font-size: 11px;
        padding: 2px 8px;
    }
}

@media (max-width: 480px) {
    .job-meta { gap: 6px; }
    .jobs-pagination { gap: 4px; }
    .page-num, .page-btn { min-width: 30px; height: 30px; font-size: 12px; }
}
