/* Radar de Mercado Specific Styles */

/* Market Cards Styling */
.market-card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-radius: 12px;
}

.market-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.market-card .card-body {
    padding: 1.75rem;
}

.market-card h3 {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.market-card .text-muted {
    font-size: 0.8rem;
    color: #6c757d !important;
}

/* Specific Icon Styles for Market Metrics */
.selic-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background-color: rgba(52, 144, 220, 0.1);
    color: #3490dc;
}

.ipca-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.financing-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background-color: rgba(138, 43, 226, 0.1);
    color: #8a2be2;
}

.incc-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

/* Chart Container Styling */
.charts-section .card {
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-radius: 12px;
}

.charts-section .card-header {
    border-bottom: 1px solid #f1f3f4;
    padding: 1.5rem 2rem;
    background-color: #ffffff;
    border-radius: 12px 12px 0 0;
}

.charts-section .card-body {
    padding: 2rem;
}

.charts-section .card-header h6 {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1rem;
}

/* Evolution Chart Specific Styling */
#evolutionChart {
    max-height: 400px;
}

/* Market Data Animation */
@keyframes marketPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

.market-card:hover .metric-icon {
    animation: marketPulse 0.6s ease-in-out;
}

/* Responsive adjustments for market cards */
@media (max-width: 768px) {
    .market-card .card-body {
        padding: 1.25rem;
    }
    
    .market-card h3 {
        font-size: 1.5rem;
    }
    
    .market-card .metric-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .charts-section .card-body {
        padding: 1rem;
    }
    
    .charts-section .card-header {
        padding: 1rem 1.5rem;
    }
}

/* Enhanced card borders with subtle gradients */
.market-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(90deg, #28a745, #20c997);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.market-card:hover::before {
    opacity: 1;
}

/* Market trend indicators */
.trend-up {
    color: #28a745 !important;
}

.trend-down {
    color: #dc3545 !important;
}

.trend-neutral {
    color: #6c757d !important;
}

/* Loading animation for charts */
.chart-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    color: #6c757d;
}

.chart-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #28a745;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom tooltip styling for market data */
.market-tooltip {
    background-color: rgba(44, 62, 80, 0.95) !important;
    border: none !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

.market-tooltip .tooltip-inner {
    padding: 8px 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Market indicators legend */
.market-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-selic {
    background-color: #28a745;
}

.legend-ipca {
    background-color: #3490dc;
}

/* Enhanced focus states for accessibility */
.market-card:focus-within {
    outline: 2px solid #28a745;
    outline-offset: 2px;
}

/* Print styles for market reports */
@media print {
    .market-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
    
    .charts-section {
        page-break-inside: avoid;
    }
}
