/* ==========================================
   Custom Job Listing Plugin Styles
   ========================================== */

/* Container */
.cjl-job-listing-container {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Sidebar Filters */
.cjl-filters-sidebar {
    flex: 0 0 280px;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.cjl-filters-sidebar h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
}

.cjl-filter-group {
    margin-bottom: 20px;
}

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

.cjl-filter-group select,
.cjl-filter-group input[type="date"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

.cjl-filter-group select:disabled {
    background: #e9ecef;
    cursor: not-allowed;
}

.cjl-filter-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 25px;
}

/* Jobs Content Area */
.cjl-jobs-content {
    flex: 1;
}

.cjl-jobs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.cjl-jobs-header h2 {
    margin: 0;
    font-size: 28px;
    color: #333;
}

.cjl-job-count {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

/* Jobs List */
.cjl-jobs-list {
    display: grid;
    gap: 20px;
}

.cjl-job-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    transition: all 0.3s ease;
}

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

.cjl-job-title {
    margin: 0 0 15px 0;
    font-size: 22px;
}

.cjl-job-title a {
    color: #2c3e50;
    text-decoration: none;
}

.cjl-job-title a:hover {
    color: #3498db;
}

.cjl-job-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.cjl-job-location,
.cjl-job-date {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #6c757d;
}

.cjl-job-location .dashicons,
.cjl-job-date .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.cjl-job-excerpt {
    margin-bottom: 20px;
    color: #555;
    line-height: 1.6;
}

/* Buttons */
.cjl-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cjl-btn-primary {
    background: #3498db;
    color: white;
}

.cjl-btn-primary:hover {
    background: #2980b9;
}

.cjl-btn-secondary {
    background: #95a5a6;
    color: white;
}

.cjl-btn-secondary:hover {
    background: #7f8c8d;
}

.cjl-btn-large {
    padding: 12px 30px;
    font-size: 16px;
}

/* No Jobs Found */
.cjl-no-jobs {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.cjl-no-jobs p {
    color: #6c757d;
    font-size: 16px;
}

/* Loading Spinner */
.cjl-loading {
    text-align: center;
    padding: 40px;
}

.cjl-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

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

.cjl-single-job-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.cjl-single-job-content {
    background: white;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cjl-job-header {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 2px solid #e9ecef;
}

.cjl-job-header .cjl-job-title {
    margin: 0 0 20px 0;
    font-size: 32px;
    color: #2c3e50;
}

.cjl-job-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
}

.cjl-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 15px;
}

.cjl-meta-item .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.cjl-job-description {
    margin-bottom: 40px;
}

.cjl-job-description h2 {
    font-size: 24px;
    margin: 0 0 20px 0;
    color: #2c3e50;
}

.cjl-job-description p {
    line-height: 1.8;
    color: #555;
    margin-bottom: 15px;
}

/* Application Section */
.cjl-job-application-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.cjl-job-application-section h2 {
    font-size: 24px;
    margin: 0 0 25px 0;
    color: #2c3e50;
}

.cjl-application-form {
    max-width: 100%;
}

.cjl-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

.cjl-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.cjl-form-group .required {
    color: #e74c3c;
}

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

.cjl-form-group textarea {
    resize: vertical;
}

.cjl-form-message {
    margin: 20px 0;
    padding: 15px;
    border-radius: 4px;
    display: none;
}

.cjl-form-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    display: block;
}

.cjl-form-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    display: block;
}

/* Application Closed Notice */
.cjl-application-closed {
    margin-bottom: 30px;
}

.cjl-notice {
    padding: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.cjl-notice-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.cjl-notice .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.cjl-notice p {
    margin: 0;
}

/* Back to Jobs */
.cjl-back-to-jobs {
    text-align: center;
}

.cjl-back-to-jobs .cjl-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cjl-job-listing-container {
        flex-direction: column;
    }
    
    .cjl-filters-sidebar {
        position: static;
        flex: 1;
    }
    
    .cjl-jobs-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cjl-form-row {
        grid-template-columns: 1fr;
    }
    
    .cjl-single-job-content {
        padding: 25px;
    }
    
    .cjl-job-meta-info {
        flex-direction: column;
        gap: 10px;
    }
}
