/**
 * CONTACTO WHATSAPP STYLES - ZONIT
 * Estilos para el formulario de contacto con integración WhatsApp
 * 
 * Versión: 1.0
 * Fecha: 10 de octubre de 2025
 */

/* ===== BOTÓN WHATSAPP EN FORMULARIO ===== */

/* Botón principal del formulario con ícono de WhatsApp */
form button[type="submit"] {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    border: none !important;
    color: white !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

form button[type="submit"]:hover {
    background: linear-gradient(135deg, #128C7E 0%, #0F6B5C 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3) !important;
}

form button[type="submit"]:active {
    transform: translateY(0) !important;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2) !important;
}

/* Animación del ícono de WhatsApp */
form button[type="submit"] svg {
    transition: transform 0.3s ease !important;
}

form button[type="submit"]:hover svg {
    transform: scale(1.1) !important;
}

/* Efecto de ondas al hacer click */
form button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

form button[type="submit"]:active::before {
    width: 300px;
    height: 300px;
}

/* ===== NOTIFICACIONES ===== */

/* Estilo para notificaciones de éxito */
.contacto-notification {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Estilo para notificaciones de error */
.contacto-notification.error {
    background: linear-gradient(135deg, #FF6B6B 0%, #EE5A52 100%);
}

/* ===== MEJORAS EN FORMULARIO ===== */

/* Focus mejorado para inputs */
form input:focus,
form select:focus,
form textarea:focus {
    border-color: #25D366 !important;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1) !important;
    transition: all 0.3s ease !important;
}

/* Label mejorado */
form label {
    font-weight: 600 !important;
    color: #374151 !important;
    margin-bottom: 0.5rem !important;
}

/* Placeholder mejorado */
form input::placeholder,
form textarea::placeholder {
    color: #9CA3AF !important;
    font-style: italic !important;
}

/* Select mejorado */
form select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
    background-position: right 0.5rem center !important;
    background-repeat: no-repeat !important;
    background-size: 1.5em 1.5em !important;
    padding-right: 2.5rem !important;
}

/* ===== INDICADOR DE CARGANDO ===== */

/* Spinner para cuando se está enviando */
form button[type="submit"].loading {
    pointer-events: none !important;
    opacity: 0.7 !important;
}

form button[type="submit"].loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ===== RESPONSIVE ===== */

/* Móvil */
@media (max-width: 640px) {
    form button[type="submit"] {
        font-size: 1rem !important;
        padding: 0.75rem 1rem !important;
    }
    
    form button[type="submit"] svg {
        width: 1.25rem !important;
        height: 1.25rem !important;
    }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 1024px) {
    form button[type="submit"] {
        font-size: 1.125rem !important;
        padding: 0.875rem 1.5rem !important;
    }
}

/* Desktop */
@media (min-width: 1025px) {
    form button[type="submit"] {
        font-size: 1.25rem !important;
        padding: 1rem 2rem !important;
    }
}

/* ===== ACCESIBILIDAD ===== */

/* Focus visible para navegación por teclado */
form button[type="submit"]:focus-visible {
    outline: 2px solid #25D366 !important;
    outline-offset: 2px !important;
}

/* Reducir animaciones si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
    form button[type="submit"],
    form input,
    form select,
    form textarea,
    .contacto-notification {
        transition: none !important;
        animation: none !important;
    }
}

/* ===== ESTADO DISABLED ===== */

form button[type="submit"]:disabled {
    background: #9CA3AF !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

form button[type="submit"]:disabled:hover {
    background: #9CA3AF !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ===== MEJORAS VISUALES ADICIONALES ===== */

/* Subtítulo informativo */
.form-whatsapp-info {
    background: linear-gradient(135deg, #E8F5E8 0%, #F0F9F0 100%);
    border: 1px solid #25D366;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: #065F46;
    text-align: center;
}

.form-whatsapp-info svg {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
    color: #25D366;
}

/* Icono de WhatsApp en el info */
.form-whatsapp-info::before {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%2325D366' viewBox='0 0 24 24'%3e%3cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893A11.821 11.821 0 0020.885 3.488'/%3e%3c/svg%3e");
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 0.5rem;
    vertical-align: middle;
}
