/* ========================================
   UBER BUTTON STYLES
   To use this component, include this CSS file and add the following HTML to your page:
   
   <a href="https://m.uber.com/ul/..." target="_blank" class="uber-float" title="Llamar a Uber">
       <svg width="32" height="32" viewBox="0 0 24 24" fill="white">
           <path d="M19.34 6.58c-.3-.56-1.04-.82-1.63-.5L7.4 11.02a2 2 0 0 0-1.1 2.6l3.1 6.21c.3.6 1.06.87 1.65.58l1.67-.88 5.26-9.5c.3-.56.1-1.28-.74-1.27zM8.13 14.26l-1.7-3.42 3.35-1.76 1.68-2.56L6.1 11 8.12 14.26z"/>
       </svg>
   </a>
   
   Also include this script file for animations:
   <script src="uber_button.js"></script>
======================================== */

.uber-float {
    position: fixed;
    bottom: var(--uber-bottom-offset, 30px);
    left: calc(30px + 2 * (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(--uber-primary-color, #FFD700); /* Fondo amarillo */
    border-radius: 30px; /* Rounded rectangle */
    display: flex;
    align-items: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transition: all 0.3s ease;
    animation: uberPulse 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 */
.uber-float:link {
    text-decoration: none !important;
    color: inherit !important;
}

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

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

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

.uber-float .uber-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    flex-shrink: 0; /* Don't let icon shrink */
}

.uber-float {
    color: #333333 !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;
}

.uber-float .uber-text {
    color: #333333; /* Gris oscuro */
    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 */
}

.uber-float:hover {
    background: var(--uber-secondary-color, #FFA500); /* Naranja en hover para contraste */
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    min-width: 130px; /* Wider on hover to show full text */
}

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

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

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

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

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

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

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

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

/* Responsive para Uber */
@media (max-width: 768px) {
    .uber-float {
        width: auto;
        min-width: 55px;
        height: auto; /* Permitir altura automática */
        min-height: 55px;
        bottom: calc(var(--uber-bottom-offset, 30px) + 10px);
        padding: 6px 12px; /* Ajustar padding para texto multilinea */
    }
    
    .uber-float .uber-icon {
        width: 22px;
        height: 22px;
        margin-right: 6px;
    }
    
    .uber-float .uber-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) {
    .uber-float {
        width: auto;
        min-width: 50px;
        height: auto; /* Permitir altura automática */
        min-height: 50px;
        bottom: calc(var(--uber-bottom-offset, 30px) + 15px);
        padding: 5px 10px; /* Ajustar padding para texto multilinea */
    }
    
    .uber-float .uber-icon {
        width: 20px;
        height: 20px;
        margin-right: 5px;
    }
    
    .uber-float .uber-text {
        font-size: 9px; /* Ajustar tamaño de texto en móvil pequeño */
        line-height: 1.1; /* Ajustar altura de línea */
    }
}