/* 
 * CSS para o Widget de Streamers Parceiros - Versão Renovada
 * Estilos para exibição das lives ativas dos streamers com animações suaves
 */

/* Toolbar principal com animações melhoradas */
.twitch-toolbar {
    position: fixed;
    bottom: 20px;
    left: 0;
    margin: 0;
    color: #fef4e7;
    z-index: 9998;
    overflow: hidden;
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    pointer-events: auto;
    height: 85px;
    
    /* Animações suaves e modernas - mais lentas */
    transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: left center;
    
    /* Efeito visual sutil */
    backdrop-filter: blur(2px);
    border-radius: 0 8px 8px 0;
    
    /* Gradiente de fundo sutil para destacar */
    background: linear-gradient(90deg, 
        rgba(0, 0, 0, 0.7) 0%, 
        rgba(0, 0, 0, 0.5) 50%, 
        rgba(0, 0, 0, 0.2) 100%
    );
}

/* Estado preview - apenas painel esquerdo visível */
.twitch-toolbar.preview-mode {
    background: none; /* Remove gradiente de fundo */
    width: auto; /* Permite que se ajuste ao conteúdo */
}

/* Painel Esquerdo - Controles */
.twitch-toolbar .left-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Mais sutil */
    border-radius: 0;
    padding: 8px 12px;
    gap: 6px;
    border-right: 1px solid rgba(255, 255, 255, 0.1); /* Separador sutil */
}

/* Painel esquerdo quando está sozinho (preview-mode) */
.twitch-toolbar.preview-mode .left-panel {
    background: rgba(0, 0, 0, 0.8); /* Mais destacado quando sozinho */
    border-radius: 0 8px 8px 0; /* Bordas arredondadas à direita */
    border-right: none; /* Remove separador já que não há painel direito */
}

/* Painel Direito - Miniaturas */
.twitch-toolbar .right-panel {
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden; /* Overflow aqui no painel direito */
    height: 100%;
    
    /* Animações apenas no painel direito - mais lentas */
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.6s ease-out;
}

/* Estado oculto do painel direito */
.twitch-toolbar.preview-mode .right-panel {
    width: 0;
    min-width: 0; /* Importante para forçar width 0 */
    opacity: 0;
    overflow: hidden;
}

/* Botões de navegação */
.twitch-toolbar .nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #9146ff, #772ce8);
    color: white;
    font-size: 16px;
    font-weight: bold;
    z-index: 10002;
    
    /* Animações */
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 2px 8px rgba(145, 70, 255, 0.4);
}

