/* ============================================
   SINTE Ticker Universal - v1.0
   Classes exclusivas (prefixo stv-)
   ============================================ */

/* --- Wrapper com especificidade alta e fallback --- */
html body .stv-ticker-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    /* a cor inline já é aplicada, mas mantemos como fallback */
    background: linear-gradient(135deg, #2e137c 0%, #3815a0 100%) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 9999999;
    display: flex;
    align-items: center;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    min-height: 70px;
    height: 70px;
}

/* --- Label --- */
.stv-ticker-label {
    background: rgba(255,255,255,0.15);
    border-radius: 30px;
    padding: 6px 16px;
    margin-right: 20px;
    border: 1px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
}
.stv-ticker-label span {
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.stv-mobile-label {
    display: none;
    position: relative;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
}

/* --- Pulsar com logo --- */
.stv-pulse-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.stv-pulse-wave {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    animation: stv-wave 2s infinite;
    pointer-events: none;
}
.stv-pulse-wave:nth-child(1) {
    width: 100%;
    height: 100%;
    animation-delay: 0s;
}
.stv-pulse-wave:nth-child(2) {
    width: 120%;
    height: 120%;
    animation-delay: 0.5s;
    opacity: 0.4;
}
.stv-pulse-wave:nth-child(3) {
    width: 140%;
    height: 140%;
    animation-delay: 1s;
    opacity: 0.3;
}
.stv-pulse-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    position: relative;
    z-index: 2;
    border-radius: 50%;
    animation: stv-pulse-logo 2s infinite;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.6));
}
@keyframes stv-pulse-logo {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes stv-wave {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.5); opacity: 0.2; }
    100% { transform: scale(2); opacity: 0; }
}

/* --- Container e track --- */
.stv-ticker-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 70px;
}
.stv-ticker-track {
    display: flex;
    position: absolute;
    left: 0;
    transition: transform 0.5s ease;
    gap: 15px;
    padding: 0 10px;
    height: 100%;
    align-items: center;
}

/* --- Itens --- */
.stv-ticker-item {
    flex: 0 0 auto;
    width: 300px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    height: 60px;
    transition: all 0.3s ease;
    overflow: hidden;
}
.stv-ticker-item:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.3);
}
.stv-ticker-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    height: 100%;
    padding: 0;
}
.stv-ticker-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px 0 0 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}
.stv-ticker-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.stv-ticker-fallback-icon {
    font-size: 24px;
    color: white;
}
.stv-ticker-title {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    padding: 0 12px;
    margin: 0;
}

/* --- Controles desktop --- */
.stv-ticker-controls {
    display: flex;
    gap: 8px;
    margin-left: 20px;
    padding: 5px;
    background: rgba(0,0,0,0.15);
    border-radius: 30px;
    height: 50px;
    align-items: center;
}
.stv-ticker-controls button {
    background: transparent;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: white;
    font-size: 18px;
}
.stv-ticker-controls button:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

/* --- Instagram mobile --- */
.stv-mobile-instagram {
    display: none;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    height: 70px;
    width: 70px;
    margin-left: 10px;
    font-size: 42px;
    transition: transform 0.3s ease;
}
.stv-mobile-instagram:hover {
    transform: scale(1.1);
    color: #ffffff;
}
.stv-mobile-instagram i {
    font-size: 42px;
    line-height: 1;
}

/* --- Mensagem de vazio --- */
.stv-ticker-empty {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #3815a0;
    color: white;
    padding: 15px;
    text-align: center;
    z-index: 9999999;
}

/* ============================================
   MOBILE (até 768px) – classes renomeadas
   ============================================ */
@media (max-width: 768px) {
    html body .stv-ticker-wrapper {
        padding: 0 10px;
        min-height: 60px;
        height: 60px;
        background: linear-gradient(135deg, #2e137c 0%, #3815a0 100%) !important;
    }
    .stv-desktop-label { display: none; }
    .stv-mobile-label {
        display: flex;
        width: 50px;
        height: 50px;
    }
    .stv-ticker-label {
        width: 50px;
        height: 50px;
        padding: 0;
        margin-right: 10px;
        background: transparent;
        border: none;
    }
    .stv-desktop-controls { display: none; }
    .stv-mobile-instagram {
        display: flex;
        height: 60px;
        width: 60px;
        font-size: 36px;
    }
    .stv-mobile-instagram i { font-size: 36px; }
    .stv-ticker-container { height: 60px; }
    .stv-ticker-item {
        width: 240px;
        height: 50px;
    }
    .stv-ticker-thumb {
        width: 50px;
        height: 50px;
    }
    .stv-ticker-title {
        font-size: 0.8rem;
        padding: 0 8px;
    }
    .stv-pulse-logo {
        width: 38px;
        height: 38px;
    }
    .stv-pulse-wave:nth-child(1) { width: 100%; height: 100%; }
    .stv-pulse-wave:nth-child(2) { width: 120%; height: 120%; }
    .stv-pulse-wave:nth-child(3) { width: 140%; height: 140%; }
}

@media (max-width: 480px) {
    html body .stv-ticker-wrapper {
        background: linear-gradient(135deg, #2e137c 0%, #3815a0 100%) !important;
    }
    .stv-ticker-item { width: 220px; }
    .stv-ticker-thumb { width: 50px; height: 50px; }
    .stv-ticker-title { font-size: 0.75rem; }
    .stv-mobile-instagram { font-size: 32px; width: 50px; }
    .stv-mobile-instagram i { font-size: 32px; }
    .stv-mobile-label { width: 45px; height: 45px; }
    .stv-pulse-logo { width: 35px; height: 35px; }
}

@media (max-width: 360px) {
    html body .stv-ticker-wrapper {
        background: linear-gradient(135deg, #2e137c 0%, #3815a0 100%) !important;
    }
    .stv-ticker-item { width: 200px; }
    .stv-ticker-thumb { width: 45px; height: 45px; }
    .stv-ticker-title { font-size: 0.7rem; }
    .stv-pulse-logo { width: 32px; height: 32px; }
}