/* Job Management Frontend Styles */

.job-management-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Filters Section */
.job-filters {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.job-filters h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.filter-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.filter-field select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

.filter-actions {
    display: flex;
    gap: 10px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background: #0073aa;
    color: white;
}

.btn-primary:hover {
    background: #005a87;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Results Section */
.job-results {
    margin-top: 30px;
}

.job-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #0073aa;
}

.job-results-header h3 {
    margin: 0;
    color: #333;
}

.job-count {
    background: #0073aa;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* Job Listings Grid */
.job-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

/* Job Card */
.job-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.job-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.job-card-header {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.job-title {
    margin: 0 0 5px 0;
    color: #0073aa;
    font-size: 20px;
}

.job-id {
    color: #666;
    font-size: 12px;
    font-weight: 600;
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 3px;
}

.job-card-body {
    margin-bottom: 15px;
}

.job-meta {
    margin-bottom: 15px;
}

.job-meta-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

.meta-icon {
    margin-right: 8px;
    font-size: 16px;
}

.meta-label {
    font-weight: 600;
    margin-right: 5px;
    color: #555;
}

.meta-value {
    color: #333;
}

.job-description {
    color: #666;
    line-height: 1.6;
    font-size: 14px;
    margin-top: 10px;
}

.job-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.job-expiry {
    font-size: 12px;
    color: #999;
}

/* Modal */
.job-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    overflow-y: auto;
}

.job-modal-content {
    background-color: #fefefe;
    margin: 50px auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 900px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.job-modal-close {
    color: #aaa;
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.job-modal-close:hover {
    color: #000;
}

.job-modal-body {
    margin-top: 20px;
}

.job-full-details h3 {
    color: #0073aa;
    margin-top: 25px;
    margin-bottom: 15px;
}

.job-details-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.job-details-table th,
.job-details-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.job-details-table th {
    font-weight: 600;
    color: #555;
    width: 30%;
}

.job-full-description {
    line-height: 1.8;
    color: #333;
}

/* Application Form */
.job-application-form-inline {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-message {
    margin: 15px 0;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

/* Loading */
.job-loading {
    text-align: center;
    padding: 20px;
    font-size: 16px;
    color: #666;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,115,170,.3);
    border-radius: 50%;
    border-top-color: #0073aa;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* No jobs message */
.no-jobs {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .job-listings-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .job-card-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .job-modal-content {
        width: 95%;
        margin: 20px auto;
        padding: 20px;
    }
}

body.modal-open {
    overflow: hidden;
}