/*
---------------------
Module Application Modal
---------------------
*/

/* Modal Overlay */
.fhb-application-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.fhb-application-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.fhb-application-modal__overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fhb-modal-fadeIn 300ms ease-out;
}

/* Modal Container */
.fhb-application-modal__container {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    margin: 20px;
    padding: 30px;
    background-color: #ffffff;
    overflow-y: auto;
    z-index: 1;
    animation: fhb-modal-slideIn 300ms ease-out;
}

/* Close Button */
.fhb-application-modal__close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    padding: 0;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 200ms ease;
}

.fhb-application-modal__close:hover {
    opacity: 1;
}

/* Modal Header */
.fhb-application-modal__header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.fhb-application-modal__title {
    margin: 0 0 8px 0;
}

.fhb-application-modal__job-title {
    margin: 0;
    opacity: 0.7;
}

.fhb-application-modal__job-title:empty {
    display: none;
}

/* Modal Content */
.fhb-application-modal__content {
    /* CF7 form styles will be inherited from theme */
}

/* Animations */
@keyframes fhb-modal-fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fhb-modal-slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Body scroll lock when modal is open */
body.fhb-modal-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 640px) {
    .fhb-application-modal__container {
        width: 95%;
        margin: 10px;
        padding: 20px;
    }

    .fhb-application-modal__close {
        top: 10px;
        right: 10px;
    }
}