.twitch-toolbar .nav-arrow:hover {
    background: linear-gradient(135deg, #a970ff, #8b5cf6);
    box-shadow: 0 4px 12px rgba(145, 70, 255, 0.6);
    transform: translateY(-50%) scale(1.1);
}

.twitch-toolbar .nav-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.twitch-toolbar .nav-left {
    left: 15px; /* Posicionado dentro do painel direito */
}

.twitch-toolbar .nav-right {
    right: 15px;
}

/* Contador de lives online - Agora dentro do painel esquerdo */
.twitch-toolbar .left-panel .twitch-live-counter {
    display: flex;
    align-items: center;
    gap: 6px;
    
    /* Animações do contador */
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center;
}

.twitch-toolbar .left-panel .twitch-live-counter #liveCounter {
    display: inline-block;
    min-width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    
    /* Design do contador */
    background: linear-gradient(135deg, #ff4444, #cc3333);
    color: white;
    font-weight: bold;
    font-size: 12px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4);
    
    /* Efeito de brilho */
    border: 2px solid rgba(255, 255, 255, 0.3);
    
    /* Animação suave */
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.twitch-toolbar .left-panel .twitch-live-counter .live-text {
    color: #fef4e7;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.twitch-toolbar .left-panel .twitch-live-counter:hover #liveCounter {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.6);
}

/* Botão renovado - Agora dentro do painel esquerdo */
.twitch-toolbar .left-panel .twitch-live-button {
    display: inline-block;
    
    /* Animações do botão */
    transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center;
}

.twitch-toolbar .left-panel .twitch-live-button:hover {
    transform: scale(1.05);
}

.twitch-toolbar .left-panel .twitch-live-button button {
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    
    /* Design moderno do botão */
    background: linear-gradient(135deg, #9146ff, #772ce8);
    color: white;
    box-shadow: 0 4px 15px rgba(145, 70, 255, 0.4);
    
    /* Animações suaves */
    transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.twitch-live-button button:hover {
    background: linear-gradient(135deg, #a970ff, #8b5cf6);
    box-shadow: 0 6px 20px rgba(145, 70, 255, 0.6);
    transform: translateY(-2px);
}

.twitch-live-button button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(145, 70, 255, 0.4);
}

/* Efeito ripple no botão */
.twitch-live-button button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: width 0.4s, height 0.4s, top 0.4s, left 0.4s;
}

.twitch-live-button button:active::before {
    width: 300px;
    height: 300px;
    top: -150px;
    left: -150px;
}

/* Wrapper dos items com animações horizontais suaves - Agora no painel direito */
.twitch-toolbar .right-panel .items-wrapper {
    display: flex;
    gap: 8px; /* Reduzido de 16px para 8px */
    align-items: center;
    padding: 10px 50px 10px 50px; /* Espaço igual dos dois lados para botões de navegação */
    
    /* Animações horizontais suaves */
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.4s ease-out,
                filter 0.3s ease-out;
    will-change: transform, opacity;
    
    /* Melhora visual */
    position: relative;
    flex: none; /* Não flex para permitir que se estenda além do container */
    white-space: nowrap; /* Impede quebra de linha */
    min-width: 100%; /* Garante que ocupe pelo menos toda a largura */
}

/* Items individuais - clicáveis */
.twitch-toolbar .item {
    display: flex;
    align-items: center;
    white-space: nowrap;
    position: relative;
    border-radius: 8px;
    padding: 4px;
}

.twitch-toolbar .item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.twitch-toolbar .item .video-box {
    width: 120px;
    height: 70px;
    background-color: #fff;
    border: 2px solid #9c7439;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.6);
    position: relative;
    overflow: hidden;
}

.twitch-toolbar .item .stream-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    
    /* Estilo do título */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.7), transparent);
    color: white;
    font-size: 9px;
    font-weight: 500;
    padding: 4px 6px 6px 6px;
    line-height: 1.2;
    
    /* Trunca texto muito longo */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    
    /* Bordas arredondadas apenas no bottom */
    border-radius: 0 0 4px 4px;
    
    /* Transição suave */
    transition: all 0.3s ease;
}

/* Efeito hover no título da stream */
.twitch-toolbar .item:hover .stream-title {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.8), transparent);
    font-size: 10px;
    padding: 6px 8px 8px 8px;
}

/* Nome do streamer no topo da miniatura */
.twitch-toolbar .item .streamer-name {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    
    /* Estilo do nome */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.7), transparent);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 6px 6px 4px 6px;
    line-height: 1.2;
    text-align: center;
    
    /* Trunca texto muito longo */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    
    /* Bordas arredondadas apenas no top */
    border-radius: 4px 4px 0 0;
    
    /* Transição suave */
    transition: all 0.3s ease;
    
    /* Texto em maiúscula */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Efeito hover no nome do streamer */
.twitch-toolbar .item:hover .streamer-name {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.8), transparent);
    font-size: 11px;
    padding: 8px 8px 6px 8px;
}

/* Estados especiais e responsividade */

/* Responsividade para telas menores */
@media (max-width: 768px) {
    .twitch-toolbar {
        height: 70px;
        bottom: 15px;
    }
    
    .twitch-toolbar .item .video-box {
        width: 96px;
        height: 56px;
    }
    
    .twitch-toolbar .item .stream-title {
        font-size: 8px;
        padding: 3px 4px 4px 4px;
    }
    
    .twitch-toolbar .item:hover .stream-title {
        font-size: 9px;
        padding: 4px 6px 6px 6px;
    }
    
    .twitch-toolbar .item .streamer-name {
        font-size: 8px;
        padding: 4px 4px 3px 4px;
    }
    
    .twitch-toolbar .item:hover .streamer-name {
        font-size: 9px;
        padding: 6px 6px 4px 6px;
    }
    
    .twitch-toolbar .nav-arrow {
        width: 25px;
        height: 25px;
        font-size: 14px;
    }
    
    .twitch-toolbar .nav-left {
        left: 70px; /* Ajusta para telas menores */
    }
    
    .twitch-live-counter {
        bottom: 60px; /* Ajusta para telas menores */
        left: 8px;
        gap: 4px;
    }
    
    .twitch-live-counter #liveCounter {
        min-width: 20px;
        height: 20px;
        line-height: 20px;
        font-size: 11px;
    }
    
    .twitch-live-counter .live-text {
        font-size: 10px;
    }
    
    .twitch-live-button {
        bottom: 22px;
        left: 8px;
    }
    
    .twitch-live-button button {
        padding: 6px 12px;
        font-size: 11px;
    }
}
