/**
 * Sistema de Pontuação - Estilos CSS
 */

/* Pontos do usuário no cabeçalho */
.cg-user-points {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    color: white;
    position: relative;
    overflow: hidden;
}

.cg-user-points::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.cg-user-points:hover::before {
    left: 100%;
}

.cg-user-name {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

.cg-user-name a {
    color: inherit !important;
    transition: opacity 0.3s ease;
}

.cg-user-name a:hover {
    opacity: 0.8;
}

.cg-points-separator {
    color: rgba(255, 255, 255, 0.7);
    font-weight: normal;
    font-size: 16px;
}

.cg-points-count {
    color: #B3F511;
    font-weight: 700;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Pontos do usuário no canto direito da página de perfil */
.cg-user-points-corner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    color: white;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    overflow: hidden;
    font-weight: 600;
}

.cg-user-points-corner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.cg-user-points-corner:hover::before {
    left: 100%;
}

.cg-user-points-corner .cg-user-name {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

.cg-user-points-corner .cg-points-separator {
    color: rgba(255, 255, 255, 0.7);
    font-weight: normal;
    font-size: 16px;
}

.cg-user-points-corner .cg-points-count {
    color: #B3F511;
    font-weight: 700;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Header precisa ser relativo para posicionamento absoluto funcionar */
.perfil-account-header {
    position: relative;
}

/* Responsivo para mobile */
@media (max-width: 768px) {
    .cg-user-points-corner {
        position: static;
        margin: 15px auto 0;
        font-size: 12px;
        padding: 8px 16px;
    }
    
    .cg-user-points-corner .cg-points-count {
        font-size: 12px;
    }
}

/* Botões de conversão de pontos */
#cg-convert-points,
#cg-redeem-coupon {
    color: white !important;
    text-align: center !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

#cg-convert-points:disabled {
    color: white !important;
    opacity: 0.4;
}

/* Container do botão enviar dúvida */
.cg-submit-button-container {
    margin: 20px 0;
    text-align: left;
}

/* Regra antiga removida - usando versão única abaixo */

.cg-vote-label {
    font-size: 10px;
    padding-top: 6px;
    padding-left: 12px;
    font-weight: 700;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 3px;
}

.cg-vote-label span {
    font-size: 11px;
    filter: grayscale(20%);
}

.cg-vote-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

.cg-vote-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid #dee2e6;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.cg-vote-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.cg-vote-btn.cg-vote-up:hover,
.cg-vote-btn.cg-vote-up.active {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #28a745;
    color: #28a745;
    transform: translateY(-1px) scale(1.05);
}

.cg-vote-btn.cg-vote-down:hover,
.cg-vote-btn.cg-vote-down.active {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-color: #dc3545;
    color: #dc3545;
    transform: translateY(-1px) scale(1.05);
}

.cg-vote-count {
    font-weight: 700;
    font-size: 12px;
    color: #2c3e50;
    min-width: 18px;
    text-align: center;
    background: #ffffff;
    padding: 1px 6px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    box-shadow: inset 0 1px 1px rgba(0,0,0,0.04);
}

/* Resposta mais votada */
.cg-most-voted-answer {
    position: relative;
    border: 2px solid #ffd700 !important;
    background: linear-gradient(135deg, #fffbf0 0%, #fff8e1 100%);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

.cg-most-voted-answer::before {
    content: "⭐ Resposta Mais Votada";
    position: absolute;
    top: -2px;
    left: -2px;
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    color: #333;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 4px 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

.cg-most-voted-answer .cg-answer-header {
    background: rgba(255, 215, 0, 0.1);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

/* Ranking de pontos */
.cg-points-ranking {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.cg-ranking-title {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
}

.cg-ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cg-ranking-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #dee2e6;
    transition: all 0.2s ease;
}

.cg-ranking-item:hover {
    background: #e9ecef;
    transform: translateX(4px);
}

.cg-ranking-item.cg-top-1 {
    border-left-color: #ffd700;
    background: linear-gradient(135deg, #fffbf0 0%, #fff8e1 100%);
}

.cg-ranking-item.cg-top-2 {
    border-left-color: #c0c0c0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.cg-ranking-item.cg-top-3 {
    border-left-color: #cd7f32;
    background: linear-gradient(135deg, #fdf2e9 0%, #faebd7 100%);
}

.cg-ranking-position {
    font-weight: 700;
    font-size: 16px;
    color: #495057;
    min-width: 32px;
}

.cg-ranking-name {
    flex: 1;
    margin-left: 12px;
    font-weight: 600;
    color: #2c3e50;
}

.cg-ranking-points {
    font-weight: 700;
    color: #27ae60;
    font-size: 14px;
}

.cg-no-ranking {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}

/* Responsivo */
@media (max-width: 768px) {
    .cg-user-points {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .cg-vote-area {
        padding: 8px 8px;
        gap: 4px;
        border-radius: 12px;
        font-size: 0.8rem;
    }
    
    .cg-vote-label {
        font-size: 9px;
    }
    
    .cg-vote-btn {
        font-size: 16px;
    }
    
    .cg-vote-count {
        font-size: 14px;
        min-width: 16px;
    }
    
    .cg-vote-buttons {
        gap: 4px;
    }
    
    .cg-most-voted-answer::before {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .cg-ranking-item {
        padding: 8px 12px;
    }
    
    .cg-ranking-position,
    .cg-ranking-name,
    .cg-ranking-points {
        font-size: 14px;
    }
}

/* Animações */
@keyframes pointsUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.cg-points-count.updating {
    animation: pointsUpdate 0.3s ease;
}

@keyframes voteSuccess {
    0% { transform: translateY(-1px) scale(1); }
    50% { transform: translateY(-2px) scale(1.15); }
    100% { transform: translateY(-1px) scale(1.05); }
}

.cg-vote-btn.vote-success {
    animation: voteSuccess 0.5s ease;
}

@keyframes pulseVote {
    0% { box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
    50% { box-shadow: 0 0 20px rgba(40, 167, 69, 0.3); }
    100% { box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
}

.cg-vote-area:hover {
    background: #f1f3f5;
    border-color: #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.cg-vote-btn.cg-vote-up.active {
    animation: pulseVote 2s infinite;
}

/* Loading states */
.cg-vote-area.loading .cg-vote-btn {
    opacity: 0.6;
    cursor: not-allowed;
}

.cg-user-points.loading {
    opacity: 0.7;
}

/* Área de comentários integrada */
.cg-answer-comments {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}

/* Mensagens de feedback */
.cg-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: #ffffff;
    font-weight: 600;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cg-message-success {
    background: #28a745;
}

.cg-message-error {
    background: #dc3545;
}

.cg-message-info {
    background: #17a2b8;
}

/* Responsivo adicional */
@media (max-width: 768px) {
    .cg-answer-comments {
        margin-top: 16px;
        padding-top: 12px;
    }
} 

/* Largura maior para popup de visualização de resposta */
#cg-view-answer-popup .cg-popup-content{
    width: 90%;
    max-width: 960px;
} 

/* Desativa ícone duplicado vindo do help.css */
.cg-vote-up::before,
.cg-vote-down::before {
    content: none !important;
} 

/* Regras limpas - removidas duplicatas */

/* Botões maiores e sem borda colorida default */
.cg-vote-btn{
    width:32px;
    height:32px;
    font-size:18px;
    border-radius:50%;
}

.cg-vote-count{
    font-size:18px;
    min-width:26px;
    padding:0 8px;
} 

/* Regra removida - conflitava com a principal */

/* === ÁREA DE VOTAÇÃO - CLEAN & COMPACT === */
.cg-vote-area {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 10px 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.cg-vote-label {
    font-size: 11px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Botões de votação compactos */
.cg-vote-buttons {
    display: flex;
    align-items: center;
    gap: 1px;
}

.cg-vote-btn {
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    width: auto;
    height: auto;
    color: #495057;
    box-shadow: none !important;
}

.cg-vote-btn:hover {
    background: none !important;
    transform: scale(1.2);
    box-shadow: none !important;
}

.cg-vote-count {
    font-size: 16px;
    font-weight: 700;
    color: #495057;
    min-width: 20px;
    text-align: center;
    margin: 0 6px;
    line-height: 1;
    box-shadow: none !important;
    border: none !important;
} 

/* Força limpeza de estilos conflitantes */
.cg-vote-buttons {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* Oculta pontos duplicados que eventualmente venham de outros shortcodes dentro do header da página de perfil */
.perfil-account-header .cg-user-points { display: none !important; }

/* Botão converter pontos sempre com texto branco */
#cg-convert-points:disabled { color: white !important; opacity: 0.5; } 