/* Widget de Cotações - Estilo Unificado */
.cotacoes-widget-container {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Grid principal para moedas/criptos */
.cotacoes-grid {
    display: grid;
    gap: 5px;
}

/* Grid para CEPEA - usa as mesmas configurações do grid principal */
.cepea-cards-grid {
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(var(--cepea-columns, 2), 1fr);
}

/* UNIFICAÇÃO: Estilos base para ambos os tipos de card */
.cotacoes-item,
.cepea-card {
    background: #FFF;
    border-radius: 6px;
    padding: 7px 9px;
    font-size: 12px;
    line-height: 1.2;
    transition: all 0.2s ease;
    position: relative;
    border: 1px solid #e0e0e0;
    color: #333333;
}

.cotacoes-item:hover,
.cepea-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* UNIFICAÇÃO: Estilos de nome para ambos */
.cotacoes-name,
.cepea-card-name {
    font-weight: 600;
    color: #868f97;
    font-size: 10px;
    margin-bottom: 2px;
    text-transform: uppercase;
}

/* UNIFICAÇÃO: Estilos de valor para ambos */
.cotacoes-value,
.cepea-card-value {
    font-weight: 500;
    color: #212529;
    font-size: 12px;
    margin-bottom: 1px;
}

/* UNIFICAÇÃO: Estilos de variação para ambos */
.cotacoes-change,
.cepea-card-change {
    position: absolute;
    top: 7px;
    right: 7px;
    font-size: 10px;
    font-weight: 500;
    padding: 2px 4px;
    border-radius: 3px;
    background: rgba(255,255,255,0.8);
}

.cotacoes-change.positive,
.cepea-card-change.positive {
    color: #28a745;
}

.cotacoes-change.negative,
.cepea-card-change.negative {
    color: #dc3545;
}

/* Estilo específico para unidade do CEPEA */
.cepea-card-unit {
    font-size: 9px;
    color: #6c757d;
    margin-top: 1px;
}

/* Cores de borda por tipo */
.cotacoes-item.currency {
    border-left: 2px solid #007bff;
}

.cotacoes-item.crypto {
    border-left: 2px solid #f39c12;
}

.cepea-card {
    border-left: 2px solid #28a745;
}

/* Rodapé CEPEA */
.cepea-footer {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 9px;
    color: #6c757d;
    padding: 4px 0;
    border-top: 1px solid #e9ecef;
}

.cepea-footer img {
    max-height: 15px;
    width: auto;
}

/* Esconder tabela original CEPEA */
.cepea-widget-container .imagenet-widget-tabela {
    display: none;
}

/* Loading state */
.cotacoes-loading {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-size: 12px;
    position: relative;
}

.cotacoes-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cotacoes-item,
.cepea-card {
    animation: fadeIn 0.3s ease forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cotacoes-grid,
    .cepea-cards-grid {
        gap: 3px;
    }

    .cotacoes-item,
    .cepea-card {
        padding: 6px 8px;
        font-size: 11px;
    }

    .cotacoes-name,
    .cepea-card-name {
        font-size: 10px;
    }

    .cotacoes-value,
    .cepea-card-value {
        font-size: 12px;
    }

    .cotacoes-change,
    .cepea-card-change {
        font-size: 9px;
        top: 5px;
        right: 5px;
    }
}

@media (max-width: 480px) {
    .cotacoes-item,
    .cepea-card {
        padding: 5px 6px;
        font-size: 10px;
    }

    .cotacoes-name,
    .cepea-card-name {
        font-size: 9px;
    }

    .cotacoes-value,
    .cepea-card-value {
        font-size: 11px;
    }

    .cotacoes-change,
    .cepea-card-change {
        font-size: 8px;
        top: 4px;
        right: 4px;
    }
}
