/**
 * GLV Email Capture - Popup Styles
 */

/* Overlay */
.glv-email-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Popup container */
.glv-email-popup {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    padding: 0;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    transform-origin: center;
}

/* Decoración superior */
.glv-email-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: #ffb855;
    overflow: hidden;
}

.glv-email-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
}

.glv-email-circle-1 {
    width: 120px;
    height: 120px;
    top: -40px;
    left: -30px;
}

.glv-email-circle-2 {
    width: 80px;
    height: 80px;
    top: 20px;
    right: -20px;
}

.glv-email-circle-3 {
    width: 50px;
    height: 50px;
    top: 50px;
    left: 40%;
}

/* Contenido */
.glv-email-content {
    position: relative;
    padding: 70px 40px 40px;
    text-align: center;
}

/* Icono principal */
.glv-email-icon {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 70px;
    background: #ffb855;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border: 4px solid #fff;
}

.glv-email-icon-emoji {
    font-size: 32px;
    line-height: 1;
}

/* Badge */
.glv-email-badge {
    display: inline-block;
    padding: 6px 16px;
    background: #ffb855;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    border-radius: 20px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

/* Textos */
.glv-email-title {
    font-size: 28px;
    font-weight: 800;
    color: #0ca2ac;
    margin: 0 0 10px;
    line-height: 1.2;
}

.glv-email-subtitle {
    font-size: 18px;
    color: #555;
    margin: 0 0 10px;
    font-weight: 500;
}

.glv-email-description {
    font-size: 14px;
    color: #666;
    margin: 0 0 20px;
    line-height: 1.6;
}

/* Formulario */
.glv-email-form {
    margin: 0;
}

.glv-email-field {
    margin-bottom: 12px;
}

.glv-email-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 15px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #f9f9f9;
}

.glv-email-input:focus {
    border-color: #ffb855;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 184, 85, 0.15);
}

.glv-email-input::placeholder {
    color: #aaa;
}

/* Botón */
.glv-email-btn {
    width: 100%;
    padding: 16px 30px;
    font-size: 16px;
    font-weight: 700;
    color: #fff !important;
    background-color: #ffb855;
    border: 2px solid #ffb855;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.glv-email-btn:hover {
    background-color: #0ca2ac;
    border-color: #0ca2ac;
    color: #fff !important;
}

.glv-email-btn:active {
    transform: translateY(1px);
}

.glv-email-btn-icon {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.glv-email-btn:hover .glv-email-btn-icon {
    transform: translateX(5px);
}

.glv-email-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Loading state */
.glv-email-btn.loading .glv-email-btn-text {
    opacity: 0;
}

.glv-email-btn.loading::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: glv-email-spin 0.8s linear infinite;
}

@keyframes glv-email-spin {
    to { transform: rotate(360deg); }
}

/* Privacidad */
.glv-email-privacy {
    font-size: 11px;
    color: #999;
    margin: 15px 0 0;
    line-height: 1.5;
}

.glv-email-privacy a {
    color: #0ca2ac;
    text-decoration: underline;
}

/* No spam */
.glv-email-no-spam {
    font-size: 12px;
    color: #888;
    margin: 15px 0 0;
}

/* Mensajes */
.glv-email-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
}

.glv-email-message.error {
    background: #fee;
    color: #c00;
    border: 1px solid #fcc;
}

/* Botón cerrar */
.glv-email-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glv-email-close:hover {
    background: #fff;
    color: #ffb855;
    transform: rotate(90deg);
}

/* Success state */
.glv-email-success {
    padding: 60px 40px;
    text-align: center;
}

.glv-email-success-icon {
    margin-bottom: 25px;
}

.glv-email-checkmark {
    width: 80px;
    height: 80px;
}

.glv-email-checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #0ca2ac;
    animation: glv-stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.glv-email-checkmark-check {
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-width: 3;
    stroke-linecap: round;
    stroke: #0ca2ac;
    animation: glv-stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes glv-stroke {
    100% { stroke-dashoffset: 0; }
}

.glv-email-success-title {
    font-size: 24px;
    color: #0ca2ac;
    margin: 0 0 15px;
}

.glv-email-success-text {
    font-size: 15px;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

/* Animaciones de entrada */
.glv-email-anim-zoom {
    animation: glvEmailZoom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes glvEmailZoom {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.glv-email-anim-slide {
    animation: glvEmailSlide 0.4s ease-out;
}

@keyframes glvEmailSlide {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.glv-email-anim-bounce {
    animation: glvEmailBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes glvEmailBounce {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Overlay animation */
.glv-email-overlay {
    animation: glvEmailFade 0.3s ease;
}

@keyframes glvEmailFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 520px) {
    .glv-email-overlay {
        padding: 15px;
        align-items: flex-end;
    }

    .glv-email-popup {
        border-radius: 20px 20px 0 0;
        max-height: 90vh;
        overflow-y: auto;
    }

    .glv-email-decoration {
        height: 80px;
    }

    .glv-email-content {
        padding: 60px 25px 30px;
    }

    .glv-email-icon {
        width: 60px;
        height: 60px;
        top: -25px;
    }

    .glv-email-icon-emoji {
        font-size: 26px;
    }

    .glv-email-title {
        font-size: 20px;
    }

    .glv-email-subtitle {
        font-size: 15px;
    }

    .glv-email-input {
        padding: 14px 16px;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .glv-email-btn {
        padding: 14px 20px;
        font-size: 14px;
    }

    .glv-email-close {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
}

/* Ocultar en móvil si está configurado */
@media (max-width: 768px) {
    .glv-email-hide-mobile {
        display: none !important;
    }
}

/* Focus visible para accesibilidad */
.glv-email-input:focus-visible,
.glv-email-btn:focus-visible,
.glv-email-close:focus-visible {
    outline: 3px solid #0ca2ac;
    outline-offset: 2px;
}
