/* public/static/css/jobs.css - Redesigned Styles */

/* Page Layout */
.job-list-page {
    padding-top: 30px;
    padding-bottom: 50px;
    background-color: #f4f6f8; /* Lighter page background */
}

/* Filter Section */
.filter-section {
    background-color: var(--background-white);
    padding: 25px 30px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

#filter-form {
    display: flex;
    flex-direction: column;
    gap: 18px; /* Increased gap between filter rows */
}

/* Keyword Search Row */
.filter-row.filter-keyword {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #f0f0f0; /* Separator */
    padding-bottom: 18px;
}
.filter-keyword input[type="text"] {
    flex-grow: 1;
    height: 45px;
    padding: 0 18px;
    border: 1px solid #dcdcdc; /* Slightly darker border */
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: all var(--transition-speed);
}
.filter-keyword input[type="text"]:focus {
     border-color: var(--primary-color);
     box-shadow: 0 0 0 3px rgba(45, 109, 204, 0.1);
     outline: none;
}
.filter-keyword .filter-submit-btn {
    height: 45px;
    padding: 0 28px;
    background: var(--primary-color);
    color: var(--background-white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    cursor: pointer;
    transition: background-color var(--transition-speed);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.filter-keyword .filter-submit-btn:hover {
    background: var(--primary-hover-color);
}

/* General Filter Rows */
.filter-row {
    display: flex;
    align-items: flex-start;
    gap: 15px; /* Gap between label and options */
}

.filter-label {
    width: 65px; /* Slightly wider label */
    flex-shrink: 0;
    font-weight: 500;
    color: var(--text-light);
    padding-top: 6px; /* Align better with options */
    font-size: 14px;
    text-align: right; /* Align label text right */
}

.filter-options {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px; /* Vertical and horizontal gap */
    padding-top: 2px; /* Align options with label baseline */
}

.filter-options a {
    font-size: 14px;
    color: var(--text-color); /* Slightly darker default color */
    padding: 5px 12px;
    border-radius: 15px; /* Pill shape */
    transition: all var(--transition-speed);
    background-color: #f7f7f7; /* Default background */
    border: 1px solid transparent; /* Placeholder for active state */
    white-space: nowrap;
}

.filter-options a:hover {
    color: var(--primary-color);
    background-color: #eaf1fc;
    border-color: #d0e0f8;
}

.filter-options a.active {
    color: var(--background-white);
    background-color: var(--primary-color);
    font-weight: 500;
    border-color: var(--primary-color);
}

/* Sort Bar */
.sort-bar {
    background-color: var(--background-white);
    padding: 15px 25px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 25px;
    font-size: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.sort-label {
    color: var(--text-light);
    font-weight: 500;
}
.sort-bar a {
    color: var(--text-light);
    padding: 5px 10px;
    border-radius: 4px;
    transition: all var(--transition-speed);
    position: relative; /* For potential active indicator */
}
.sort-bar a:hover {
    color: var(--primary-color);
}
.sort-bar a.active {
    color: var(--primary-color);
    font-weight: 600;
    background-color: #eaf1fc;
}
.sort-bar a i {
    margin-left: 4px;
    font-size: 12px;
}

/* Job List Container */
.job-list-container {
    /* No background needed if page has one */
    min-height: 400px;
    position: relative;
}

.job-list-items {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 18px; /* Space between job cards */
}

/* Job List Item Card - Further Refined */
.job-list-item {
    background-color: var(--background-white);
    border: 1px solid #e8eaf0;
    border-left: 3px solid transparent; /* Add space for hover accent */
    border-radius: var(--border-radius);
    padding: 25px 30px 25px 27px; /* Adjust left padding */
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed), border-left-color var(--transition-speed); /* Animate border-left-color */
    position: relative;
    display: flex;
    gap: 25px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.job-list-item:hover {
     border-color: #d4dae3;
     border-left-color: var(--primary-color); /* Accent color on hover */
     box-shadow: 0 8px 20px rgba(45, 109, 204, 0.09); /* Custom shadow with hint of primary color */
     z-index: 1;
}

.job-item-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.job-item-side {
    flex-shrink: 0;
    width: 200px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;

    padding-left: 25px;
}

/* Job Title / Salary Header */
.job-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px; /* Increased margin back slightly */
}
.job-title-wrapper {
    margin-right: 20px;
}
.job-title {
    font-size: 19px;
    font-weight: 600;
    color: #1a2b47; /* Darker blueish tint */
    margin-bottom: 6px;
    display: inline-block;
    transition: color var(--transition-speed);
}
.job-title:hover {
    color: var(--primary-color);
}
.urgent-tag {
    display: inline-block;
    font-size: 11px;
    color: var(--danger-color);
    border: 1px solid #ffd1d2;
    background-color: #fff5f5;
    padding: 3px 7px;
    border-radius: 4px;
    margin-left: 10px;
    font-weight: 500;
    vertical-align: middle;
}
.job-salary {
    color: var(--danger-color);
    font-size: 19px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.5px; /* Slightly space out salary */
}

/* Job Details (Tags) */
.job-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 15px; /* Increased horizontal gap */
    margin-bottom: 18px;
    color: var(--text-light);
    font-size: 14px;
    padding-bottom: 18px;
   
}
.job-card-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #f5f7f9; /* Slightly cooler grey background */
    padding: 5px 11px;
    border-radius: 4px;
    color: #4b5c71; /* Darker grey-blue text */
    font-size: 13px; /* Slightly smaller */
}
.job-card-tag i {
    font-size: 13px;
    color: #9aa8ba; /* Adjusted icon color */
}

