/* Custom Mobile Styles */

/* Footer Fix: Ensure it's not fixed */
.footer {
    position: relative !important;
    margin-top: 2rem;
    padding: 1rem 0;
    width: 100%;
}

/* 
   Plotly Graph Container Adjustment
   The default ratio=0.45 fits desktop well but is too short on phones.
*/
.django-plotly-dash {
    width: 100%;
}

/* 
   Global Compact Stats Card Styles
   Applies to universally to desktop and mobile to fit tight spaces
*/
.col-stats-row {
    margin-left: -2px;
    margin-right: -2px;
}

.col-stats {
    padding-left: 2px !important;
    padding-right: 2px !important;
}

.col-5ths {
    position: relative;
    width: 100%;
    flex: 0 0 20%;
    max-width: 20%;
}

.compact-card .card-body {
    padding: 0.35rem !important;
}

.compact-card .icon-size {
    font-size: 1rem !important;
}

.compact-card .val-text {
    font-size: 0.85rem !important;
    white-space: nowrap;
}

.compact-card .label-text {
    font-size: 9px !important;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {

    /* 
       FORCE Taller Graphs on Mobile 
       We must override the aspect ratio hack (padding-bottom) used by the plugin 
    */
    .django-plotly-dash {
        padding-bottom: 0 !important;
        /* Kill the aspect ratio padding */
        height: 500px !important;
        /* Force explicit height */
        min-height: 500px !important;
        position: relative !important;
    }

    .django-plotly-dash iframe {
        position: relative !important;
        /* Stop being absolute */
        height: 500px !important;
        min-height: 500px !important;
        top: auto !important;
        left: auto !important;
    }

    /* Logo adjustment */
    .logo-full {
        font-size: 16px !important;
    }

    /* Footer Fix - Force it to flow naturally */
    .footer,
    footer {
        position: relative !important;
        display: block !important;
        clear: both !important;
        width: 100% !important;
        margin-top: 50px !important;
        /* Extra space */
        padding-bottom: 20px !important;
        background: #fff;
        /* Ensure bg so text can be seen if overlap happens */
        z-index: 1000;
        bottom: auto !important;
        top: auto !important;
        left: 0 !important;
    }

    /* Ensure content container doesn't trap footer */
    .nxl-content,
    .main-content {
        height: auto !important;
        min-height: auto !important;
        overflow: visible !important;
        padding-bottom: 20px !important;
    }
}