/* AJ Martin waz here */
@import url('https://fonts.googleapis.com/css2?family=Bitcount+Single:wght@100..900&family=League+Spartan:wght@100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --Dash-Fill-Interactive-Strong: #4bbec4;
    --border-colour: #eee;
    --border-text-colour: #0d0b05;
    --main-wrap-colour: #ffffff;
    --main-wrap-text-colour: #0d0b05;
    --bg-color: #f6fafe;
}
html,
.wsite-section-wrap {
    background: var(--bg-color);
}
html {
    scrollbar-color: var(--Dash-Fill-Interactive-Strong) transparent;
}
.wsite-section-wrap {
    min-height: 100vh;
}
.wsite-footer p,
.wsite-footer h1,
.wsite-footer h2,
.wsite-footer h3,
.wsite-footer h4 {
    color: var(--border-text-colour);
}
.main-wrap {
    background: var(--main-wrap-colour);
    box-shadow: 0 1px 6px 0 #20212447;
}
.main-wrap p,
.main-wrap h1,
.main-wrap h2,
.main-wrap h3,
.main-wrap h4 {
    color: var(--main-wrap-text-colour);
}

h1.bitcount-single-400 {
    text-align: center;
    font-size: 64px;
    &>sup {
        font-size: 32px;
    }
}

a:hover {
    color: var(--Dash-Fill-Interactive-Strong);
}
/*initial loading*/
._dash-loading {
    margin: auto;
    color: transparent;
    width: 0;
    height: 0;
    text-align: center;
}
._dash-loading::after {
    content: '';
    display: inline-block;
    width: 2rem;
    height: 2rem;
    color: var(--Dash-Fill-Interactive-Strong);
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    -webkit-animation: spinner-border 0.75s linear infinite;
    animation: spinner-border 0.75s linear infinite;
    margin-top: calc(50vh - 2rem);
}
.loading-container {
    height: 100%;
}
/*plot loading*/
.iframe-spinner-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.6); 
    z-index: 10;
    pointer-events: none;
}
[data-dash-is-loading="true"] {
    position: relative;
    min-height: 450px; 
    opacity: 0.6;      
    pointer-events: none; 
}
[data-dash-is-loading="true"] + .iframe-spinner-overlay {
    display: block;
}
[data-dash-is-loading="true"]::after,
[data-dash-is-loading="true"] + .dm-tab-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    margin-left: -20px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--Dash-Fill-Interactive-Strong); 
    border-radius: 50%;
    animation: dash-spinner 0.8s linear infinite;
    z-index: 1000;
}
@keyframes dash-spinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



#nav {
    z-index: 100;
    position: fixed;
    overflow-x: hidden;
    top: 0px;
    left: 0px;
    padding-top: 60px;
    height: 100vh;
    width: 100%;
    background-color: var(--Dash-Fill-Interactive-Strong);
    transform: translateX(100%);
    transition: transform 500ms ease;
}

#nav>.container {
    padding: 20px;
    overflow: visible !important;
}

#nav .closeBtn {
    position: absolute;
    width: 1em;    
    top: -20px;
    right: -50px;
    font-size: 48px;
    margin-right: 50px;
}
#nav:target {
  transform: translateY(0);
}

#nav:target ~html {
    overflow-y: hidden;
}

.datepickerwrapper,
.dash-dropdown-wrapper {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
}

#nav a.nav-items {
    text-decoration: none;
    padding-left: 10px;
    line-height: 1;
    padding: 30px 10px;
    font-size: 24px;
    display: block;
    transition: 200ms;
    &::after {
        content:'';
        margin-left: 4px;
    };
    &:hover::after {
        content: '>';
        margin-left: 4px;
    }
}
#nav a:hover {
    color: var(--main-wrap-colour);
}

.dm-subtitle {
    padding: 5px 10px;
    border-radius: 20px;
    margin: 10px;
    background: var(--Dash-Fill-Interactive-Strong);
    white-space: nowrap;
    overflow: hidden;
}
.dm-subtitle-separator {
    margin-left: 100px;
    margin-right: 100px;
}

.dm-subtitle>span {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 30s linear infinite;
}
.dm-subtitle:hover>span {
    animation-play-state: paused;
}
.dm-subtitle a:hover {
    color: var(--main-wrap-colour);
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}
@media screen and (prefers-reduced-motion: reduce) {
    .dm-subtitle {
        white-space: wrap;
    }
    .dm-subtitle>span {
        padding-left: 0px;
        animation: 0s
    }
    .dm-subtitle-separator {
        margin-left: 10px;
        margin-right: 10px;
    }
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
.dm-header,
.dm-selection {
    padding: 20px;
}

#dm-logo {
    width: 50px;
    background-image: url(assets/drugmaplogo.png);
    aspect-ratio: 1 / 1;
    background-size: contain;
    border: none;
    background-color: transparent;
    cursor: pointer;
    &:hover {
        opacity: 0.7;
    }
}

