/**
 * EA Jobs Listing High-Fidelity Styles
 * Matches the original europassistance design.
 */

/* Main Container */
.ea-jobs-listing-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Team Filters */
.ea-jobs-categories {
    margin-bottom: 40px;
}
.ea-team-filter-list {
    list-style: none;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 0;
}
.ea-team-filter {
    text-decoration: none;
    color: #555;
    background: #f8f9fa;
    padding: 8px 18px;
    border-radius: 50px;
    border: 1px solid #eee;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}
.ea-team-filter:hover {
    background: #eef2ff;
    color: #003399;
}
.ea-team-filter.active {
    background: #003399;
    color: #fff;
    border-color: #003399;
}

/* Card Structure (.openings) */
.opening-wrapper {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.openings {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 30px;
    display: flex;
    align-items: flex-start;
    gap: 25px;
    position: relative;
    border: 1px solid rgba(0,0,0,0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.openings:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

/* Icon Section */
.icns .icon {
    width: 65px;
    height: 65px;
    background: #f0f5ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.icns .icon img {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

/* Content Section (.mid_text) */
.mid_text {
    flex-grow: 1;
}

.mid_text h4.md {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 700;
    color: #000;
}
.mid_text h4.md a {
    text-decoration: none;
    color: inherit;
}
.mid_text h4.md a:hover {
    color: #003399;
}

/* Metadata Grid (.listing) */
.listing {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.listing li {
    flex: 0 0 auto;
    margin: 0;
    border: none;
    padding: 0;
}

.listing h5.tm {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #a0a0a0;
    font-weight: 500;
    text-transform: capitalize;
}

.listing p.custm {
    margin: 0;
    font-size: 15px;
    color: #2c3e50;
    font-weight: 600;
}

/* Button Section (.see_btn) */
.see_btn {
    align-self: flex-start;
}

.see_btn a {
    display: inline-block;
    background: #eef2ff;
    color: #003399;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s ease;
}

.see_btn a:hover {
    background: #003399;
    color: #fff;
}

/* Pagination (.pagination-list) */
.pagination-list {
    margin-top: 40px;
    display: flex;
    justify-content: flex-end;
}

.pagination-row {
    background: #fff;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    display: flex;
    gap: 10px;
    align-items: center;
}

.pagination-row .page-numbers {
    padding: 0;
    border: none;
    background: none;
    color: #777;
    font-weight: 500;
    font-size: 16px;
    text-decoration: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.pagination-row .page-numbers.current {
    color: #000;
    font-weight: 800;
    font-size: 18px;
    background: none;
}

.pagination-row .page-numbers:hover:not(.current) {
    background: #f0f2f5;
    color: #003399;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .openings {
        flex-direction: column;
        padding: 20px;
        align-items: center;
        text-align: center;
    }
    .listing {
        justify-content: center;
        gap: 20px;
    }
    .icns {
        margin-bottom: 10px;
    }
    .see_btn {
        margin-top: 20px;
        align-self: center;
        width: 100%;
    }
    .see_btn a {
        width: 100%;
        box-sizing: border-box;
    .pagination-list {
        justify-content: center;
    }
}

/* AJAX Loader & Spinner */
.ea-jobs-list {
    position: relative;
    min-height: 200px; /* Prevent collapse while loading */
}

.ea-jobs-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85); /* Slightly more opaque */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100; /* Ensure it's on top */
    border-radius: 20px;
    backdrop-filter: blur(4px); /* Increased blur */
}

.ea-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 51, 153, 0.1); /* Very light version of brand color */
    border-top: 4px solid #003399; /* Solid brand color */
    border-radius: 50%;
    animation: ea-spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes ea-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dim results during loading */
.ea-jobs-list.loading #ea-jobs-results {
    opacity: 0.2; /* Dimmier results */
    pointer-events: none;
    transition: opacity 0.3s ease;
}
