/* 
 * SOS Questions - Badges CSS
 * Estilos para badges de tags e dificuldade
 */

/* Fix para menu lateral - apenas um item ativo por vez */
.sidebar-nav .nav-item.active:not(.current-page) {
    background-color: transparent !important;
    color: inherit !important;
}

.sidebar-nav .nav-item.current-page {
    background-color: var(--primary-color, #007bff) !important;
    color: white !important;
    border-radius: 6px;
}

.sidebar-nav .nav-item.current-page .nav-link {
    color: white !important;
}

/* Garantir que apenas a página atual fique destacada */
[data-sidebar-item].active:not([data-current="true"]) {
    background: transparent !important;
    color: inherit !important;
}

[data-sidebar-item][data-current="true"] {
    background: var(--primary-color, #007bff) !important;
    color: white !important;
    border-radius: 6px;
}

/* Badges base */
.sos-badge {
    display: inline-block;
    padding: 4px 8px;
    margin: 2px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    vertical-align: middle;
}

.sos-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

/* Badges de Tags */
.sos-tag-badge {
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--tag-color, #6c757d), var(--tag-color-dark, #495057));
}

.sos-tag-badge:hover {
    color: white;
    opacity: 0.9;
}

.sos-tag-badge.compact {
    font-size: 10px;
    padding: 2px 6px;
    margin: 1px;
}

/* Badges de Dificuldade */
.sos-difficulty-badge {
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 10px;
    border-radius: 16px;
    font-size: 11px;
}

.sos-difficulty-facil {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: 1px solid #1e7e34;
}

.sos-difficulty-medio {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: #212529;
    border: 1px solid #d39e00;
}

.sos-difficulty-dificil {
    background: linear-gradient(135deg, #d4485d, #c23856);
    color: white;
    border: 1px solid #a82e47;
}

/* Estados especiais */
.sos-no-tags {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px dashed #dee2e6;
    font-style: italic;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 11px;
}

/* Badges com contador */
.sos-badge-counter {
    background-color: #6c757d;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 4px;
}

/* Container para badges */
.sos-badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.sos-badges-container.vertical {
    flex-direction: column;
    align-items: flex-start;
}

.sos-badges-container.compact {
    gap: 2px;
}

/* Responsividade */
@media (max-width: 576px) {
    .sos-badge {
        font-size: 10px;
        padding: 2px 6px;
        margin: 1px;
    }
    
    .sos-difficulty-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .sos-tag-badge {
        font-size: 9px;
        padding: 2px 5px;
    }
}

/* Animações */
@keyframes badge-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.sos-badge.pulse {
    animation: badge-pulse 0.6s ease-in-out;
}

/* Tema escuro */
@media (prefers-color-scheme: dark) {
    .sos-no-tags {
        background-color: #343a40;
        color: #adb5bd;
        border-color: #495057;
    }
    
    .sos-badge {
        box-shadow: 0 1px 3px rgba(255, 255, 255, 0.1);
    }
}

/* Utilitários */
.sos-badges-inline {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 3px;
    align-items: center;
}

.sos-badges-stacked {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.sos-badge-large {
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 18px;
}

.sos-badge-small {
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 8px;
}

/* Cores predefinidas para tags comuns */
.sos-tag-matematica { background: linear-gradient(135deg, #007bff, #0056b3); }
.sos-tag-fisica { background: linear-gradient(135deg, #dc3545, #c82333); }
.sos-tag-quimica { background: linear-gradient(135deg, #ffc107, #d39e00); }
.sos-tag-biologia { background: linear-gradient(135deg, #28a745, #1e7e34); }
.sos-tag-historia { background: linear-gradient(135deg, #6f42c1, #59359a); }
.sos-tag-geografia { background: linear-gradient(135deg, #fd7e14, #e55a00); }
.sos-tag-portugues { background: linear-gradient(135deg, #6c757d, #495057); }
.sos-tag-programacao { background: linear-gradient(135deg, #343a40, #23272b); }

/* Estilos adicionais com cor principal #d4485d */

/* Badge especial para itens importantes */
.sos-badge-primary {
    background: linear-gradient(135deg, #d4485d, #c23856);
    color: white;
    border: 1px solid #a82e47;
}

.sos-badge-primary:hover {
    background: linear-gradient(135deg, #c23856, #a82e47);
    color: white;
}

/* Badge de destaque */
.sos-badge-highlight {
    background: rgba(212, 72, 93, 0.1);
    color: #d4485d;
    border: 1px solid #d4485d;
    font-weight: bold;
}

.sos-badge-highlight:hover {
    background: rgba(212, 72, 93, 0.2);
    color: #c23856;
}

/* Cores adicionais para tags especiais */
.sos-tag-neurologia { background: linear-gradient(135deg, #d4485d, #c23856); }
.sos-tag-medicina { background: linear-gradient(135deg, #d4485d, #a82e47); }
.sos-tag-urgencia { background: linear-gradient(135deg, #d4485d, #8b1538); }

/* Badge com indicador de novo/atualizado */
.sos-badge-new::after {
    content: '●';
    color: #d4485d;
    font-size: 8px;
    margin-left: 4px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}
