/**
 * Estilos para el efecto SMTP
 * Incluye animaciones de emails volando, contador y efectos visuales
 */

/* Contador de emails */
.email-counter {
    position: fixed;
    top: 2rem;
    left: 2rem;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #00ffff;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    color: #00ffff;
    font-size: 1.2rem;
    font-weight: bold;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    animation: slideInLeft 0.5s ease-out;
}

/* Email volador - GPU optimized */
.flying-email {
    position: fixed;
    font-size: 1.2rem;
    color: #00ffff;
    text-shadow: 0 0 20px #00ffff;
    pointer-events: none;
    z-index: 6;
    /* GPU acceleration for smooth animation */
    will-change: transform, opacity;
    transform: translateZ(0);
    /* Optimize rendering */
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Estela del email - performance optimized */
.email-trail {
    position: fixed;
    width: 4px;
    height: 4px;
    background: #00ffff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 6;
    opacity: 0.6;
    animation: fadeOut 0.5s ease-out forwards;
    /* GPU acceleration */
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Notificación de inbox - GPU optimized */
.inbox-notification {
    position: fixed;
    transform: translate3d(-50%, -50%, 0);
    background: rgba(0, 255, 255, 0.9);
    color: #000;
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: bold;
    pointer-events: none;
    z-index: 6;
    opacity: 0;
    animation: inboxNotification 2s ease-out forwards;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
    /* GPU acceleration */
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Pulso de llegada - performance optimized */
.email-pulse {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 3px solid #00ffff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 6;
    transform: translate3d(-50%, -50%, 0) scale(0);
    opacity: 1;
    animation: emailPulse 0.8s ease-out forwards;
    /* GPU acceleration */
    will-change: transform, opacity;
    backface-visibility: hidden;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    /* Email counter positioning for mobile */
    .email-counter {
        position: fixed;
        top: 0.5rem;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
        z-index: 50; /* Above map but below service buttons */
    }
    
    /* Smaller flying emails on mobile */
    .flying-email {
        font-size: 1rem;
        z-index: 6;
    }
    
    /* Smaller notifications on mobile */
    .inbox-notification {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
    
    /* Smaller email trail on mobile */
    .email-trail {
        width: 3px;
        height: 3px;
    }
    
    /* Smaller pulse effect on mobile */
    .email-pulse {
        width: 30px;
        height: 30px;
        border-width: 2px;
    }
}

/* Animaciones */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 0.6;
        transform: scale3d(1, 1, 1);
    }
    to {
        opacity: 0;
        transform: scale3d(0.5, 0.5, 1);
    }
}

@keyframes inboxNotification {
    0% {
        opacity: 0;
        transform: translate3d(-50%, -50%, 0) scale3d(0.5, 0.5, 1);
    }
    20% {
        opacity: 1;
        transform: translate3d(-50%, -50%, 0) scale3d(1.2, 1.2, 1);
    }
    40% {
        opacity: 1;
        transform: translate3d(-50%, -50%, 0) scale3d(1, 1, 1);
    }
    100% {
        opacity: 0;
        transform: translate3d(-50%, -70px, 0) scale3d(0.8, 0.8, 1);
    }
}

@keyframes emailPulse {
    0% {
        transform: translate3d(-50%, -50%, 0) scale3d(0, 0, 1);
        opacity: 1;
    }
    100% {
        transform: translate3d(-50%, -50%, 0) scale3d(2, 2, 1);
        opacity: 0;
    }
}

/* Efecto hover en el servicio SMTP */
.service-icon-box[data-service="smtp"].active {
    transform: scale(1.1);
    animation: pulse 1s ease-in-out infinite;
}

.service-icon-box[data-service="smtp"].active i {
    animation: wiggle 0.5s ease-in-out infinite;
}

@keyframes wiggle {
    0%, 100% { transform: rotateZ(0deg); }
    25% { transform: rotateZ(-5deg); }
    75% { transform: rotateZ(5deg); }
}

/* Ajustes para móvil */
@media (max-width: 768px) {
    .email-counter {
        top: 1rem;
        left: 1rem;
        font-size: 1rem;
        padding: 0.8rem 1.2rem;
    }
    
    .flying-email {
        font-size: 1rem;
    }
}