/* fallback.css - Enhanced Fallback Page Styles - ULTRA COMPACT */

/* 1. MINIMAL Job No Longer Available Header */
.job-expired-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px 12px 20px; /* DRAMATICALLY REDUCED */
    text-align: center;
    border-radius: 0px;
    margin-bottom: 5px !important; /* MINIMAL margin */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 10;
}

.job-expired-header h1 {
    font-size: 1.6rem; /* Smaller */
    margin-bottom: 6px !important; /* Minimal */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.job-expired-header p {
    font-size: 0.95rem; /* Smaller */
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.4; /* Tighter */
    padding: 0 5px;
}

/* 2. ELIMINATE SPACE between banner and filters */
.jobs-filter {
    margin-top: 0px !important; /* ZERO margin */
    margin-bottom: 8px !important; /* Minimal */
    position: relative;
    z-index: 5;
    padding-top: 5px; /* Small internal padding only */
}

/* 3. DIRECT CONNECTION: banner → filters → results */
.all-jobs .job-expired-header + .jobs-filter {
    margin-top: -2px !important; /* Actually pull filters upward */
}

/* 4. COMPACT "Showing 20 similar job opportunities" */
.pagination-info {
    background: #f0f7ff;
    padding: 8px 12px !important; /* Very compact */
    border-radius: 6px;
    margin: 5px 0 8px 0 !important; /* Minimal spacing */
    text-align: center;
    font-weight: 600;
    color: #2c5282;
    border: 1px solid #bee3f8;
    font-size: 0.95rem;
}

/* Make number POP */
.pagination-info strong {
    color: #1a56db;
    font-size: 1.05rem;
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    margin: 0 2px;
}

/* 5. TIGHTEN space between filters and showing 20 jobs */
.jobs-filter + .pagination-info {
    margin-top: 3px !important; /* Almost touching */
}

/* 6. ULTRA COMPACT job cards section */
.similar-jobs-section {
    margin-top: 5px !important; /* Minimal */
    padding: 10px !important; /* Minimal */
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    min-height: 320px;
}

.similar-jobs-section h2 {
    color: #333;
    margin-bottom: 10px !important; /* Tight */
    font-size: 1.3rem; /* Compact */
    border-left: 3px solid #667eea;
    padding-left: 10px;
    padding-top: 5px;
    padding-bottom: 5px;
}

/* 7. COMPACT job cards grid */
#jobsContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px !important; /* Tight grid */
    margin-top: 10px !important; /* Minimal */
}

/* 8. MINIMAL job card padding */
.job-card {
    background: white;
    padding: 15px !important; /* Compact */
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
}

/* First job gets special compact highlight */
.job-card:first-child {
    border: 2px solid #667eea;
    box-shadow: 0 3px 8px rgba(102, 126, 234, 0.25);
    margin-top: 2px !important; /* Almost no top margin */
}

/* 9. COMPACT active filters */
.active-filters {
    margin: 4px 0 !important; /* Very small */
    padding: 6px 8px !important; /* Tight */
    max-height: 60px; /* Compact */
    font-size: 0.85rem; /* Smaller text */
}

/* 10. ELIMINATE all unnecessary spacing */
.filter-status {
    margin: 4px 0 !important;
    padding: 8px !important;
}

/* 11. TIGHTEN everything below */
.region-suggestions,
.alternative-section,
.search-tips {
    margin: 8px 0 !important; /* Very compact */
    padding: 12px !important; /* Minimal */
}

/* 12. ULTRA COMPACT suggestion cards */
.suggestion-card {
    padding: 12px !important;
    margin-bottom: 8px !important;
}

/* 13. COMPACT filter elements */
.filter-row {
    margin-bottom: 4px !important; /* Minimal */
}

.filter-group {
    gap: 6px !important; /* Tight */
}

.filter-pill {
    padding: 6px 10px !important; /* Compact */
    margin-bottom: 3px !important;
}

/* 14. TIGHTEN job card internals */
.job-card .job-title {
    font-size: 1.15rem;
    margin-bottom: 4px !important;
}

