/**
 * Jobs Manager Plugin Styles
 * Version: 1.0.0
 */

/* ==========================================================================
   Jobs Listing Styles
   ========================================================================== */

.jobs-listing {
    margin: 2rem 0;
}

.job-item {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.job-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    border-color: #0073aa;
}

.job-header {
    margin-bottom: 1rem;
}

.job-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.4;
}

.job-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.job-title a:hover {
    color: #0073aa;
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.job-meta span {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
    background: #f8f9fa;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    border: 1px solid #e9ecef;
}

.job-meta .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
}

.job-location .dashicons {
    color: #e74c3c;
}

.job-type .dashicons {
    color: #3498db;
}

.job-department .dashicons {
    color: #9b59b6;
}

.job-excerpt {
    margin: 1rem 0;
    line-height: 1.6;
    color: #555;
}

.job-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.job-apply-btn {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.2);
}

.job-apply-btn:hover {
    background: linear-gradient(135deg, #005a87 0%, #0073aa 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
    color: white !important;
}

.job-date {
    color: #999;
    font-size: 0.85rem;
}

.jobs-no-results {
    text-align: center;
    padding: 3rem 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
    font-style: italic;
}

/* ==========================================================================
   Single Job Page Styles
   ========================================================================== */

.single-jobs .entry-content h3 {
    color: #2c3e50;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 0.5rem;
    margin: 2rem 0 1rem 0;
}

.single-jobs .entry-content ul {
    margin: 1rem 0;
    padding-left: 0;
}

.single-jobs .entry-content ul li {
    list-style: none;
    position: relative;
    padding: 0.5rem 0 0.5rem 2rem;
    border-bottom: 1px solid #f0f0f0;
}

.single-jobs .entry-content ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
    font-size: 1.1rem;
}

.single-jobs .entry-content ul li:last-child {
    border-bottom: none;
}

/* Job Details Meta Box */
.job-details-display {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.job-details-display h4 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 0.5rem;
}

.job-detail-item {
    display: flex;
    margin: 0.75rem 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

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

.job-detail-label {
    font-weight: 600;
    width: 150px;
    color: #555;
    flex-shrink: 0;
}

.job-detail-value {
    flex: 1;
    color: #333;
}

/* Contact Section */
.job-contact-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    text-align: center;
}

.job-contact-section h4 {
    color: white;
    margin-top: 0;
}

.job-contact-btn {
    background: white;
    color: #667eea !important;
    padding: 1rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.job-contact-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #667eea !important;
}

/* ==========================================================================
   Admin Styles
   ========================================================================== */

#job_details .form-table th {
    width: 150px;
}

#job_details .form-table td input[type="text"],
#job_details .form-table td input[type="email"],
#job_details .form-table td input[type="date"],
#job_details .form-table td select,
#job_details .form-table td textarea {
    width: 100%;
    max-width: 500px;
}

#job_details .form-table td textarea {
    min-height: 100px;
    resize: vertical;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .job-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .job-title {
        font-size: 1.1rem;
    }
    
    .job-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .job-meta span {
        font-size: 0.8rem;
    }
    
    .job-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        text-align: center;
    }
    
    .job-apply-btn {
        padding: 1rem;
        border-radius: 8px;
    }
    
    .job-detail-item {
        flex-direction: column;
    }
    
    .job-detail-label {
        width: 100%;
        margin-bottom: 0.25rem;
        font-size: 0.9rem;
    }
    
    .job-contact-section {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .jobs-listing {
        margin: 1rem -0.5rem;
    }
    
    .job-item {
        margin: 0 0.5rem 1rem 0.5rem;
        padding: 0.75rem;
    }
    
    .job-title {
        font-size: 1rem;
        line-height: 1.3;
    }
    
    .job-excerpt {
        font-size: 0.9rem;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .job-item {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .job-apply-btn {
        display: none;
    }
    
    .job-actions {
        justify-content: flex-end;
    }
}

/* ==========================================================================
   Accessibility Improvements
   ========================================================================== */

.job-apply-btn:focus,
.job-contact-btn:focus {
    outline: 3px solid #005fcc;
    outline-offset: 2px;
}

.job-item:focus-within {
    border-color: #0073aa;
}

/* Screen reader text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   Animation Classes
   ========================================================================== */

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

.job-item.animate-in {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading state */
.jobs-listing.loading {
    opacity: 0.7;
    pointer-events: none;
}

.jobs-listing.loading::after {
    content: "";
    display: block;
    width: 40px;
    height: 40px;
    margin: 2rem auto;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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