/**
 * Estilos para Oráculo Crypto Charts
 */

/* Contenedor principal */
.crypto-chart-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background-color: var(--chart-bg, #ffffff);
    color: var(--chart-text, #333333);
    transition: all 0.3s ease;
}

/* Variables para tema claro */
.crypto-chart-light {
    --chart-bg: #ffffff;
    --chart-header-bg: #f8f9fa;
    --chart-text: #333333;
    --chart-text-secondary: #666666;
    --chart-border: #e0e0e0;
    --chart-btn-bg: #f0f0f0;
    --chart-btn-text: #333333;
    --chart-btn-active-bg: #4c6ef5;
    --chart-btn-active-text: #ffffff;
}

/* Variables para tema oscuro */
.crypto-chart-dark {
    --chart-bg: #1e1e1e;
    --chart-header-bg: #2a2a2a;
    --chart-text: #f5f5f5;
    --chart-text-secondary: #b0b0b0;
    --chart-border: #333333;
    --chart-btn-bg: #333333;
    --chart-btn-text: #f5f5f5;
    --chart-btn-active-bg: #4c6ef5;
    --chart-btn-active-text: #ffffff;
}

/* Cabecera del gráfico */
.crypto-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--chart-border);
    background-color: var(--chart-header-bg);
}

.crypto-chart-title {
    display: flex;
    align-items: center;
}

.crypto-chart-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Colores específicos para cada moneda */
.crypto-chart-container[data-coin="btcusdt"] .crypto-chart-icon {
    background-color: rgba(247, 147, 26, 0.1);
    color: #f7931a;
}

.crypto-chart-container[data-coin="ethusdt"] .crypto-chart-icon {
    background-color: rgba(98, 126, 234, 0.1);
    color: #627eea;
}

.crypto-chart-container[data-coin="bnbusdt"] .crypto-chart-icon {
    background-color: rgba(243, 186, 47, 0.1);
    color: #f3ba2f;
}

.crypto-chart-container[data-coin="xautusdt"] .crypto-chart-icon {
    background-color: rgba(212, 175, 55, 0.1);
    color: #d4af37;
}

.crypto-chart-container[data-coin="busdusdt"] .crypto-chart-icon {
    background-color: rgba(240, 185, 11, 0.1);
    color: #f0b90b;
}

.crypto-chart-name {
    display: flex;
    flex-direction: column;
}

.crypto-chart-fullname {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 2px;
}

.crypto-chart-symbol {
    font-size: 14px;
    color: var(--chart-text-secondary);
}

.crypto-chart-price-info {
    text-align: right;
}

.crypto-chart-current-price {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 2px;
}

.crypto-chart-change {
    font-size: 14px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.crypto-chart-change.positive {
    color: #16c784;
    background-color: rgba(22, 199, 132, 0.1);
}

.crypto-chart-change.negative {
    color: #ea3943;
    background-color: rgba(234, 57, 67, 0.1);
}

/* Controles del gráfico */
.crypto-chart-controls {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--chart-border);
}

.crypto-chart-timeframe {
    display: flex;
    gap: 8px;
}

.crypto-chart-btn {
    background-color: var(--chart-btn-bg);
    color: var(--chart-btn-text);
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.crypto-chart-btn:hover {
    background-color: rgba(76, 110, 245, 0.1);
}

.crypto-chart-btn.active {
    background-color: var(--chart-btn-active-bg);
    color: var(--chart-btn-active-text);
}

/* Área del gráfico */
.crypto-chart-wrapper {
    position: relative;
    width: 100%;
    padding: 16px;
}

.crypto-chart-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 5;
}

.crypto-chart-dark .crypto-chart-loading {
    background-color: rgba(30, 30, 30, 0.8);
}

.crypto-chart-error {
    text-align: center;
    padding: 30px;
    color: #ea3943;
    font-weight: 500;
}

/* Pie del gráfico */
.crypto-chart-footer {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid var(--chart-border);
    font-size: 12px;
    color: var(--chart-text-secondary);
}

/* Responsivo */
@media (max-width: 768px) {
    .crypto-chart-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .crypto-chart-price-info {
        text-align: left;
        margin-top: 12px;
    }
    
    .crypto-chart-controls {
        flex-direction: column;
        gap: 8px;
    }
    
    .crypto-chart-timeframe {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        width: 100%;
    }
    
    .crypto-chart-btn {
        text-align: center;
    }
    
    .crypto-chart-footer {
        flex-direction: column;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .crypto-chart-title {
        width: 100%;
    }
    
    .crypto-chart-current-price {
        font-size: 18px;
    }
}