﻿#chartdiv {
    width: 100%;
    height: 100vh;
    max-height: 600px;
    min-height: 300px;
    border: 2px solid #ffd800;
    border-radius: 8px;
    background: linear-gradient( 135deg, #0f2027 0%, /* Azul noche profunda */
    #203a43 50%, /* Azul medio */
    #2c5364 100% /* Azul claro nocturno */
    );
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white !important; /* Fuerza texto blanco */
    font-weight: bold !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(255, 255, 255, 0.2);
    overflow: hidden;
    position: relative;
}

/* Efecto 3D para el contenedor */
#chartdiv::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient( 135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.1) 100% );
    pointer-events: none;
    z-index: 1;
    border-radius: 6px;
}

/* Scrollbars personalizados */
#chartdiv ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#chartdiv ::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#chartdiv ::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#chartdiv ::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Media queries para dispositivos móviles */
@media (max-width: 768px) {
    #chartdiv {
        height: 70vh; /* Ajusta según necesidad */
        max-height: none; /* Permite que crezca según necesidad */
        min-height: 250px; /* Más bajo en móviles */
        border-radius: 0; /* Opcional: mejor visualización en pantalla completa */
        box-shadow: none; /* Opcional: mejor rendimiento en móviles */
    }

    /* Ajustes específicos para gráficos en móviles */
    .amcharts-Container,
    .amcharts-Chart {
        touch-action: pan-x pan-y; /* Mejor control táctil */
    }
}

/* Ajustes para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    #chartdiv {
        height: 80vh;
        min-height: 350px;
    }
}


@media (max-width: 480px) {
    #chartdiv {
        font-size: 14px; /* Texto más pequeño */
    }

    .amcharts-Axis-label {
        font-size: 10px !important;
    }
}


@media (max-width: 768px) and (orientation: landscape) {
    #chartdiv {
        height: 90vh;
        min-height: 200px;
    }
}

/* Media queries para dispositivos móviles */
@media (max-width: 768px) {
    #chartdiv {
        height: 70vh; /* Ajusta según necesidad */
        max-height: none; /* Permite que crezca según necesidad */
        min-height: 250px; /* Más bajo en móviles */
        border-radius: 0; /* Opcional: mejor visualización en pantalla completa */
        box-shadow: none; /* Opcional: mejor rendimiento en móviles */
    }

    /* Ajustes específicos para gráficos en móviles */
    .amcharts-Container,
    .amcharts-Chart {
        touch-action: pan-x pan-y; /* Mejor control táctil */
    }
}

/* Scrollbars personalizados - Versión móvil */
@media (pointer: coarse) {
    #chartdiv ::-webkit-scrollbar {
        width: 6px; /* Más fino en móviles */
        height: 6px;
    }

    #chartdiv ::-webkit-scrollbar-thumb {
        background: #aaa; /* Más visible en móviles */
    }
}

/* Ajustes para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    #chartdiv {
        height: 80vh;
        min-height: 350px;
    }
}
