
/* mapsforequity-2025.css */

@media (max-width:768px) {
    html{
        overflow:hidden;
        width:100%;
    }
	div#map-container{
		box-shadow:none;
		height:100vh;
		margin:0;
        overflow:hidden;
		position:relative;
	}
    div#map-container.loading::after{
        box-shadow:0 0 15px 5px #5555;
        top:15%;
    }
    body.loading-mobile div#map-container.loading::after{
        top:40%;
    }
    div#map-legend{
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    padding:0.5rem 1rem;
    right: 1rem;
    transition: transform 0.2s ease;
    top: 4rem;
    z-index: 10;
    }
    div#map-legend:active {
    transform: scale(0.95);
    }
    div#map-legend.has-trend-data > div#map-options,
    div#map-legend > div{
        display:none;
    }    
    div#map-legend > div.legend{
        display:block;
        padding:0;
    }    
    div#map-legend > div.legend h1{
        color:#000;
        font-size:0.8rem;
        font-weight:normal;
        margin:0;
    }    
    div#map-legend > div.legend h1 span.county-percentile-title,
    div#map-legend > div.legend h1 span.subtitle{
        display:none;
    }
    div#map-legend div.legend div.levels{
        margin:0;
        padding:0;
    }
    div#map-legend div.legend div.levels > div {
        height:0.5rem;
        width:2rem;
    }    
    div#map-legend.showing-trends div.legend div.levels > div {
        width:1rem;
    }    
    div#map-legend div.legend div.labels {
        width:10rem;
    }
    div#map-legend div.legend div.labels > div{
        color:#555;
        font-size:0.8rem;
        font-weight:normal;
    }
    div#map-legend div.legend div.labels > div.label-2{
        border:none;
    }

    div#bottomSheet div.map-legend h1{
        font-size:0.8rem;
        text-align:center;
    }
    div#bottomSheet div.map-legend h1 span.title{
        display:block;
        font-size:1rem;
        font-weight:bold;
        margin:0.5rem 0 0.5rem 0;
    }
    div#bottomSheet div.map-legend h1 span.county-percentile-title{
        display:none;        
    }
    div#bottomSheet.is-county-percentile-1 div.map-legend h1 span.county-percentile-title{
        display:block;        
    }
    div#bottomSheet div.map-legend div.legend div.levels{
        margin:0;
        padding:0;
        text-align:center;
        width:100%;
    }
    div#bottomSheet div.map-legend div.legend div.levels > div{
        height:1rem;
        width:18%;
    }    
    div#bottomSheet div.map-legend div.legend div.labels{
        width:90%;
    }
    div#bottomSheet div.map-legend div.legend div.labels > div{
        font-weight:normal;
    }
    div#bottomSheet div.map-legend div.legend div.labels > div.label-2{
        border:none;
    }

}

body.is-b div#introduction p::after{
    content:'\e0b7';
    display:inline-block;
    font-family:'Font Awesome 6 Pro';
    font-weight:700;
    margin-left:0.5rem;
    color:#fff5;
}

body.loading-mobile div#bottomSheet{
        transform: translateY(100%);
}