.gtitle { /* Bar graph title */
    font-family: "Bitcount Single", system-ui !important;
    font-optical-sizing: auto;
    font-weight: 400 !important;
    font-style: normal;
}

.bitcount-single-400 {
    font-family: "Bitcount Single", system-ui;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings:
        "slnt" 0,
        "CRSV" 0.5,
        "ELSH" 0,
        "ELXP" 0;
}

.dm-button {
    background: var(--Dash-Fill-Interactive-Strong);
    position: relative;
    display: inline-block;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--main-wrap-text-colour);
    border-radius: 20px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    font-family: 'Bitcount Single'; 
    &:hover {
        transform: scale(1.1);
        opacity: 1;
        background: var(--main-wrap-text-colour);
        color: var(--Dash-Fill-Interactive-Strong);
    } 
}

#shareButton {
    position: absolute; 
    top: 20px; 
    right: 20px; 
    background-image: url('assets/shareicon.png');
    background-size: contain;
    background-color: var(--Dash-Fill-Interactive-Strong);
    width: 20px;
    height: 20px;
    border: none;
    cursor: pointer;
    &:hover {
        opacity: 0.7;
    }
}
#hamburger {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1;
}
#hamburger>div {
  width: 25px;
  height: 4px;
  background-color: var(--main-wrap-text-colour);
  margin: 5px 0;
}

#btn_xlsx {
    background: none;
    border: none;
    position: absolute;
    bottom: 20px;
    left: 10px;  
}

#btn_xlsx:hover {
    color: var(--Dash-Fill-Interactive-Strong);
}

#btn_xlsx,
.previous-next-container>button:enabled {
    cursor: pointer;
}

.dash-datepicker, 
.dash-datepicker>div>div,
.dash-dropdown-wrapper .dash-datepicker-content {
    border-radius: 10px;
}

.dash-datepicker-controls .dash-input,
.dash-datepicker-controls .dash-dropdown-trigger,
.dash-datepicker-controls .dash-dropdown {
    border-radius: 4px !important;
}

.dm-selection-dates {
    padding: 10px;
    flex: 1;
    min-width: 250px;
}
.dash-datepicker-input {
    width: 96px !important;
}

.DateInput_input {
    font-size: 16px;
    line-height: .8em;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500
}

.DateRangePickerInput__withBorder {
    border: 1px solid #ccc;
    border-radius: 10px;
    z-index: 10;
}

.dash-dropdown,
.dash-dropdown-content {
    border-radius: 10px;
}

.DateInput,
.DateInput_input {
    background-color: transparent !important;
}

.DateInput_input {
    padding-top: 10px;
    padding-bottom: 8px;
}

.datepickerwrapper {
    padding: 0px;
}

/* Tabs */
.tab-container {
    gap: 10px;
    padding-left: 10px;  
    justify-content: flex-start;
    flex-wrap: nowrap;
    flex-direction: row !important;
    height:38.5px;
}

.custom-tab, 
.custom-tab--selected {
    border-radius: 10px 10px 0px 0px;
    border-bottom: none !important;
    padding: 9px 15px 5px 15px;
    margin-top: 4px;
    flex: none;
    font-family: "Bitcount Single", system-ui !important;
    font-optical-sizing: auto;
    font-weight: 400 !important;
    font-style: normal;
    transition: margin-top 0.2s ease-out; 
    &:hover {
        margin-top: 0px;
    }
}
.custom-tab {
    background: var(--border-colour);
    border: 3px solid var(--border-colour) !important;
}
.custom-tab--selected {
    background: var(--Dash-Fill-Interactive-Strong);
    border: 3px solid var(--Dash-Fill-Interactive-Strong) !important;
    &:hover {
        background-color: var(--Dash-Fill-Interactive-Strong);
    }
}
.dm-flex-wrap,
#mapwrapper {
    border: 3px solid var(--Dash-Fill-Interactive-Strong);
    scrollbar-color: var(--border-colour) transparent;
}

.dm-selection-flexwrap {
    display: flex; 
    flex-direction: row;
    flex-wrap: wrap;
    margin-bottom: 20px
}

.dm-table-scroll {
    overflow-x: scroll;
    padding: 10px;
    font-size: 10px;
}

