@import url("https://fonts.googleapis.com/css2?family=Sen:wght@400..800&display=swap");

:root {
	--radius: 0.75rem;
	--shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
	--bg-body: white;

	--bs-font-sans-serif: "Sen", sans-serif;
	--bs-body-font-family: var(--bs-font-sans-serif);
	--bs-heading-font-family: var(--bs-font-sans-serif);
}

* {
	font-family: "Sen", "Inter", sans-serif !important;
}

.fa, .fas, .far, .fab {
    font-family: "Font Awesome 6 Free" !important;
}

/* OVERRIDE DEFAULT BOOTSTRAP STYLES */
body {
    overflow: hidden;
}

.card {
	border: none;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.card-header {
	font-weight: 600;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.vr {
	align-self: unset !important;
	margin-left: 0.5rem !important;
}

.form-check {
	padding-left: 0 !important;
	margin-bottom: 0 !important;
}

.form-check-inline {
	margin-right: 0 !important;
}

.btn-check:disabled + .btn,
.btn-check[disabled] + .btn {
	opacity: 0.33 !important;
}

/* COLUMN ORGANISATION */
#walk-right-col,
#health-right-col {
	display: flex;
	flex-direction: column;
	gap: 2rem;
	min-height: 0;
}

#walk-right-col {
	height: calc(100vh - 4rem);
	padding: 0.5rem;
	padding-top: 2rem;
}

#health-right-col {
	padding: 2rem;
	height: calc(100vh - 4rem);
}

#walk-map-container,
#health-map-container {
	position: relative;
	height: calc(100% - 0.5rem);
}

/* CONTROL BUTTONS */
.walk-toggle > :nth-child(1) {
	margin-right: 0 !important;
}

.walk-toggle > :nth-child(1) > label {
	border-radius: var(--bs-border-radius) 0 0 var(--bs-border-radius) !important;
}

.walk-toggle > :nth-child(2) {
	padding-left: 0 !important;
}

.walk-toggle > :nth-child(2) > label {
	border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0 !important;
}

/* NAVBAR */
#main-tabs {
    position: relative;
    padding-right: 3.75rem;
}

#main-tabs::before {
    content: 'Stepwise';
    position: absolute;
    top: 50%;
    left: 1rem;
    font-size: 18px;
    font-weight: 700;
    color: #1f2c56;
    transform: translateY(-50%);
}

#main-tabs::after {
    content: ': A Walkability and Health Dashboard';
    position: absolute;
    top: 50%;
    left: 5.825rem;
    font-size: 16px;
    font-weight: 400;
    color: #1f2c56;
    opacity: 0.8;
    transform: translateY(-50%);
}

.btn-check:disabled + .btn, .btn-check[disabled] + .btn {
    opacity: 0.33 !important;
}

.nav-link {
    color: #1f2c56 !important;
}

#open-help-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: none !important;
    outline: none !important;
    background: transparent !important;
}

#open-help-modal .fa {
    font-size: 1.5rem;
    color: #1f2c56;

    transition: color 200ms ease;
}

#open-help-modal:hover .fa {
    color: #3a5f8c;
}

/* HELP MODAL */
.modal-content {
    padding: 1rem;
}

#help-modal-faq-content {
    margin-top: 1rem;
}

#help-modal-faq-content .accordion-header button {
    background-color: white !important;
}

#help-modal-faq-content .accordion-header button {
    box-shadow: 0 0 0 0 #d9d9d9 inset !important;

    transition: box-shadow 200ms ease;
}

#help-modal-faq-content .accordion-header button:not(.collapsed) {
    box-shadow: 0 -1px 0 0 #d9d9d9 inset !important;
}

#help-modal-faq-content p {
    margin: 0.5rem 0;
}

#help-modal-faq-content .linebreak {
    display: block;
    height: 0.33rem;
}

#help-modal-faq-content br::after {
    content: '';
    display: block;
    margin: 0.5rem;
}

#help-modal-footer-text {
    font-size: 0.875rem;
    color: #6c757d;
}

/* ------------------ */
/* WALKABILITY LAYOUT */
/* ------------------ */
#walk-right-col {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(12, 1fr);
	grid-auto-rows: 3fr 3fr 5fr;
	height: calc(100vh - 3.25rem);
    margin-top: -5rem;
}

#walk-radar {
	grid-column: 1 / span 5;
	grid-row: 1;
}
#walk-metric-dist {
	grid-column: 6 / span 7;
	grid-row: 1;
}

#walk-racepie {
	grid-column: 1 / span 4;
	grid-row: 2;
}
#walk-agepie {
	grid-column: 5 / span 4;
	grid-row: 2;
}
#walk-contextbar {
	grid-column: 9 / span 4;
	grid-row: 2;
}

#walk-detail-map-container {
	grid-column: 1 / span 12;
	grid-row: 3;
}

#walk-map-container *:focus {
    outline: none !important;
}

