/**
 * Gravity Form Modal Styles
 *
 * Clean, modern design using theme.json variables
 */

/* Modal Overlay */
.lsf-gravity-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8); /* White background with 80% opacity */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: none; /* Hidden by default, JS will set to flex */
    align-items: flex-start; /* Align to top for scrolling */
    justify-content: center;
    padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40);
    transition: opacity 0.3s ease;
    overflow-y: auto; /* Allow overlay to scroll */
}

/* Modal Wrapper - Contains modal and close button */
.lsf-gravity-modal-wrapper {
    position: relative;
    width: 100%;
    max-width: min(1080px, calc(100vw - var(--wp--preset--spacing--60)));
    margin: 0 auto;
    min-height: min-content;
}

/* Modal Container */
.lsf-gravity-modal {
    background: var(--wp--preset--color--base);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15); /* Reduced shadow */
    position: relative;
    width: 100%;
    animation: modalSlideIn 0.3s ease;
    /* Remove max-height and overflow to prevent inner scrolling */
}

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

/* Modal Header */
.lsf-gravity-modal-header {
    padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--60) var(--wp--preset--spacing--40);
    border-bottom: 1px solid var(--wp--preset--color--accent-2);
    background: var(--wp--preset--color--accent-1);
}

/* Modal Title */
.lsf-gravity-modal-title {
    margin: 0;
    font-size: var(--wp--preset--font-size--x-large);
    font-weight: 400;
    color: var(--wp--preset--color--accent-4);
    font-family: var(--wp--preset--font-family--lexend);
    letter-spacing: -0.1px;
    line-height: 1.125;
    text-transform: none; /* Remove any text transformation */
}

/* Close Button - Simple header style */
.lsf-gravity-modal-close {
    position: absolute;
    top: var(--wp--preset--spacing--40);
    right: var(--wp--preset--spacing--40);
    color: var(--wp--preset--color--contrast);
    z-index: 10;
}

/* Modal Body - Contains the form content */
.lsf-gravity-modal-body {
    padding: var(--wp--preset--spacing--60);
}

/* Modal Description - Optional description text */
.lsf-gravity-modal-description {
    padding: 0 var(--wp--preset--spacing--60) var(--wp--preset--spacing--40);
    color: var(--wp--preset--color--contrast);
}

/* Modal Content - Where the form lives */
.lsf-modal-content {
    /* Form will have its own padding from Gravity Forms */
}

/* Tailwind utility classes handle the rest via PHP */
