/* ============================================
   STANDARDIZED POPUP MODAL STYLES
   Use this file across all pages for consistency
   ============================================ */

/* Modal Overlay */
.popup-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.popup-modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Container */
.popup-modal-container {
    width: 1066px;
    max-width: 95%;
    height: 640px;
    max-height: 90vh;
    background-color: #ffffff;
    border-radius: 20px;
    display: flex;
    overflow: hidden;
    position: relative;
    box-shadow: 0px 16px 10px rgba(102, 102, 102, 0.1);
    animation: slideUp 0.3s ease;
    /* Ensure corners are properly clipped */
    isolation: isolate;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close Button */
.popup-modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    z-index: 10;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    /* Ensure button stays within rounded corners */
    margin-top: 0;
    margin-right: 0;
}

.popup-modal-close:hover {
    color: #333;
    background: rgba(255, 255, 255, 1);
    transform: rotate(90deg);
}

/* Image Side */
.popup-modal-image {
    width: 50%;
    height: 100%;
    /* Background image will be set dynamically by JavaScript to handle subdirectories */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Ensure image respects container's border-radius on left side */
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
    flex-shrink: 0;
}

/* Form Side */
.popup-modal-form {
    width: 50%;
    padding: 45px 50px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Ensure form respects container's border-radius on right side */
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
    flex-shrink: 0;
    /* Ensure content fits without scrolling */
    min-height: 0;
    box-sizing: border-box;
}

.popup-modal-form h2 {
    font-size: 26px;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    flex-shrink: 0;
}

/* Form Rows and Groups */
.popup-modal-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.popup-modal-form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
    flex-shrink: 0;
    min-width: 0;
}

.popup-modal-form-group label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.popup-modal-form-group input,
.popup-modal-form-group select {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    color: #666;
    outline: none;
    width: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: border-color 0.3s ease;
}

.popup-modal-form-group input:focus,
.popup-modal-form-group select:focus {
    border-color: #e91e63;
}

.popup-modal-form-group input::placeholder {
    color: #999;
}

/* Location Warning */
.popup-modal-location-warning {
    font-size: 11px;
    color: #666;
    text-align: right;
    margin-top: 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.popup-modal-location-warning span {
    color: #e91e63;
}

/* Submit Button */
.popup-modal-submit-btn {
    background-color: #e91e63;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: auto;
    width: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.popup-modal-submit-btn:hover {
    background-color: #d81b60;
    transform: translateY(-2px);
    box-shadow: 0px 4px 12px rgba(233, 30, 99, 0.3);
}

.popup-modal-submit-btn:active {
    transform: translateY(0);
}

/* Mobile Responsiveness */
@media (max-width: 1100px) {
    .popup-modal-container {
        width: 95%;
        height: auto;
        flex-direction: column;
        max-height: 90vh;
    }

    .popup-modal-image {
        display: none;
    }

    .popup-modal-form {
        width: 100%;
        padding: 30px 20px;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        border-bottom-left-radius: 20px;
        border-bottom-right-radius: 20px;
        overflow: hidden;
    }

    .popup-modal-form h2 {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .popup-modal-form-row {
        flex-direction: column;
        gap: 0;
    }
}

@media (max-width: 768px) {
    .popup-modal-form {
        padding: 25px 15px;
        overflow: hidden;
    }

    .popup-modal-form h2 {
        font-size: 20px;
    }

    .popup-modal-close {
        top: 15px;
        right: 15px;
        font-size: 20px;
    }
    
    /* Reduce spacing on mobile to fit content */
    .popup-modal-form-group {
        margin-bottom: 15px;
    }
    
    .popup-modal-form-row {
        margin-bottom: 15px;
    }
}

