/* =========================================================
   Popup Form – Shared Campus Component
   ========================================================= */

/* Overlay */
.popup-form-overlay {
    display: flex;
    align-items: center;
    justify-content: center;

    position: fixed;
    inset: 0;
    z-index: 9999;

    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-form-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Modal box */
.popup-form-modal {
    position: relative;
    display: flex;
    width: 85vw;
    max-height: 92vh;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.35);

    transform: translateY(24px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.popup-form-overlay.is-visible .popup-form-modal {
    transform: translateY(0) scale(1);
}

/* Close button */
.popup-form-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.22);

    font-size: 1.05rem;
    line-height: 1;
    color: #333;
    cursor: pointer;

    transition: background 0.2s, transform 0.2s;
}

.popup-form-close:hover {
    background: #fff;
    transform: scale(1.12);
}

/* Image column */
.popup-form-image {
    flex: 0 0 44%;
    min-height: 540px;
    overflow: hidden;
}

.popup-form-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Form column */
.popup-form-content {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    min-height: 540px;
    overflow: hidden;
}

/* CRM iframe inside popup */
.popup-form-iframe {
    flex: 1 1 0;
    width: 100%;
    border: none;
    min-height: 540px;
}

/* ── Responsive: mobile – hide image, show only form ────── */
@media (max-width: 640px) {
    .popup-form-modal {
        flex-direction: column;
        width: 96vw;
        height: 92vh;
        max-height: 92vh;
        border-radius: 10px;
        overflow: hidden;
    }

    /* Hide image completely on mobile */
    .popup-form-image {
        display: none;
    }

    .popup-form-content {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        min-height: 0;
        height: 100%;
        overflow: hidden;
    }

    .popup-form-iframe {
        flex: 1 1 auto;
        width: 100%;
        height: 100%;
        min-height: 0;
    }
}
