/* 
==============================================
   ENERA JOB BANK - CORE STYLES
==============================================
*/
.enera-job-bank-wrapper {
    font-family: inherit;
    margin-bottom: 2rem;
}

.enera-job-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media(min-width: 768px) {
    .enera-job-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

.enera-job-card {
    background: #ffffff;
    border: 1px solid #eaecf0;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.enera-job-card:hover {
    box-shadow: 0 4px 8px -2px rgba(16, 24, 40, 0.1);
    transform: translateY(-2px);
    border-color: #db5919;
}

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

.job-card-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: #0a0e17;
}

.job-card-header a {
    color: inherit;
    text-decoration: none;
}

.job-card-header a:hover {
    color: #db5919;
}

.job-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.job-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.type-badge {
    background: rgba(219, 89, 25, 0.1);
    color: #db5919;
}

.location-badge {
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 4px;
}

.location-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 14px;
}

.job-card-body {
    flex-grow: 1;
}

.job-excerpt {
    color: #475467;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.job-salary {
    font-size: 0.9rem;
    color: #0f172a;
    background: #f8fafc;
    padding: 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.job-card-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eaecf0;
}

/* Form Styles */
.enera-application-form-wrapper {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #eaecf0;
    margin-top: 2.5rem;
}

.enera-application-form-wrapper h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #0a0e17;
}

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

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group.half {
    flex: 1;
    margin-bottom: 0;
}

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

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #db5919;
    box-shadow: 0 0 0 2px rgba(219, 89, 25, 0.1);
}

.form-group input[type="file"] {
    display: block;
    width: 100%;
    padding: 0.5rem 0;
}

/* Button */
.enera-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.primary-btn {
    background: #db5919;
    color: #ffffff;
    width: 100%;
}

.primary-btn:hover {
    background: #c04e15;
    color: #ffffff;
}

.primary-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.job-card-footer .enera-btn {
    background: #0a0e17;
    color: #ffffff;
    width: 100%;
    text-align: center;
}

.job-card-footer .enera-btn:hover {
    background: #db5919;
}

.spinner {
    margin-left: 8px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

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

#enera-form-response {
    padding: 1rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
}

#enera-form-response.success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

#enera-form-response.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

@media(max-width: 600px) {
    .form-row {
        flex-direction: column;
    }
}

/* Modal Styles */
.enera-application-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.enera-application-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.enera-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 23, 0.7);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.enera-modal-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    z-index: 10;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.enera-application-modal.is-open .enera-modal-content {
    transform: translateY(0);
}

.enera-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
    transition: all 0.2s;
    z-index: 20;
}

.enera-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.enera-modal-body {
    position: relative;
}

.enera-modal-body .enera-application-form-wrapper {
    margin-top: 0;
    border: none;
    border-radius: 12px;
    padding: 2.5rem;
    background: #ffffff;
}

.enera-single-job-page .enera-apply-trigger-btn:hover {
    background-color: var(--c-primary-hover, #c04e15) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(219, 89, 25, 0.2);
}