/* Estilos modernos para os percentuais do card COBERTURA (+) */

.cobertura-percentuais {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.cobertura-percentuais::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6f42c1, #0d6efd, #198754, #dc3545);
    border-radius: 16px 16px 0 0;
}

.cobertura-percentuais .d-flex {
    gap: 8px;
}

.percentual-item {
    position: relative;
    transition: all 0.3s ease;
}

.percentual-item:hover {
    transform: translateY(-2px);
}

.percentual-label {
    font-size: 0.8rem !important;
    font-weight: 700;
    color: #495057;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-align: center;
}

.percentual-value {
    font-size: 1.3rem !important;
    font-weight: 800;
    margin: 0;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
    text-align: center;
    min-width: 60px;
    display: inline-block;
}

.percentual-value:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Cores específicas para cada percentual com sentimento */
.percentual-value.text-primary {
    color: #6f42c1 !important;
    background: linear-gradient(135deg, rgba(111, 66, 193, 0.15), rgba(111, 66, 193, 0.05));
    border: 1px solid rgba(111, 66, 193, 0.2);
}

.percentual-value.text-info {
    color: #0d6efd !important;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.15), rgba(13, 110, 253, 0.05));
    border: 1px solid rgba(13, 110, 253, 0.2);
}

.percentual-value.text-success {
    color: #198754 !important;
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.15), rgba(25, 135, 84, 0.05));
    border: 1px solid rgba(25, 135, 84, 0.2);
}

.percentual-value.text-danger {
    color: #dc3545 !important;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.15), rgba(220, 53, 69, 0.05));
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* Responsividade */
@media (max-width: 768px) {
    .cobertura-percentuais {
        padding: 8px 12px;
        margin-bottom: 12px;
    }
    
    .percentual-label {
        font-size: 0.7rem !important;
    }
    
    .percentual-value {
        font-size: 1rem !important;
        padding: 3px 6px;
    }
}

@media (max-width: 576px) {
    .cobertura-percentuais .d-flex {
        flex-direction: column;
        gap: 12px;
    }
    
    .percentual-item {
        width: 100% !important;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .percentual-label {
        margin-bottom: 0;
        text-align: left;
    }
    
    .percentual-value {
        text-align: right;
    }
}

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

.percentual-value.animate {
    animation: percentualPulse 0.6s ease-in-out;
}

/* Tooltip para percentuais */
.percentual-item {
    position: relative;
}

.percentual-item::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.percentual-item:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* Melhorias para acessibilidade */
.percentual-item:focus-within {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
    border-radius: 6px;
}

/* Estados de loading */
.cobertura-percentuais.loading .percentual-value {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Melhorias para o card de cobertura */
.card:has(#cobertura-chart) {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    overflow: hidden;
}

.card:has(#cobertura-chart) .card-header {
    background: linear-gradient(135deg, #6f42c1 0%, #5a32a3 100%);
    border-bottom: none;
    padding: 1.5rem 1.5rem 1rem;
}

.card:has(#cobertura-chart) .card-title {
    color: white;
}

.card:has(#cobertura-chart) .card-label {
    color: white !important;
    font-size: 1.275rem;
    font-weight: 700;
}

.card:has(#cobertura-chart) .text-gray-500 {
    color: rgba(255, 255, 255, 0.8) !important;
}

.card:has(#cobertura-chart) .card-body {
    padding: 1.5rem;
    background: white;
}

/* Botão de detalhes moderno */
.card:has(#cobertura-chart) .btn-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    border: none;
    border-radius: 25px;
    padding: 0.5rem 1.2rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
    transition: all 0.3s ease;
}

.card:has(#cobertura-chart) .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.4);
    background: linear-gradient(135deg, #0b5ed7 0%, #0a58ca 100%);
}

/* Melhorias no gráfico */
#cobertura-chart {
    background: transparent;
    border-radius: 12px;
    padding: 10px;
}

/* Estilos específicos para o gráfico de cobertura */
#cobertura-chart {
    height: 280px !important;
    min-height: 280px;
    width: 100%;
    position: relative;
}

/* Aumentar tamanho dos rótulos do gráfico de cobertura */
#cobertura-chart .apexcharts-xaxis-label {
    font-size: 16px !important;
    font-weight: 700 !important;
}

#cobertura-chart .apexcharts-datalabel {
    font-size: 14px !important;
    font-weight: 700 !important;
}

/* Ajuste do card body para o gráfico */
.card:has(#cobertura-chart) .card-body {
    padding: 0.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Estilos para percentuais do cabeçalho */
.cobertura-percentuais-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #e9ecef;
    margin: 0;
}

.percentual-label-header {
    font-size: 0.75rem !important;
    font-weight: 700;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.percentual-value-header {
    font-size: 1.25rem !important;
    font-weight: 800;
    margin: 0;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    min-width: 50px;
    display: inline-block;
}

/* Cores específicas para percentuais do cabeçalho */
.percentual-value-header.text-primary {
    color: #6f42c1 !important;
    background: linear-gradient(135deg, rgba(111, 66, 193, 0.1), rgba(111, 66, 193, 0.05));
    border: 1px solid rgba(111, 66, 193, 0.2);
}

.percentual-value-header.text-info {
    color: #0d6efd !important;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1), rgba(13, 110, 253, 0.05));
    border: 1px solid rgba(13, 110, 253, 0.2);
}

.percentual-value-header.text-success {
    color: #198754 !important;
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.1), rgba(25, 135, 84, 0.05));
    border: 1px solid rgba(25, 135, 84, 0.2);
}