@media (max-width: 2450px) {
	#walk-right-col {
		grid-auto-rows: 24rem 24rem 24rem 30rem;
		height: calc(100vh - 3.725rem);
		overflow-y: auto;
        margin-top: -4.375rem;
	}

	#walk-metric-dist {
		grid-column: 1 / span 12;
		grid-row: 1;
	}

	#walk-radar {
		grid-column: 1 / span 6;
		grid-row: 2;
	}
	#walk-contextbar {
		grid-column: 7 / span 6;
		grid-row: 2;
	}

	#walk-racepie {
		grid-column: 1 / span 6;
		grid-row: 3;
	}
	#walk-agepie {
		grid-column: 7 / span 6;
		grid-row: 3;
	}

	#walk-detail-map-container {
		grid-column: 1 / span 12;
		grid-row: 4;
	}
}

@media (max-width: 1840px) {
	#walk-right-col {
		grid-auto-rows: 24rem 24rem 24rem 24rem 30rem;
        height: calc(100vh - 8.125rem);
        margin-top: 0;
        border-top: 1px solid #D9D9D9;
	}

	#walk-metric-dist {
		grid-column: 1 / span 12;
		grid-row: 1;
	}
	#walk-radar {
		grid-column: 1 / span 12;
		grid-row: 2;
	}

	#walk-racepie {
		grid-column: 1 / span 6;
		grid-row: 3;
	}
	#walk-agepie {
		grid-column: 7 / span 6;
		grid-row: 3;
	}
	#walk-contextbar {
		grid-column: 1 / span 12;
		grid-row: 4;
	}

	#walk-detail-map-container {
		grid-column: 1 / span 12;
		grid-row: 5;
	}
}

@media (max-width: 1800px) {
	#walk-right-col {
		grid-auto-rows: 24rem 24rem 24rem 24rem 24rem 30rem;
	}

	#walk-metric-dist {
		grid-column: 1 / span 12;
		grid-row: 1;
	}
	#walk-radar {
		grid-column: 1 / span 12;
		grid-row: 2;
	}

	#walk-racepie {
		grid-column: 1 / span 12;
		grid-row: 3;
	}
	#walk-agepie {
		grid-column: 1 / span 12;
		grid-row: 4;
	}
	#walk-contextbar {
		grid-column: 1 / span 12;
		grid-row: 5;
	}

	#walk-detail-map-container {
		grid-column: 1 / span 12;
		grid-row: 6;
	}
}

/* ------------- */
/* HEALTH LAYOUT */
/* ------------- */
#health-right-col {
	display: grid;
	gap: 2rem;
	grid-template-columns: repeat(12, 1fr);
	grid-auto-rows: 4fr 5fr 4fr;
	height: calc(100vh - 3.25rem);
    margin-top: -5rem;
}

#health-right-col * {
	min-height: 0;
}

#health-coefbar {
	grid-column: 1 / span 5;
	grid-row: 1;
}
#health-dist {
	grid-column: 6 / span 7;
	grid-row: 1;
}

#health-scatter {
	grid-column: 1 / span 7;
	grid-row: 2;
}

#health-density {
	grid-column: 8 / span 5;
	grid-row: 2;
}

#health-violin {
	grid-column: 1 / span 5;
	grid-row: 3;
}

#health-diffbar {
	grid-column: 6 / span 7;
	grid-row: 3;
}

#health-map-container *:focus {
    outline: none !important;
}

@media (max-width: 2560px) {
	#health-right-col {
        height: calc(100vh - 8.125rem);
        margin-top: 0;
        border-top: 1px solid #D9D9D9;
	}
}

@media (max-width: 2350px) {
    #health-scatter {
        grid-column: 1 / span 6;
    }

    #health-density {
        grid-column: 7 / span 6;
    }
}

@media (max-width: 2000px) {
	#health-right-col {
		grid-auto-rows: 24rem 28rem 20rem 24rem 24rem;
        height: calc(100vh - 8.125rem);
		overflow-y: auto;
        margin-top: 0;
	}

	#health-dist {
		grid-column: 1 / span 12;
		grid-row: 1;
	}

    #health-scatter {
        grid-column: 1 / span 12;
        grid-row: 2;
    }

	#health-coefbar {
		grid-column: 1 / span 12;
		grid-row: 3;
	}

    #health-violin {
        grid-column: 1 / span 6;
        grid-row: 4;
    }

    #health-density {
        grid-column: 7 / span 6;
        grid-row: 4;
    }

    #health-diffbar {
        grid-column: 1 / span 12;
        grid-row: 5;
    }
}

@media (max-width: 1700px) {
    #health-right-col {
		grid-auto-rows: 24rem 28rem 20rem 24rem 30rem 24rem;
	}

    #health-violin {
        grid-column: 1 / span 12;
        grid-row: 4;
    }

    #health-density {
        grid-column: 1 / span 12;
        grid-row: 5;
    }

    #health-diffbar {
        grid-column: 1 / span 12;
        grid-row: 6;
    }
}