/**
 * Popup para Gravity Forms - Estilos independientes
 */

/* Lightbox container */
.ivn-gform-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ivn-gform-lightbox.is-opened {
    opacity: 1;
    visibility: visible;
}

/* Backdrop */
.ivn-gform-lightbox__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

/* Content container */
.ivn-gform-lightbox__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    width: 100%;
}

@media (min-width: 768px) {
    .ivn-gform-lightbox__content {
        max-width: 1200px;
    }
}

/* Form wrapper */
.ivn-gform-lightbox__wrapper {
    position: relative;
    background-color: #F5F5F5;
    border-radius: 8px;
    padding: 4rem 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
    .ivn-gform-lightbox__wrapper {
        padding: 6rem 4rem;
    }
}

/* Close button */
.ivn-gform-lightbox__close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    transition: transform 0.2s ease, opacity 0.2s ease;
    z-index: 10;
}

.ivn-gform-lightbox__close:hover {
    transform: scale(1.1);
    opacity: 0.7;
}

.ivn-gform-lightbox__close svg {
    width: 24px;
    height: 24px;
}

/* Loading state */
.ivn-gform-lightbox__loading {
    background-color: #fff;
    padding: 4rem;
    border-radius: 8px;
    text-align: center;
    font-size: 1.6rem;
    color: #333;
}

/* Error state */
.ivn-gform-lightbox__error {
    background-color: #fff;
    padding: 4rem;
    border-radius: 8px;
    text-align: center;
    font-size: 1.6rem;
    color: #d32f2f;
}

/* Ajustes para el formulario dentro del popup */
.ivn-gform-lightbox__wrapper .ivn-BlockForm__container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

@media (min-width: 768px) {
    .ivn-gform-lightbox__wrapper .ivn-BlockForm__container {
        flex-direction: row;
        gap: 4rem;
    }
    
    .ivn-gform-lightbox__wrapper .ivn-BlockForm__container > * {
        flex: 1;
    }
}

/* Ajuste específico para h1.is-subtitle dentro del popup */
.ivn-gform-lightbox__wrapper h1.is-subtitle {
    font-size: 1.4rem !important;
}

@media (min-width: 768px) {
    .ivn-gform-lightbox__wrapper h1.is-subtitle {
        font-size: 1.8rem !important;
    }
}

/* Scrollbar styling */
.ivn-gform-lightbox__content::-webkit-scrollbar {
    width: 8px;
}

.ivn-gform-lightbox__content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.ivn-gform-lightbox__content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.ivn-gform-lightbox__content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}