div#mobile-ui.wait-data,
div#mobile-ui.wait-data.loading-data{
    opacity:0;
}
div#mobile-ui.loading-data{
    opacity:1;
}
div#mobile-ui.loading-data div#bottomSheet > div{
    opacity:0.5;
}


        /* Fixed Header */
        .app-header {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 56px;
            height:3rem;
            background: white;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            z-index: 10;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 16px;
        }
        
        .logo-section {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .logo {
            width: 32px;
            height: 32px;
            background: #2c7fb8;
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
        }
        
        .app-header .app-title {
            background:transparent url("/images/maps-for-equity-logo.svg?v=2") center center no-repeat;
            background-size:contain;
            color: #333;
            display:block;
            font-size: 18px;
            font-weight: 600;
            height:3rem !important;
            overflow:hidden;
            text-indent:-200px;
            width:160px;
        }
        
        .location-selector {
            display: flex;
            display:none;
            align-items: center;
            gap: 4px;
            padding: 6px 12px;
            background: #f0f0f0;
            border-radius: 20px;
            border: none;
            font-size: 14px;
            cursor: pointer;
            transition: background 0.2s ease;
        }
        
        .location-selector:hover {
            background: #e0e0e0;
        }


/* Mini Legend (Top Right) */
.mini-legend {
    position: fixed;
    top: 16px;
    right: 16px;
    background: white;
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 9;
    cursor: pointer;
    transition: transform 0.2s ease;
    display:none !important;
}

.mini-legend:active {
    transform: scale(0.95);
}

.mini-legend-gradient {
    width: 120px;
    height: 8px;
    background: linear-gradient(to right, #e8f4f8, #1e5a7d);
    border-radius: 4px;
    margin: 4px 0;
}

.mini-legend-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #666;
}

/* FAB Menu */
.fab-container {
    display:none;
    position: fixed;
    bottom: 100px;
    left: 16px;
    z-index: 20;
    transition: bottom 0.3s ease;
}

.fab-main {
    width: 56px;
    height: 56px;
    border-radius: 28px;
    background: #2c7fb8;
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.fab-main .icon-menu,
.fab-main .icon-close {
    position: absolute;
    transition: all 0.3s ease;
}

.fab-main .icon-close {
    transform: rotate(-45deg);
    opacity: 0;
}

.fab-main.active .icon-menu {
    transform: rotate(45deg);
    opacity: 0;
}

.fab-main.active .icon-close {
    transform: rotate(0);
    opacity: 1;
}

.fab-menu {
    position: absolute;
    bottom: 70px;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.fab-menu.active {
    opacity: 1;
    visibility: visible;
}

.fab-item {
    width: 48px;
    height: 48px;
    border-radius: 24px;
    background: white;
    color: #2c7fb8;
    border: 2px solid #2c7fb8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    position: relative;
}

.fab-item:active {
    transform: scale(0.9);
}
.fab-item i{
    position:relative;
    z-index:5;
}
.fab-label {
    background:#2c7fb8;
    color: white;
    border-radius:0.25rem;
    font-size:0.8rem;
    font-weight:bold;
    left:2.3rem;
    opacity: 0;
    padding:0.5rem 1rem 0.5rem 1.5rem;
    position: absolute;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    z-index:-5;
}

.fab-menu.active .fab-label {
    opacity: 1;
}

/* Bottom Sheet */
.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.1);
    z-index: 15;
    transition: transform 0.3s ease;
    max-height: 90vh;
    transform: translateY(calc(100% - 80px));
    padding:0 1.5rem;
    padding:0;
}
#bottomSheet .description,
.sheet-header{
    margin:0 1.5rem;
}
.bottom-sheet.half {
    transform: translateY(40%);
}

.bottom-sheet.full {
    transform: translateY(0);
}

.sheet-handle {
    cursor:pointer;
    height:70px;
    margin:0px auto;
    position:absolute;
    right:0;
    text-align:center;
    top:0;
    width: 100%;
    z-index:10;
}
.sheet-handle::before {
    content:'\f077';
    display:inline-block;
    font-family:'Font Awesome 6 Pro';
    font-size:1.2rem;
    line-height:40px;
    position:absolute;
    margin:0 auto;
    top:1rem;
    transition: transform 0.5s ease;
    right:1.5rem;
} 
#bottomSheet.full .sheet-handle::before {
    transform: rotate(-180deg);
}

.sheet-header {
    padding:1rem 1rem 0em 0rem;
    position:relative;
}
.sheet-header::before {
    border-radius:50%;
    color:#2c7fb8;
    color:#333;
    content:'\f21e';
	display:inline-block;
    display:none;
    font-family:'Font Awesome 6 Pro';
    font-size:1.5rem;
    font-weight:800;
    height:2.5rem;
    left:-0.5rem;
    line-height:2.4rem;
    position:absolute;
    text-align:center;
    top:0.75rem;
    width:1.8rem;
}
.sheet-header.metric-category-24::before {
   content:'\f256';
}
.sheet-header.metric-category-25::before {
   content:'\f57d';
}
.sheet-title {
    font-size: 18px;
    font-weight: 600;
    margin:0.5rem 0 0.25rem 0;
}
.sheet-title::after{
    content:'Tap for more details';
    display:block;
    font-size:0.8rem;
    font-weight:normal;
    margin:0.25rem 0 0 0;
}
#bottomSheet.full .sheet-title::after{
visibility:hidden;
}
/* Category Tabs */
        .category-tabs {
            display: flex;
            border-bottom: 1px solid #ddd;
            padding: 0 16px;
            gap: 24px;
        }
        
        .category-tab {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 12px 4px;
            border: none;
            background: none;
            color: #666;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            position: relative;
            transition: all 0.2s ease;
        }
        
        .category-tab i {
            font-size: 18px;
        }
        
        .category-tab.active {
            color: #2c7fb8;
        }
        
        .category-tab::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: #2c7fb8;
            transform: scaleX(0);
            transition: transform 0.2s ease;
        }
        
        .category-tab.active::after {
            transform: scaleX(1);
        }