/* Job Benefits/Keywords */
.job-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 15px;
}
.benefit-tag {
    font-size: 12px;
    color: var(--primary-color); /* Use primary color text */
    background: #eaf1fb; /* Lighter primary background */
    padding: 5px 12px;
    border-radius: 15px;
    font-weight: 500;
    transition: all var(--transition-speed);
}
.benefit-tag:hover {
    background-color: #dce8fa;
    box-shadow: 0 2px 5px rgba(45, 109, 204, 0.15);
}

/* Company Info (Side) */
.job-item-side .company-logo {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    border: 1px solid #eaedf1;
    overflow: hidden;
    padding: 5px;
    background-color: var(--background-white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.job-item-side .company-logo img {
     width: 100%;
     height: 100%;
     object-fit: contain;
}
.job-item-side .company-name {
    font-size: 16px;
    color: #333; /* Back to standard text color */
    font-weight: 500;
    margin-bottom: 10px;
    display: block;
    transition: color var(--transition-speed);
}
.job-item-side .company-name:hover {
    color: var(--primary-color);
}
.job-item-side .company-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}
.company-tag {
    font-size: 12px;
    color: var(--text-lighter);
    background: #f0f2f5;
    padding: 4px 10px;
    border-radius: 4px;
}

/* Footer inside card (Publish time/actions) */
.job-card-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f0f2f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.publish-time {
    font-size: 13px;
    color: var(--text-lighter);
}
.job-actions .action-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--text-lighter);
    font-size: 19px; /* Slightly larger action icons */
    display: inline-flex;
    align-items: center;
    transition: color var(--transition-speed);
    margin-left: 15px; /* Space actions */
}
.job-actions .action-btn:hover {
    color: var(--primary-color);
}
.job-actions .action-btn i.fas { /* Style for filled heart */
    color: var(--danger-color);
}

/* Pagination */
.pagination-container {
    margin-top: 40px;
    text-align: center;
}
.pagination-container ul {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px; /* Space between pagination items */
}
.pagination-container li a,
.pagination-container li span {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid #dcdcdc;
    border-radius: var(--border-radius);
    color: var(--text-light);
    background-color: var(--background-white);
    font-size: 14px;
    transition: all var(--transition-speed);
    min-width: 40px; /* Ensure consistent width */
    text-align: center;
}
.pagination-container li a:hover {
    background-color: #f0f5fc;
    border-color: var(--primary-color);
    color: var(--primary-color);
    z-index: 2;
    position:relative;
}
.pagination-container li.active span {
    background-color: var(--primary-color);
    color: var(--background-white);
    border-color: var(--primary-color);
    font-weight: 500;
    z-index: 1;
    position:relative;
}
.pagination-container li.disabled span {
    background-color: #f8f9fa;
    color: #ccc;
    border-color: #eee;
    cursor: not-allowed;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-lighter);
    background-color: var(--background-white);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}
