/* HD Jobs Apply Modal - Styles matching sitepackage design */

.hd-jobs-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    font-family: 'Dosis', sans-serif;
}

.hd-jobs-modal-overlay.is-open {
    display: flex;
}

.hd-jobs-modal {
    background: #fff;
    border-radius: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: hdJobsModalIn 0.3s ease;
}

@keyframes hdJobsModalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.hd-jobs-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eaedf0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #eaedf0;
}

.hd-jobs-modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2a2a2a;
}

.hd-jobs-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    color: #797979;
    transition: color 0.2s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.hd-jobs-modal-close:focus {
    outline: 2px solid #ffcd00;
    outline-offset: 2px;
}

.hd-jobs-modal-body {
    padding: 1.5rem;
}

.hd-jobs-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eaedf0;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: #f8f9fa;
}

/* Form Styles */
.hd-jobs-apply-form .form-group {
    margin-bottom: 1.25rem;
}

.hd-jobs-apply-form .form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hd-jobs-apply-form .form-row .form-group {
    flex: 1;
    min-width: 200px;
}

.hd-jobs-apply-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #4a4a4a;
    font-size: 1rem;
}

.hd-jobs-apply-form input[type="text"],
.hd-jobs-apply-form input[type="email"],
.hd-jobs-apply-form input[type="file"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #eaedf0;
    border-radius: 0;
    font-size: 1rem;
    font-family: 'Dosis', sans-serif;
    color: #4a4a4a;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hd-jobs-apply-form input:focus {
    outline: none;
    border-color: #ffcd00;
    box-shadow: 0 0 0 3px rgba(255, 205, 0, 0.2);
}

.hd-jobs-apply-form input.is-invalid {
    border-color: #dc1f2e;
}

.hd-jobs-apply-form .invalid-feedback {
    display: none;
    color: #dc1f2e;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

.hd-jobs-apply-form input.is-invalid ~ .invalid-feedback,
.hd-jobs-apply-form .form-check input.is-invalid ~ .invalid-feedback {
    display: block;
}

.hd-jobs-apply-form .form-text {
    font-size: 0.875rem;
    color: #797979;
    margin-top: 0.25rem;
}

.hd-jobs-apply-form .form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hd-jobs-apply-form .form-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 0.15rem;
    accent-color: #ffcd00;
    cursor: pointer;
}

.hd-jobs-apply-form .form-check-label {
    margin-bottom: 0;
    font-weight: normal;
    flex: 1;
}

.hd-jobs-apply-form .form-check-label a {
    color: #4a4a4a;
    text-decoration: underline;
    font-weight: 600;
}

.hd-jobs-apply-form .form-check-label a:hover {
    color: #000;
}

.hd-jobs-apply-form .form-check .invalid-feedback {
    flex-basis: 100%;
}

/* Buttons */
.hd-jobs-btn {
    padding: 0.625rem 1.5rem;
    border-radius: 17px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Dosis', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hd-jobs-btn:focus {
    outline: 2px solid #ffcd00;
    outline-offset: 2px;
}

.hd-jobs-btn-primary {
    background: #ffcd00;
    color: #4a4a4a;
}

.hd-jobs-btn-primary:hover {
    background: #000;
    color: #fff;
    box-shadow: 0 5px 11px 0 rgba(0, 0, 0, 0.18);
}

.hd-jobs-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.hd-jobs-btn-secondary {
    background: transparent;
    color: #4a4a4a;
    border: 2px solid #797979;
}

.hd-jobs-btn-secondary:hover {
    background: #eaedf0;
    border-color: #4a4a4a;
}

/* Alerts */
.hd-jobs-alert {
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.hd-jobs-alert-success {
    background: linear-gradient(135deg, #ffcd00 0%, #f5c000 100%);
    color: #4a4a4a;
    border: none;
    padding: 1.5rem;
    text-align: center;
    font-size: 1rem;
    line-height: 1.6;
}

.hd-jobs-alert-success strong {
    display: block;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #2a2a2a;
}

.hd-jobs-alert-error {
    background: #fdf0f0;
    color: #dc1f2e;
    border-left: 4px solid #dc1f2e;
}

.hd-jobs-alert-info {
    background: #eaedf0;
    color: #4a4a4a;
    border-left: 4px solid #797979;
    text-align: center;
    padding: 1.5rem;
}

.hd-jobs-alert-info strong {
    display: block;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #2a2a2a;
}

.hd-jobs-hidden {
    display: none !important;
}

/* Spinner */
.hd-jobs-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: hdJobsSpin 0.8s linear infinite;
    margin-left: 0.5rem;
}

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

/* Job Selection List */
.hd-jobs-select-intro {
    margin-bottom: 1rem;
    color: #4a4a4a;
}

.hd-jobs-select-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hd-jobs-select-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border: 2px solid #eaedf0;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    font-family: 'Dosis', sans-serif;
}

.hd-jobs-select-item:hover {
    background: #fff;
    border-color: #ffcd00;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hd-jobs-select-item:focus {
    outline: 2px solid #ffcd00;
    outline-offset: 2px;
}

.hd-jobs-select-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2a2a2a;
    margin-bottom: 0.25rem;
}

.hd-jobs-select-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.hd-jobs-select-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: #ffcd00;
    color: #4a4a4a;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.hd-jobs-select-location {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    color: #797979;
}

.hd-jobs-select-location::before {
    content: '\f041';
    font-family: 'FontAwesome', sans-serif;
    margin-right: 0.25rem;
}

/* Responsive */
@media (max-width: 575.98px) {
    .hd-jobs-modal {
        width: 95%;
        max-height: 95vh;
    }

    .hd-jobs-modal-header,
    .hd-jobs-modal-body,
    .hd-jobs-modal-footer {
        padding: 1rem;
    }

    .hd-jobs-apply-form .form-row {
        flex-direction: column;
    }

    .hd-jobs-apply-form .form-row .form-group {
        min-width: 100%;
    }

    .hd-jobs-modal-footer {
        flex-direction: column-reverse;
    }

    .hd-jobs-modal-footer .hd-jobs-btn {
        width: 100%;
    }

    .hd-jobs-select-item {
        padding: 0.875rem 1rem;
    }
}
