/* Current Openings Block Styles */

.job-listings {
    width: 100%;
    position: relative;
    background: white;    
    max-width: 830px;
    margin: 0 auto;
}

.job-listings-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Filter Bar */
.job-listings-filter-bar {
    display: block;
    position: relative;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #E0E0E0;
}

.reset-filters {
    color: var(--dark-blue);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.3s ease;
    margin-bottom: 26px;
}

.reset-filters.greyed-out {
    color: #999;
    cursor: not-allowed;
    text-decoration: none;
}

.reset-filters:hover:not(.greyed-out) {
    opacity: 0.8;
}

.filters-flex {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

/* Filter Dropdowns */
.filter-dropdown {
    position: relative;
    min-width: 200px;
}

.filter-dropdown .filter-label {
    background: white;
    border: 1px solid #CCCCCC;
    border-radius: 30px;
    padding: 8px 32px 8px 12px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.filter-dropdown .filter-label:hover {
    border-color: var(--mn8-orange);
}

.filter-dropdown.active .filter-label {
    border-color: var(--mn8-orange);
}

.job-listings .abs-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.select-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: transform 0.2s ease;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.select-icon svg {
    width: 16px;
    height: 16px;
}

.filter-dropdown.active .select-icon {
    transform: translateY(-50%) rotate(90deg);
}

.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #CCCCCC;
    border-radius: 30px;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.dropdown-list.hide {
    display: none;
}

.dropdown-list { list-style-type: none; padding-left: 0; width:100%;}

.filter-option {
    padding: 4px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #F0F0F0;
}

.filter-option:last-child {
    border-bottom: none;
}

.filter-option:hover {
    background-color: #F8F9FA;
}

.filter-option.selected {
    background-color: var(--mn8-orange);
    color: white;
}

/* Search Input */
.search-flex {
    position: relative;
    min-width: 200px;
    margin-left: auto;
}

.search-flex .search-input {
    width: 100%;
    padding: 8px 40px 8px 12px;
    border: 1px solid var(--mn8-orange);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
    min-height: 40px;
    box-sizing: border-box;
    border-radius: 30px;
}

.search-input:focus {
    border-color: var(--mn8-orange);
    box-shadow: 0 0 0 2px rgba(255, 90, 0, 0.1);
}

.search-input::placeholder {
    color: var(--mn8-orange);
}

.job-listings .search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mn8-orange);
    pointer-events: none;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.job-listings .search-icon svg {
    width:16px;
    height: 16px;
}
.job-listings .search-icon svg path {
    fill: var(--mn8-orange);
}

/* Content Section */
.job-listings-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.job-listings-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--mn8-orange);
    margin: 0;
}

.job-listings-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Job Items */
.job-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #F0F0F0;
    transition: all 0.3s ease;
}

.job-item:last-child {
    border-bottom: none;
}

.job-item.hide {
    display: none;
}

.job-item.job-even {
    background-color: transparent;
}

.job-item.job-odd {
    background-color: #F8F9FA;
    margin: 0 -16px;
    padding: 16px;
    border-radius: 4px;
}

.job-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    flex: 1;
    cursor: pointer;
    transition: color 0.2s ease;
}

.job-item-title:hover {
    color: var(--mn8-orange);
}

.job-posted-date {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
}

/* No Jobs Message */
.no-jobs-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--medium-gray);
    font-style: italic;
}

.no-jobs-message.hide {
    display: none;
}


/* Loading States */
.job-listings.loading {
    opacity: 0.7;
    pointer-events: none;
}

.job-listings.loading .job-listings-container {
    position: relative;
}

.job-listings.loading .job-listings-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Error Handling */
.job-listings-error {
    margin-bottom: 20px;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px 16px;
    border-radius: 4px;
    border: 1px solid #fcc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.error-dismiss {
    background: none;
    border: none;
    color: #c33;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    margin-left: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .job-listings {
        padding: 20px;
        margin: 0 10px;
    }
    
    .job-listings-filter-bar {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .filters-flex {
        flex-direction: column;
        gap: 12px;
    }
    
    .filter-dropdown,
    .search-flex {
        min-width: auto;
        width: 100%;
    }
    
    .job-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 0;
    }
    
    .job-item.job-odd {
        margin: 0 -12px;
        padding: 12px;
    }
    
    .job-posted-date {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .job-listings {
        padding: 16px;
        margin: 0 5px;
    }
    
    .job-listings-title {
        font-size: 18px;
    }
    
    .job-item-title {
        font-size: 15px;
    }
    
    .filter-label,
    .search-input {
        font-size: 13px;
        min-height: 36px;
    }
}