.no-results i {
    font-size: 55px;
    margin-bottom: 25px;
    color: #dde2e7;
}
.no-results p {
    font-size: 17px;
    margin-bottom: 20px;
}
.no-results a {
    color: var(--primary-color);
    text-decoration: underline;
    font-size: 15px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .job-list-item {
        flex-direction: column;
        gap: 20px;
        border-left-width: 1px; /* Reset left border */
        padding-left: 30px; /* Reset padding */
    }
    .job-list-item:hover {
        border-left-color: #d4dae3; /* Reset left border hover */
    }
    .job-item-side {
        width: 100%;
        align-items: flex-start;
        text-align: left;
        border-left: none;
        border-top: 1px solid #f0f2f5;
        padding-left: 0;
        padding-top: 20px;
        flex-direction: row;
        align-items: center;
        gap: 20px;
    }
    .job-item-side .company-logo {
        margin-bottom: 0;
        width: 55px;
        height: 55px;
        flex-shrink: 0;
    }
    .job-item-side .company-details-wrapper {
        flex-grow: 1;
    }
    .job-item-side .company-tags {
       justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .filter-row {
        flex-direction: column; /* Stack label and options */
        align-items: flex-start;
        gap: 10px;
    }
    .filter-label {
        width: auto;
        text-align: left;
        padding-top: 0;
    }
    .sort-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .job-list-item {
        padding: 20px;
    }
    .job-title {
        font-size: 17px;
    }
    .job-salary {
        font-size: 17px;
    }
}

@media (max-width: 576px) {
     .filter-section {
         padding: 20px;
     }
    .job-list-item {
        padding: 15px;
    }
     .job-item-side {
         flex-direction: column; /* Stack logo and info again */
         align-items: flex-start;
     }
     .job-item-side .company-logo {
         margin-bottom: 10px;
     }
    .pagination-container li a,
    .pagination-container li span {
        padding: 8px 12px;
        min-width: 35px;
    }
} 

 /* Add styles for nested filter rows if needed */
 .filter-row.sub-filter {
    padding-left: 80px; /* Indent sub-filters */
    margin-top: -10px; /* Adjust spacing */
    margin-bottom: 10px;
    border-top: 1px dashed #eee;
    padding-top: 10px;
}
.filter-options .all-link { /* Style for 'All' links */
     font-weight: 500;
}

/* Search input wrapper */
.search-input-wrapper {
    position: relative;
    flex: 1;
    display: inline-block;
    width: calc(100% - 100px);
}

.search-input-wrapper input {
    width: 100%;
    padding-right: 30px;
}

.clear-keyword {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    cursor: pointer;
}

.clear-keyword:hover {
    color: #333;
}

/* 搜索建议下拉菜单 */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    margin-top: -1px;
    display: none;
    max-height: 400px;
    overflow-y: auto;
}

.search-suggestions .suggestion-title {
    padding: 8px 15px;
    font-size: 12px;
    color: #999;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
}

.search-suggestions .suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

.search-suggestions .suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestions .suggestion-item:hover {
    background-color: #f5f9ff;
}

.search-suggestions .suggestion-item.active {
    background-color: #edf2fc;
}

.search-suggestions .job-title {
    font-weight: 500;
    color: #333;
    margin-right: 10px;
}

.search-suggestions .company-name {
    font-size: 12px;
    color: #666;
}

.search-suggestions .category-item {
    color: #1e88e5;
}

.search-suggestions .highlight {
    color: #ff6b00;
    font-weight: bold;
}

.search-suggestions .suggestion-empty {
    padding: 15px;
    text-align: center;
    color: #999;
}

/* 点赞按钮样式 */
.job-actions .action-btn {
    margin-left: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 5px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.job-actions .action-btn:hover {
    background-color: #f5f5f5;
}

.job-actions .like-btn .like-count,
.job-actions .collect-btn .collect-count {
    margin-left: 3px;
    font-size: 12px;
    color: #666;
}

.job-actions .like-btn .text-primary {
    color: #1890ff;
}

.job-actions .collect-btn .text-danger {
    color: #ff4d4f;
}

/* Job meta with views */
.job-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.job-meta {
    display: flex;
    align-items: center;
}

.job-views {
    margin-left: 15px;
    color: #999;
    font-size: 12px;
}

/* Sort bar */
.sort-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.sort-bar a {
    margin-right: 10px;
    white-space: nowrap;
}