#mapwrapper{
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    border-radius: 10px;
    padding: 0;
}
iframe#graph-content {
    width: 100%; /*calc(100% + 16px) !important*/
    height: 100%;
    padding: 0;
}

iframe#graph-content>html>body {
    margin: 0 !important;
}

/*iframe#graph-content {
    aspect-ratio: 16.385 / 10
}*/

.dm-flex-wrap {
    min-height: 500px;
    transform: translateZ(0px);
    border-radius: 10px;
    box-sizing: border-box;
}
p.notice {
    font-size: 8px;
    margin: 15px;
    position: absolute;
    bottom: 0px;
    left: 0px;
}

#nav .sticky-bottom {
    position: absolute;
    bottom: 40px;
    right: 0px;
    &>* {
        font-size: 12px;
        text-align: right;
    }
}

.dm-flex-child {
    flex: 1 0 0px;
    min-width: 250px;
    max-width: 600px;
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-start;
}

.dm-pie {
    flex: 1 1 250px;
    max-width: 500px !important;
}

.dm-bar {
    flex: 2 1 450px;
    max-width: 800px !important;
}

.changelog {
    font-family: 'Montserrat', sans-serif;
}

/*changelog toggle*/
#changelog-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}
#changelog-body h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    margin-top: 30px;
    margin-bottom: 10px; 
}
#changelog-body h4:first-of-type {
    margin-top: 10px !important;
}
#changelog-body p {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
}
#changelog-body ul {
    padding-left: 20px;
}
#changelog-body ul,
#changelog-body ul li {
    list-style: disc outside !important;
}

.changelog-label::before {
    content: '▲ ';
    font-size: 0.8em;
    vertical-align: middle;
    margin-right: 4px;
}
#changelog-toggle:has(.changelog-input:checked) .changelog-label::before {
    content: '▼ ';
}
#changelog-toggle:has(.changelog-input:checked) ~ #changelog-body {
    max-height: none; /* expand without restriction */
}
.changelog-input {
    display: none;
}

/*@media (max-width: 646px) {
    iframe#graph-content {
        aspect-ratio: 16.2 / 10 !important;
    }
}

@media (max-width: 410px) {
    iframe#graph-content {
        aspect-ratio: 16.1 / 10 !important;
    }
}

@media (min-width: 1100px) {
    iframe#graph-content {
        aspect-ratio: 16.5 / 10 !important;
    }
}*/
@media (max-height: 550px) {
    #nav a.nav-items {
        padding: 15px 10px;
    }
}
@media (min-width: 700px) {
    #nav a.nav-items {
        padding-left: 50px;
    }
}
@media (max-width: 700px) {
    .dm-header {
        padding: 20px 20px 0px 20px;
    }
    .dm-selection {
        padding: 0px 20px 20px 20px;
    }
    .dm-selection-flexwrap {
        margin-bottom: 10px
    }
}
@media (min-width: 393px) {
    .custom-tab, 
    .custom-tab--selected {
        width: 100px;
    }
}
@media (max-width: 392px) {
    .custom-tab, 
    .custom-tab--selected {
        max-width: 100px;
        padding-left: 8px;
        padding-right: 8px;
    }
    .gtitle {
        font-size: 14px !important;
    }
    #nav a.nav-items {
        font-size: 20px;
    }
    h1.bitcount-single-400 {
        font-size: 48px;
        &>sup {
            font-size: 24px;
        }
    }
    .dm-selection-flexwrap>div {
        padding-left: 0px !important;
        padding-right: 0px !important;
    }
    .dm-subtitle {
        margin-left: 0px;
        margin-right: 0px;
    }
    #dm-logo {
        width: 40px;
    }
}
@media (max-width: 299px) {
    .tab-container>div:last-child {
        display:none;
    }
    .datepickerwrapper,
    .dash-dropdown-wrapper {
        font-size: 12px;
    }
    .dm-selection-dates{
        min-width: 200px !important;
    }
    .dash-datepicker-input {
        width: 73px !important;
    }
    #nav .sticky-bottom>* {
        font-size: 10px;
    }
}

@media (prefers-color-scheme: dark) {
    html {
        filter: invert(1) hue-rotate(180deg);
        scrollbar-color: var(--Dash-Fill-Interactive-Strong) #090501;
    }
    img,
    svg,
    video,
    canvas,
    iframe {
        filter: invert(1) hue-rotate(180deg);
    }
    #dm-logo {
        filter: invert(0);
    }
    g.xtick>text,
    g.ytick>text,
    text.gtitle,
    text.xtitle,
    text.ytitle,
    text.legendtext {
        fill: #fff !important;
        color: #fff
    }
    body {
        overflow-x: hidden;
    }
}