/* Price Ticker Pro - CSS */
/* Archivo: assets/style.css */

.ptp-ticker-container {
    width: 100%;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    overflow: hidden;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ptp-ticker-wrapper {
    width: 100%;
    height: 44px;
    position: relative;
    overflow: hidden;
}

.ptp-ticker-content {
    display: flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

/* Velocidades base */
.ptp-speed-slow {
    animation: ptp-scroll 100s linear infinite;
}

.ptp-speed-normal {
    animation: ptp-scroll 50s linear infinite;
}

.ptp-speed-fast {
    animation: ptp-scroll 25s linear infinite;
}

/* Velocidades optimizadas para móvil */
@media (max-width: 768px) {
    .ptp-speed-slow {
        animation: ptp-scroll 60s linear infinite;
    }

    .ptp-speed-normal {
        animation: ptp-scroll 35s linear infinite;
    }

    .ptp-speed-fast {
        animation: ptp-scroll 20s linear infinite;
    }
}

/* Pausa con hover */
.ptp-ticker-container:hover .ptp-ticker-content {
    animation-play-state: paused;
}

/* Animación de movimiento */
@keyframes ptp-scroll {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.ptp-ticker-item {
    display: inline-flex;
    align-items: center;
    padding: 0 16px;
    margin: 0 8px;
    background: rgba(249, 250, 251, 0.8);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid rgba(229, 231, 235, 0.6);
    flex-shrink: 0;
}

.ptp-ticker-item:hover {
    background: rgba(243, 244, 246, 0.9);
    transform: scale(1.02);
    border-color: rgba(156, 163, 175, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ptp-product-name {
    color: #374151;
    font-size: 13px;
    margin-right: 8px;
    font-weight: 500;
}

.ptp-arrow {
    font-size: 14px;
    margin-right: 4px;
    font-weight: 600;
}

.ptp-percentage {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 8px;
}

/* Colores por defecto */
.ptp-down {
    color: #059669;
}

.ptp-up {
    color: #dc2626;
}

.ptp-unchanged {
    color: #6b7280;
}

.ptp-percentage.ptp-down {
    background: rgba(5, 150, 105, 0.1);
    border: 1px solid rgba(5, 150, 105, 0.2);
    color: #047857;
}

.ptp-percentage.ptp-up {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: #b91c1c;
}

.ptp-percentage.ptp-unchanged {
    background: rgba(107, 114, 128, 0.1);
    border: 1px solid rgba(107, 114, 128, 0.2);
    color: #4b5563;
}

/* Gradientes laterales */
.ptp-ticker-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 1), transparent);
    z-index: 10;
    pointer-events: none;
}

.ptp-ticker-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(to left, rgba(255, 255, 255, 1), transparent);
    z-index: 10;
    pointer-events: none;
}

/* Sin datos */
.ptp-no-data {
    text-align: center;
    padding: 15px;
    color: #6b7280;
    font-style: italic;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

/* Responsive móvil */
@media (max-width: 768px) {
    .ptp-ticker-wrapper {
        height: 40px;
    }
    
    .ptp-ticker-item {
        padding: 0 12px;
        margin: 0 4px;
    }
    
    .ptp-product-name {
        font-size: 11px;
    }
    
    .ptp-arrow {
        font-size: 12px;
    }
    
    .ptp-percentage {
        font-size: 10px;
        padding: 1px 6px;
    }
}

@media (max-width: 480px) {
    .ptp-ticker-wrapper {
        height: 36px;
    }
    
    .ptp-ticker-item {
        padding: 0 8px;
        margin: 0 2px;
    }
    
    .ptp-product-name {
        font-size: 10px;
    }
    
    .ptp-arrow {
        font-size: 11px;
    }
    
    .ptp-percentage {
        font-size: 9px;
    }
}