/* ========================================
   WAZE BUTTON STYLES
   To use this component, include this CSS file and add the following HTML to your page:
   
   <a href="..." target="_blank" class="waze-float" title="Navegar con Waze">
       <svg class="waze-icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false">
           <!-- Waze SVG icon -->
       </svg>
       <span class="waze-text" style="text-decoration:none !important;">Waze a<br> nuestro local</span>
   </a>
   
   Also include this script file for animations:
   <script src="waze_button.js"></script>
======================================= */

.waze-float {
    position: fixed;
    bottom: var(--waze-bottom-offset, 30px);
    left: calc(30px + (100vw - 120px) / 3); /* Uniform spacing */
    width: auto;
    min-width: 60px;
    height: auto; /* Permitir altura automática para texto multilinea */
    min-height: 60px; /* Mantener altura mínima */
    background: var(--waze-primary-color, #9370DB); /* Fondo púrpura Waze */
    border-radius: 30px; /* Rounded rectangle */
    display: flex;
    align-items: center;
    box-shadow: 0 4px 16px rgba(147, 112, 219, 0.3);
    z-index: 10000;
    transition: all 0.3s ease;
    animation: wazePulse 2s infinite;
    padding: 8px 15px; /* Ajustar padding para acomodar texto multilinea */
    white-space: nowrap; /* Mantener en una línea por defecto */
    overflow: hidden; /* Hide overflow */
    text-decoration: none !important; /* Eliminar subrayado para enlaces */
    color: inherit; /* Asegurar color de texto */
    justify-content: flex-start; /* Alinear contenido al inicio (izquierda) */
}

/* Estilos para diferentes estados del enlace */
.waze-float:link {
    text-decoration: none !important;
    color: inherit !important;
}

.waze-float:visited {
    text-decoration: none !important;
    color: inherit !important;
}

.waze-float:hover {
    text-decoration: none !important;
    color: inherit !important;
}

.waze-float:active {
    text-decoration: none !important;
    color: inherit !important;
}

.waze-float .waze-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    flex-shrink: 0; /* Don't let icon shrink */
    fill: #FF0000; /* Rojo distintivo como en Google Maps */
}

.waze-float {
    color: white !important;
    text-decoration: none !important;
    text-decoration-line: none !important;
    text-decoration-style: none !important;
    text-decoration-color: none !important;
    text-underline: none !important;
    text-underline-style: none !important;
    -webkit-text-decoration: none !important;
    -webkit-text-decoration-line: none !important;
    -webkit-text-decoration-style: none !important;
    -webkit-text-decoration-color: none !important;
    -webkit-text-underline: none !important;
    -webkit-text-underline-style: none !important;
    text-shadow: none;
    border: none;
    outline: none;
}

.waze-float .waze-text {
    color: white; /* Blanco para contraste */
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 12px;
    white-space: normal; /* Permitir saltos de línea */
    text-decoration: none !important;
    text-decoration-line: none !important;
    text-decoration-style: none !important;
    text-decoration-color: none !important;
    text-underline: none !important;
    text-underline-style: none !important;
    -webkit-text-decoration: none !important;
    -webkit-text-decoration-line: none !important;
    -webkit-text-decoration-style: none !important;
    -webkit-text-decoration-color: none !important;
    -webkit-text-underline: none !important;
    -webkit-text-underline-style: none !important;
    text-shadow: none;
    border: none;
    outline: none;
    line-height: 1.2; /* Ajustar altura de línea para texto multilinea */
    text-align: left; /* Alinear texto a la izquierda */
    flex: 1; /* Permitir que el texto ocupe el espacio restante */
}

.waze-float:hover {
    background: var(--waze-secondary-color, #6A5ACD); /* Púrpura más oscuro en hover */
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(147, 112, 219, 0.4);
    min-width: 130px; /* Wider on hover to show full text */
}

.waze-float:hover .waze-text {
    font-size: 13px;
}

.waze-float svg {
    transition: transform 0.3s ease;
}

.waze-float:hover svg {
    transform: scale(1.1);
}

/* Initial attention animation */
.waze-float.initial-animation {
    animation: wazeAttention var(--waze-animation-duration, 1.5s) ease 1s 1 normal forwards;
}

.waze-float.scroll-animation {
    animation: wazeScrollAttention var(--waze-scroll-duration, 1s) ease;
}

/* Animación de pulso para llamar la atención */
@keyframes wazePulse {
    0% {
        box-shadow: 0 4px 16px rgba(147, 112, 219, 0.3);
    }
    50% {
        box-shadow: 0 4px 16px rgba(147, 112, 219, 0.6);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 4px 16px rgba(147, 112, 219, 0.3);
    }
}

/* Animación inicial de atención */
@keyframes wazeAttention {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 16px rgba(147, 112, 219, 0.3);
    }
    50% {
        transform: scale(var(--waze-initial-scale, 1.4));
        box-shadow: 0 8px 25px rgba(147, 112, 219, 0.6);
        background: var(--waze-secondary-color, #6A5ACD);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 16px rgba(147, 112, 219, 0.3);
    }
}

/* Animación de atención al hacer scroll */
@keyframes wazeScrollAttention {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(var(--waze-scroll-scale, 1.2));
        background: var(--waze-secondary-color, #0099CC);
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive para Waze */
@media (max-width: 768px) {
    .waze-float {
        width: auto;
        min-width: 55px;
        height: auto; /* Permitir altura automática */
        min-height: 55px;
        bottom: calc(var(--waze-bottom-offset, 30px) + 10px);
        left: 100px;
        padding: 6px 12px; /* Ajustar padding para texto multilinea */
    }
    
    .waze-float .waze-icon {
        width: 22px;
        height: 22px;
        margin-right: 6px;
    }
    
    .waze-float .waze-text {
        font-size: 10px; /* Ajustar tamaño de texto en móvil */
        line-height: 1.1; /* Ajustar altura de línea */
    }
}

@media (max-width: 480px) {
    .waze-float {
        width: auto;
        min-width: 50px;
        height: auto; /* Permitir altura automática */
        min-height: 50px;
        bottom: calc(var(--waze-bottom-offset, 30px) + 15px);
        left: 80px;
        padding: 5px 10px; /* Ajustar padding para texto multilinea */
    }
    
    .waze-float .waze-icon {
        width: 20px;
        height: 20px;
        margin-right: 5px;
    }
    
    .waze-float .waze-text {
        font-size: 9px; /* Ajustar tamaño de texto en móvil pequeño */
        line-height: 1.1; /* Ajustar altura de línea */
    }
}