.job-card .company-name {
    font-size: 0.95rem;
    margin-bottom: 6px !important;
}

.job-card .job-meta {
    margin-bottom: 8px !important;
    padding-bottom: 6px !important;
}

.job-desc {
    margin-bottom: 8px !important;
    line-height: 1.3; /* Very tight */
    font-size: 0.9rem;
}

/* 15. COMPACT job footer */
.job-footer {
    margin-top: 8px !important;
    padding-top: 8px !important;
}

/* 16. REDUCE overall page padding */
.all-jobs {
    padding-bottom: 15px !important;
}

main {
    padding-top: 0px !important; /* No top padding */
}

/* 17. SPECIAL: Make the flow banner→filters→20jobs→firstJob very tight */
body.all-jobs {
    padding-top: 0;
}



/* =============================================== */
/* FALLBACK.JS SPECIFIC STYLES - QUICK JOB SEARCH */
/* =============================================== */

/* No Jobs Found Enhanced Section */
.no-jobs-enhanced {
    background: linear-gradient(135deg, #f9fafe 0%, #f0f4ff 100%);
    padding: 25px 20px !important;
    border-radius: 12px;
    margin: 20px 0 !important;
    text-align: center;
    border: 1px solid #e0e6ff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.08);
}

.no-jobs-enhanced > p {
    color: #4a5568;
    font-size: 1.1rem;
    margin-bottom: 25px !important;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    padding: 0 10px;
}

/* Fallback Section Container */
.fallback-section {
    background: white;
    border-radius: 10px;
    padding: 25px !important;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Fallback Title */
.fallback-title {
    color: #2d3748;
    margin-bottom: 25px !important;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.fallback-title svg {
    width: 28px;
    height: 28px;
    color: #667eea;
    stroke-width: 2;
}

/* Fallback Grid */
.fallback-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px !important;
    margin-top: 15px !important;
}

/* Fallback Cards */
.fallback-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 10px;
    padding: 22px 18px !important;
    border: 1px solid #e2e8f0;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.fallback-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px 10px 0 0;
}

.fallback-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.15);
    border-color: #c3dafe;
}

.fallback-card h4 {
    color: #2d3748;
    font-size: 1.2rem;
    margin-bottom: 10px !important;
    font-weight: 600;
}

.fallback-card p {
    color: #718096;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px !important;
    flex-grow: 1;
}

/* Fallback Links */
.fallback-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 10px 20px !important;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    min-width: 140px;
    margin: 0 auto;
}

.fallback-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.3);
    text-decoration: none !important;
    color: white !important;
}

.fallback-link:active {
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .no-jobs-enhanced {
        padding: 20px 15px !important;
        margin: 15px 0 !important;
    }
    
    .no-jobs-enhanced > p {
        font-size: 1rem;
        margin-bottom: 20px !important;
        padding: 0;
    }
    
    .fallback-section {
        padding: 20px 15px !important;
    }
    
    .fallback-title {
        font-size: 1.2rem;
        margin-bottom: 20px !important;
    }
    
    .fallback-title svg {
        width: 24px;
        height: 24px;
    }
    
    .fallback-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 15px !important;
    }
    
    .fallback-card {
        padding: 18px 14px !important;
    }
    
    .fallback-card h4 {
        font-size: 1.1rem;
    }
    
    .fallback-card p {
        font-size: 0.9rem;
        margin-bottom: 15px !important;
    }
    
    .fallback-link {
        padding: 9px 16px !important;
        font-size: 0.9rem;
        min-width: 130px;
    }
}

@media (max-width: 480px) {
    .fallback-grid {
        grid-template-columns: 1fr;
        gap: 12px !important;
    }
    
    .no-jobs-enhanced {
        padding: 16px 12px !important;
        margin: 12px 0 !important;
    }
    
    .fallback-section {
        padding: 16px 12px !important;
    }
    
    .fallback-title {
        font-size: 1.1rem;
        margin-bottom: 16px !important;
    }
    
    .fallback-card {
        padding: 16px 12px !important;
    }
    
    .fallback-link {
        padding: 8px 14px !important;
        font-size: 0.85rem;
    }
}

