/* Job Postings Manager Styles */
.jpm-job-listings {
    margin: 2rem 0;
}

.jpm-jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.jpm-job-card {
    border: 1px solid #ddd;
    padding: 1.5rem;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.jpm-job-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.4rem;
    line-height: 1.3;
}

.jpm-job-card h3 a {
    color: #333;
    text-decoration: none;
}

.jpm-job-card h3 a:hover {
    color: #0073aa;
}

.jpm-department {
    color: #666;
    font-size: 1.1rem;
    margin: 0 0 1rem;
    font-weight: 500;
}

.jpm-excerpt {
    margin: 1rem 0;
    color: #666;
    line-height: 1.5;
}

.jpm-job-meta {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: #666;
    flex-wrap: wrap;
}

.jpm-job-meta span {
    display: flex;
    align-items: center;
}

.jpm-job-meta span::before {
    content: "•";
    margin-right: 0.5rem;
    color: #999;
}

.jpm-job-meta span:first-child::before {
    display: none;
}

.jpm-apply-btn {
    display: inline-block;
    background: #0073aa;
    color: #fff;
    padding: 0.7rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 1rem;
    transition: background 0.2s ease;
    font-weight: 500;
}

.jpm-apply-btn:hover {
    background: #005a87;
    color: #fff;
    text-decoration: none;
}

/* Single Job Page */
.jpm-single-job {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.jpm-job-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
}

.jpm-job-header h1 {
    margin: 0 0 0.5rem;
    font-size: 2.5rem;
    line-height: 1.2;
    color: #333;
}

.jpm-job-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 768px) {
    .jpm-job-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .jpm-single-job {
        padding: 1rem;
    }
    
    .jpm-job-header h1 {
        font-size: 2rem;
    }
}

.jpm-job-description {
    line-height: 1.7;
}

.jpm-job-description h2,
.jpm-job-description h3,
.jpm-job-description h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.jpm-job-description ul,
.jpm-job-description ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.jpm-job-description li {
    margin-bottom: 0.5rem;
}

.jpm-company-intro {
    background: #f0f8ff;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid #0073aa;
}

.jpm-company-intro p {
    margin-bottom: 1rem;
}

.jpm-company-intro p:last-child {
    margin-bottom: 0;
}

.jpm-section {
    margin-top: 2.5rem;
}

.jpm-section h3 {
    color: #0073aa;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.jpm-job-details-box {
    background: #f8f8f8;
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content;
}

.jpm-job-details-box h3 {
    margin: 0 0 1rem;
    font-size: 1.3rem;
    color: #333;
}

.jpm-job-details-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.jpm-job-details-box li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.jpm-job-details-box li:last-child {
    border-bottom: none;
}

/* Application Form */
.jpm-application-form {
    grid-column: 1 / -1;
    background: #f8f8f8;
    padding: 2rem;
    border-radius: 8px;
    margin-top: 3rem;
}

.jpm-application-form h3 {
    margin: 0 0 2rem;
    font-size: 1.8rem;
    color: #333;
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-text {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Qualification Questions Styling */
.jpm-qualification-questions {
    background: #f0f0f0;
    padding: 1.5rem;
    border-radius: 6px;
    margin: 2rem 0;
}

.jpm-qualification-questions h4 {
    margin: 0 0 1rem;
    color: #333;
    font-size: 1.2rem;
}

.radio-group {
    margin-bottom: 1.2rem;
}

.radio-group > label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.radio-options {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.radio-options label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 0;
}

.radio-options input[type="radio"] {
    margin-right: 0.5rem;
    cursor: pointer;
    width: auto;
}

.checkbox-group {
    margin: 1.5rem 0;
}

.privacy-consent {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-weight: normal;
    line-height: 1.4;
}

.privacy-consent input[type="checkbox"] {
    margin-right: 0.5rem;
    margin-top: 0.2rem;
    cursor: pointer;
    width: auto;
    flex-shrink: 0;
}

.jpm-submit-btn {
    background: #0073aa;
    color: #fff;
    padding: 1rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    width: auto;
    min-width: 200px;
}

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

.jmp-submit-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px #0073aa;
}

.jpm-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#jpm-form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
    display: none;
    font-weight: 500;
}

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

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

/* File input styling */
input[type="file"] {
    padding: 0.5rem 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    width: 100%;
    cursor: pointer;
}

input[type="file"]:focus {
    outline: none;
    border-color: #0073aa;
}

/* Admin styles */
.view-application {
    color: #0073aa;
    text-decoration: none;
}

.view-application:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .jpm-jobs-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .jpm-job-card {
        padding: 1rem;
    }
    
    .jpm-application-form {
        padding: 1rem;
    }
    
    .radio-options {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .jpm-submit-btn {
        width: 100%;
    }
}

/* Print styles */
@media print {
    .jpm-application-form {
        display: none;
    }
    
    .jpm-job-card:hover {
        transform: none;
        box-shadow: none;
    }
}
/* Message Display Fixes */
#jpm-form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
    display: none; /* Hidden by default */
}

#jpm-form-message.success {
    background-color: #d4edda !important;
    color: #155724 !important;
    border: 1px solid #c3e6cb !important;
    display: block !important; /* Force visible when success class is added */
}

#jpm-form-message.error {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    border: 1px solid #f5c6cb !important;
    display: block !important; /* Force visible when error class is added */
}

/* Make sure the message div is visible in the template */
.jpm-application-form #jpm-form-message {
    display: none;
}

.jpm-application-form #jpm-form-message.success,
.jpm-application-form #jpm-form-message.error {
    display: block !important;
}
#jpm-form-message.success,
#jpm-form-message.error {
    display: block !important;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
}

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

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