/**
 * Custom Jobs Listing Styles
 * Path: assets/css/jobs.css
 */

/* Container */
.custom-jobs-container {
    display: flex;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    font-family: 'Poppins', sans-serif;
}

/* Sidebar Filters */
.custom-jobs-sidebar {
    background-color: #e8e8e8;
    padding: 25px;
    border-radius: 10px;
    width: 280px;
    height: fit-content;
    flex-shrink: 0;
}

.filter-section {
    margin-bottom: 25px;
}

.custom-jobs-sidebar h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.custom-jobs-sidebar input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
}

.custom-jobs-sidebar input[type="text"]:focus {
    outline: none;
    border-color: #055F6A;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-item {
    display: flex;
    align-items: center;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #055F6A;
}

.checkbox-item label {
    font-size: 14px;
    color: #333;
    cursor: pointer;
    user-select: none;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #055F6A;
    color: white;
}

.btn-primary:hover {
    background-color: #044852;
}

.btn-secondary {
    background-color: white;
    color: #333;
    border: 1px solid #ccc;
}

.btn-secondary:hover {
    background-color: #f5f5f5;
}

/* Main Content */
.custom-jobs-main {
    flex: 1;
    min-width: 0;
}

/* Jobs Header */
.jobs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.jobs-count {
    font-size: 14px;
    color: #666;
}

.jobs-sort select {
    padding: 10px 30px 10px 15px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

.jobs-sort select:focus {
    outline: none;
    border-color: #055F6A;
}

/* Jobs Grid */
.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .jobs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Job Card */
.job-card {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 25px;
    position: relative;
    transition: box-shadow 0.3s ease;
}

.job-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Job Badge */
.job-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: #FFC857;
    color: #333;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
}

.job-badge.closed {
    background-color: #f0f0f0;
    color: #666;
}

/* Bookmark */
.job-bookmark {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 20px;
    cursor: pointer;
    color: #333;
    z-index: 1;
    transition: color 0.3s ease;
}

.job-bookmark:hover {
    color: #055F6A;
}

.job-bookmark.bookmarked i {
    font-weight: 900;
}

.job-bookmark.bookmarked i:before {
    content: "\f02e";
}

/* Job Logo */
.job-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 40px 0 20px 0;
}

.job-logo-placeholder {
    width: 80px;
    height: 80px;
    background-color: #f5f5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 40px 0 20px 0;
    font-size: 32px;
    color: #999;
}

/* Job Title */
.job-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}

.job-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.job-title a:hover {
    color: #055F6A;
}

/* Job Company */
.job-company {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

/* Job Details */
.job-details {
    margin-bottom: 20px;
}

.job-detail-item {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.job-detail-item i {
    width: 16px;
    margin-right: 8px;
    color: #333;
}

/* Apply Button */
.btn-apply {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #055F6A;
    color: white;
    border: none;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-apply:hover {
    background-color: #044852;
}

.btn-apply.disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.btn-apply.disabled:hover {
    background-color: #cccccc;
}

/* No Jobs Found */
.no-jobs-found {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background-color: white;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.no-jobs-found p {
    font-size: 16px;
    color: #666;
}

/* Pagination */
.jobs-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.jobs-pagination button,
.jobs-pagination span {
    padding: 8px 15px;
    border: 1px solid #ccc;
    background-color: white;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
}

.jobs-pagination button:hover:not(:disabled) {
    background-color: #f5f5f5;
}

.jobs-pagination button.active,
.jobs-pagination span.active {
    background-color: #055F6A;
    color: white;
    border-color: #055F6A;
}

.jobs-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.jobs-pagination .dots {
    border: none;
    background: none;
    cursor: default;
    padding: 8px 5px;
}

/* Loading State */
.jobs-grid.loading {
    opacity: 0.5;
    pointer-events: none;
}

.jobs-loading {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
}

/* Responsive */
@media (max-width: 992px) {
    .custom-jobs-container {
        flex-direction: column;
    }
    
    .custom-jobs-sidebar {
        width: 100%;
    }
    
    .jobs-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) and (max-width: 992px) {
    .jobs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .job-card {
        padding: 20px;
    }
    
    .jobs-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .jobs-sort select {
        width: 100%;
    }
}