/* Animation for fallback cards */
.fallback-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.fallback-card:nth-child(1) { animation-delay: 0.1s; }
.fallback-card:nth-child(2) { animation-delay: 0.2s; }
.fallback-card:nth-child(3) { animation-delay: 0.3s; }
.fallback-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover Effects */
.fallback-card:hover {
    border-color: #667eea;
}

.fallback-card:hover h4 {
    color: #667eea;
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .no-jobs-enhanced {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
        border-color: #334155;
    }
    
    .no-jobs-enhanced > p {
        color: #cbd5e1;
    }
    
    .fallback-section {
        background: #1e293b;
        border-color: #334155;
    }
    
    .fallback-title {
        color: #e2e8f0;
    }
    
    .fallback-card {
        background: linear-gradient(145deg, #334155 0%, #1e293b 100%);
        border-color: #475569;
    }
    
    .fallback-card h4 {
        color: #e2e8f0;
    }
    
    .fallback-card p {
        color: #94a3b8;
    }
    
    .fallback-link {
        background: linear-gradient(90deg, #7c3aed 0%, #4f46e5 100%);
    }
}


/* 18. MOBILE: Even more compact */
@media (max-width: 768px) {
    .job-expired-header {
        padding: 12px 15px 8px 15px !important; /* Ultra compact */
        margin-bottom: 3px !important;
    }
    
    .job-expired-header h1 {
        font-size: 1.3rem !important;
        margin-bottom: 4px !important;
    }
    
    .job-expired-header p {
        font-size: 0.85rem !important;
        line-height: 1.3;
    }
    
    .jobs-filter {
        margin-bottom: 5px !important;
        padding-top: 3px !important;
    }
    
    .pagination-info {
        padding: 6px 8px !important;
        margin: 3px 0 5px 0 !important;
        font-size: 0.9rem;
    }
    
    .similar-jobs-section {
        padding: 8px !important;
        margin-top: 3px !important;
    }
    
    .similar-jobs-section h2 {
        font-size: 1.1rem !important;
        margin-bottom: 8px !important;
        padding-left: 8px;
    }
    
    #jobsContainer {
        gap: 8px !important;
        margin-top: 8px !important;
    }
    
    .job-card {
        padding: 12px !important;
    }
    
    /* Stack filters with no gap on mobile */
    .filter-row .filter-group {
        gap: 4px !important;
    }
    
    .filter-pill {
        margin-bottom: 2px !important;
    }
}

@media (max-width: 480px) {
    .job-expired-header h1 {
        font-size: 1.2rem !important;
    }
    
    .job-expired-header p {
        font-size: 0.8rem !important;
    }
    
    .pagination-info {
        font-size: 0.85rem;
        padding: 5px 6px !important;
    }
    
    .similar-jobs-section h2 {
        font-size: 1rem !important;
    }
    
    /* Make "20" REALLY stand out on mobile */
    .pagination-info strong {
        font-size: 1.1rem;
        background: #1a56db;
        color: white;
        padding: 3px 8px;
        border-radius: 6px;
        display: inline-block;
        margin: 0 4px;
    }
}

/* 19. VISUAL HIERARCHY: Show clear flow */
.job-expired-header {
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

.jobs-filter {
    border-top: 1px solid rgba(102, 126, 234, 0.1);
}

.pagination-info {
    border-top: 1px dashed #bee3f8;
    border-bottom: 1px dashed #bee3f8;
}

/* 20. EMERGENCY OVERRIDES - Force compactness */
* {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.job-expired-header,
.jobs-filter,
.pagination-info,
.similar-jobs-section {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Only add minimal spacing where absolutely needed */
.jobs-filter {
    margin-bottom: 4px !important;
}

.pagination-info {
    margin-top: 2px !important;
    margin-bottom: 6px !important;
}

.similar-jobs-section {
    margin-top: 2px !important;
}

/* 21. FINAL TOUCH: Add subtle visual connection */
.job-expired-header::after {
    content: '';
    display: block;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    margin-top: 8px;
}