#bottomSheet .sheet-header p.metric-category-name{
    display:none;
    font-size:0.7rem;
    margin:0rem 0 0rem 0;
}
#bottomSheet .sheet-header p.metric-category-name span.metric-name::before{
    font-family:'Font Awesome 6 Pro';
    content:'\f061';
    color:#aaa;
    display:inline-block;
    font-weight:600;
    margin:0 0.5rem;    
}

#bottomSheet .sheet-header p.county-percentile-title{
    display:none;
}
#bottomSheet.is-county-percentile-1 .sheet-header p.county-percentile-title{
    display:block;
}
.sheet-subtitle {
    font-size: 14px;
    color: #666;
    margin: 4px 0 0;
}

.sheet-content {
    overflow-y: auto;
    max-height: calc(90vh - 120px);
}
.metric-container {
    position: relative;
            border-bottom: 1px solid #ddd;
}

.metric-titles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2rem;
    z-index: 2;
    overflow: hidden;
}
.metric-title{
    position: absolute;
    top: 0;
    left: 0;
    color: #333;
    font-size:0.8rem;
    white-space: nowrap;
    padding: 4px 16px;
    transition: transform 0.2s ease;

}

.metric-selector {
    background:#fff;
    background: #f0f0f0;
    display: flex;
    gap: 8px;
    margin:0;
    overflow-x: auto;
    overflow-y:hidden;
    padding:2rem 1rem 1rem 1rem;
    scroll-behavior: smooth;
}

.metric-chip {
    padding: 8px 16px;
    border-radius: 20px;
    background: #f0f0f0;
    background:#fff;
    border: none;
    color:#000;
    font-size:0.9rem;
    white-space: nowrap;
    transition: all 0.2s ease;
    position:relative;

}
.metric-chip.active {
    background: #2c7fb8;
    color: white;
}
.metric-chip.is-last-in-group-1{
margin-right:4rem;
}
.metric-chip.is-last-in-group-1::after{
    background:#aaa;
    content:'';
    display:block;
    position:absolute;
    right:-2.4rem;
    height:2.2rem; 
    top:0;
    
    background: linear-gradient(to right, #f0f0f0, #e5e5e5);
    right:-3rem;
    top:-2rem;
    height:6rem;
    width:3rem;
    z-index:0;
}
#bottomSheet .legend-full {
    background:#f3f2f2;
    background:#fff;
    border-radius: 8px;
    display:none;
    padding:1rem 0;
}

.legend-gradient-full {
    height: 24px;
    background: linear-gradient(to right, #e8f4f8, #1e5a7d);
    border-radius: 4px;
    margin: 12px 0;
}

.legend-scale {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    margin-top: 8px;
}

#bottomSheet .description {
    color:#000;
    font-size: 14px;
    line-height: 1.6;
    margin:2rem 1.5rem;
}
#bottomSheet.is-county-percentile-1 .description::before {
    content:'County Percentile Ranking';
    display:block;
    font-weight:bold;
    margin:0 0 0.5rem 0;
    text-align:center;
}

.toggle-trends {
    align-items: center;
    background:#333;
    color:#fff;
    display: flex;
    justify-content: space-between;
    padding:1rem 1.5rem;
    margin-top:1rem;
}
div#bottomSheet.has-trend-data- .toggle-trends {
display:none;
}
.toggle-trends label {
    font-size: 14px;
    margin: 0;
}

/* Responsive Adjustments */
@media (max-height: 600px) {
    .bottom-sheet {
        max-height: 80vh;
    }
}

/* Scrim Overlay */
.scrim {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 18;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.scrim.active {
    opacity: 1;
    visibility: visible;
}

/* Touch feedback */
button, .mini-legend {
    -webkit-tap-highlight-color: transparent;
}



/* mapsforequity-2025.css */