.percentual-value-header.text-danger {
    color: #dc3545 !important;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(220, 53, 69, 0.05));
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* Responsividade melhorada */
@media (max-width: 768px) {
    .cobertura-percentuais {
        padding: 12px 16px;
        margin-bottom: 16px;
    }
    
    .percentual-label {
        font-size: 0.75rem !important;
        letter-spacing: 0.6px;
    }
    
    .percentual-value {
        font-size: 1.1rem !important;
        padding: 6px 10px;
        min-width: 50px;
    }
    
    .card:has(#cobertura-chart) .card-header {
        padding: 1.25rem 1.25rem 1rem;
    }
    
    .card:has(#cobertura-chart) .card-label {
        font-size: 1.275rem;
    }
    
    /* Ajustar rótulos em mobile mantendo proporção */
    #cobertura-chart .apexcharts-xaxis-label {
        font-size: 12px !important;
        font-weight: 700 !important;
    }
    
    #cobertura-chart .apexcharts-datalabel {
        font-size: 10px !important;
        font-weight: 700 !important;
    }
    
    /* Responsividade para percentuais do cabeçalho */
    .cobertura-percentuais-header {
        padding: 12px 16px !important;
    }
    
    .percentual-label-header {
        font-size: 0.7rem !important;
    }
    
    .percentual-value-header {
        font-size: 1.1rem !important;
        padding: 3px 6px;
        min-width: 40px;
    }
} 

/* Estilos para percentuais na parte inferior do card */
.cobertura-percentuais-footer {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-top: 1px solid #e9ecef;
    margin-top: 0;
    padding-top: 1.25rem;
}

.percentual-value-footer {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem 0.75rem;
    margin: 0 auto;
    max-width: 90px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.percentual-value-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.percentual-item:hover .percentual-value-footer::before {
    left: 100%;
}

.percentual-item:hover .percentual-value-footer {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-color: #0d6efd;
}

/* Cores específicas para cada percentual */
.percentual-value-footer.text-primary {
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
    border-color: #6f42c1;
    color: #6f42c1;
}

.percentual-value-footer.text-info {
    background: linear-gradient(135deg, #e1f5fe 0%, #ffffff 100%);
    border-color: #0d6efd;
    color: #0d6efd;
}

.percentual-value-footer.text-success {
    background: linear-gradient(135deg, #e8f5e8 0%, #ffffff 100%);
    border-color: #198754;
    color: #198754;
}

.percentual-value-footer.text-danger {
    background: linear-gradient(135deg, #ffeaea 0%, #ffffff 100%);
    border-color: #dc3545;
    color: #dc3545;
}

/* Hover effects específicos */
.percentual-item:hover .percentual-value-footer.text-primary {
    background: linear-gradient(135deg, #6f42c1 0%, #5a32a3 100%);
    color: white;
    border-color: #6f42c1;
}

.percentual-item:hover .percentual-value-footer.text-info {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    color: white;
    border-color: #0d6efd;
}

.percentual-item:hover .percentual-value-footer.text-success {
    background: linear-gradient(135deg, #198754 0%, #146c43 100%);
    color: white;
    border-color: #198754;
}

.percentual-item:hover .percentual-value-footer.text-danger {
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
    color: white;
    border-color: #dc3545;
}

/* Responsividade para mobile */
@media (max-width: 768px) {
    .cobertura-percentuais-footer {
        padding: 1rem 0.5rem;
    }
    
    .percentual-value-footer {
        max-width: 60px;
        padding: 0.5rem 0.25rem;
        font-size: 0.875rem !important;
    }
    
    .percentual-label-footer {
        font-size: 0.75rem !important;
        margin-bottom: 0.25rem;
    }
}

/* Animações de entrada */
.cobertura-percentuais-footer .percentual-item {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.cobertura-percentuais-footer .percentual-item:nth-child(1) { animation-delay: 0.1s; }
.cobertura-percentuais-footer .percentual-item:nth-child(2) { animation-delay: 0.2s; }
.cobertura-percentuais-footer .percentual-item:nth-child(3) { animation-delay: 0.3s; }
.cobertura-percentuais-footer .percentual-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tooltips para percentuais */
.percentual-item {
    position: relative;
}

.percentual-item::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

.percentual-item::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    border: 4px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

.percentual-item:hover::after,
.percentual-item:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-8px);
}

/* Melhorias para acessibilidade */
.percentual-item:focus-within {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
    border-radius: 6px;
}

/* Estados de loading */
.cobertura-percentuais-footer.loading .percentual-value-footer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
} 