/*
 * ICBC Crash Data Visualization - Mobile Responsive Styles
 * Provides responsive styling for timeline slider component and date label across devices
 */

/* Ensure full-viewport sizing without scrollbars due to default margins */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Make root content fill available height */
#_dash-app-content, #react-entry-point, #root {
    height: 100%;
}

/* Date label base styles */
.date-label {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    text-align: center;
    user-select: none;
}

/* Slider mark text base styles: larger, centered under tick, readable */
.rc-slider-mark-text {
    /* keep horizontal but preserve rc-slider centering */
    transform: translateX(-50%) !important;
    font-size: 14px !important;
    line-height: 1.2;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #fff;
    margin-top: 8px;
    white-space: nowrap;
}

/* Prevent clipping and handle edge labels nicely */
.rc-slider-mark { overflow: visible; }
.rc-slider-mark-text:first-child { transform: translateX(0) !important; text-align: left; }
.rc-slider-mark-text:last-child { transform: translateX(-100%) !important; text-align: right; }

/* Tablet and smaller desktop screens (768px and below) */
@media (max-width: 768px) {
    .slider-container {
        left: 10px !important;
        right: 10px !important;
        padding: 8px !important;
    }

    .rc-slider-mark-text {
        transform: rotate(0deg) !important;
        font-size: 10px !important;
        margin-top: 2px !important;
    }

    .rc-slider-handle {
        width: 20px !important;
        height: 20px !important;
        margin-top: -9px !important;
    }

    .rc-slider-rail,
    .rc-slider-track {
        height: 6px !important;
    }

    .date-label {
        bottom: 15px !important;
        font-size: 14px !important;
        padding: 6px 12px !important;
    }
}

/* Mobile screens (480px and below) */
@media (max-width: 480px) {
    .slider-container {
        left: 5px !important;
        right: 5px !important;
        padding: 6px !important;
    }

    .rc-slider-mark-text {
        font-size: 8px !important;
    }

    .date-label {
        bottom: 10px !important;
        font-size: 12px !important;
        padding: 4px 8px !important;
    }
}
