/* ============================================
   JOBS PAGE STYLES
   ============================================ */

.jobs-page {
    padding-top: calc(var(--navbar-height) + var(--space-8));
    min-height: 100vh;
    background: var(--gray-50);
}

/* Search bar - sticky */
.jobs-search-bar {
    background: var(--gray-0);
    border-bottom: 1px solid var(--gray-200);
    padding: var(--space-4) 0;
    position: sticky;
    top: var(--navbar-height);
    z-index: 50;
}

.jobs-search-bar__inner {
    display: flex;
    gap: var(--space-3);
    align-items: center;
}

.jobs-search-bar__field {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-lg);
    flex: 1;
    background: var(--gray-0);
    transition: border-color var(--transition-fast);
}

.jobs-search-bar__field:focus-within {
    border-color: var(--primary-500);
}

.jobs-search-bar__field .icon {
    color: var(--gray-400);
    flex-shrink: 0;
}

.jobs-search-bar__field input {
    flex: 1;
    font-size: var(--font-size-sm);
    min-width: 0;
}

/* Layout */
.jobs-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-8);
    padding: var(--space-8) 0;
}

/* Filters sidebar */
.jobs-filters {
    background: var(--gray-0);
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
    padding: var(--space-6);
    position: sticky;
    top: calc(var(--navbar-height) + 80px);
    max-height: calc(100vh - var(--navbar-height) - 100px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) transparent;
}

.jobs-filters::-webkit-scrollbar {
    width: 5px;
}

.jobs-filters::-webkit-scrollbar-track {
    background: transparent;
}

.jobs-filters::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 10px;
}

.jobs-filters::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

.jobs-filters__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
}

.jobs-filters__title {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--gray-900);
}

.jobs-filters__clear {
    font-size: var(--font-size-xs);
    color: var(--gray-0);
    background: var(--danger-500, #ef4444);
    cursor: pointer;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    border: none;
}

.jobs-filters__clear:hover {
    background: var(--danger-600, #dc2626);
    transform: scale(1.04);
}

.filter-group {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--gray-100);
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-group__label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.filter-group__label::after {
    content: '▾';
    font-size: 10px;
    color: var(--gray-400);
}

/* Filter search input inside filter groups */
.filter-group__search {
    margin-bottom: var(--space-3);
}

.filter-search-input {
    width: 100%;
    padding: 7px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: var(--font-size-xs);
    background: var(--gray-50);
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.filter-search-input:focus {
    outline: none;
    border-color: var(--primary-400);
    background: var(--gray-0);
}

.filter-search-input::placeholder {
    color: var(--gray-400);
}

.filter-group__options {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.filter-group__options::-webkit-scrollbar {
    width: 4px;
}

.filter-group__options::-webkit-scrollbar-track {
    background: transparent;
}

.filter-group__options::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

/* Results */
.jobs-results__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
}

.jobs-results__count {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
}

.jobs-results__count strong {
    color: var(--gray-900);
}

.jobs-results__sort {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.jobs-results__sort label {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
}

/* Job list view */
.job-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.job-list-card {
    display: flex;
    gap: var(--space-5);
    background: var(--gray-0);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: var(--space-5) var(--space-6);
    transition: all var(--transition-base);
    cursor: pointer;
}

.job-list-card:hover {
    border-color: var(--primary-300);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.job-list-card__logo {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: var(--font-size-xl);
    color: white;
    flex-shrink: 0;
}

.job-list-card__body {
    flex: 1;
    min-width: 0;
}

.job-list-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-2);
}

.job-list-card__title {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--gray-900);
}

.job-list-card__company {
    font-size: var(--font-size-sm);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.job-list-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-bottom: var(--space-3);
}

.job-list-card__meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--font-size-xs);
    color: var(--gray-500);
}

.job-list-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.job-list-card__desc {
    font-size: var(--font-size-sm);
    color: var(--gray-500);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.job-list-card__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-3);
    flex-shrink: 0;
}

.job-list-card__posted {
    font-size: var(--font-size-xs);
    color: var(--gray-400);
    white-space: nowrap;
}

.job-list-card__actions .saved {
    background: var(--primary-50);
    border-color: var(--primary-400);
    color: var(--primary-600);
}

/* Active filter tags */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.active-filters .tag--removable {
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    color: var(--primary-700);
    font-weight: 500;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    animation: tagAppear 0.2s ease;
}

@keyframes tagAppear {
    from {
        opacity: 0;
        transform: scale(0.85);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.active-filters .tag__remove {
    font-size: 14px;
    line-height: 1;
    color: var(--primary-400);
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    transition: color var(--transition-fast);
}

.active-filters .tag__remove:hover {
    color: var(--danger-500, #ef4444);
}

/* No results state */
.jobs-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-16) var(--space-6);
    background: var(--gray-0);
    border-radius: var(--radius-xl);
    border: 1px dashed var(--gray-300);
}

.jobs-no-results__icon {
    font-size: 56px;
    margin-bottom: var(--space-4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

.jobs-no-results h3 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-2);
}

.jobs-no-results p {
    font-size: var(--font-size-sm);
    color: var(--gray-500);
    margin-bottom: var(--space-6);
    max-width: 340px;
}

@media (max-width: 768px) {
    .jobs-layout {
        grid-template-columns: 1fr;
    }

    .jobs-filters {
        position: static;
    }

    .jobs-search-bar__inner {
        flex-direction: column;
    }

    .job-list-card {
        flex-direction: column;
    }

    .job-list-card__actions {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
}