@font-face {
    font-family: expressway;
    src: url(./assets/fonts/expressway.ttf);
}

:root {
    --bg: #ffffff;
    --fg: #000000;
    --grey: #808080;
    --federalist: #9e63ff;
    --jeffersonian: #0bae00;
    --whig: #d27400;
    --democrat: #008ffb;
    --republican: #ff1300;
    --chart: url("./assets/lchart.png")
}

:root.dark {
    --bg: #202020;
    --fg: #ffffff;
    --chart: url("./assets/dchart.png")
}

* {
    text-align: center;
    font-family: expressway;
    font-weight: 500;
    margin: 0;
    padding: 0;
    text-decoration: none;
    user-select: none;
    color: #000000;
    line-height: 1.1;
    word-break: normal;
    text-shadow: -.5px -.5px 0 #fff, .5px -.5px 0 #fff, -.5px .5px 0 #fff, .5px .5px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
    /*outline-offset: -1px;
    outline: solid 1px #0f0 !important;
    /*For wireframe kiddies*/
}

html {
    display: flex;
    align-items: start;
    justify-content: center;
    background-color: var(--bg);
    width: 2900px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

#controls {
    position: fixed;
    display: flex;
    align-items: center;
    gap: 16px;
    top: 16px;
    left: 16px;
    height: 48px;
    z-index: 1000;
}

.theme-toggle {
    height: 48px;
    width: 64px;
    cursor: pointer;
}

.theme-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.theme-toggle__icon {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background-color: var(--fg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.theme-toggle:hover .theme-toggle__icon {
    transform: scale(1.05);
}

.theme-toggle:active .theme-toggle__icon {
    transform: scale(0.95);
}

.theme-toggle__icon::before {
    content: "LIGHT";
    font-size: 24px;
    text-shadow: none;
    color: var(--bg);
}

#themeToggle:checked+.theme-toggle__icon::before {
    content: "DARK";
}

#zoomSlider {
    appearance: none;
    background-color: var(--grey);
    height: 16px;
    border-radius: 16px;
    border: none;
    width: 128px;
    margin: 0;
    cursor: pointer;
}

#zoomSlider::-webkit-slider-thumb,
#zoomSlider::-moz-range-thumb {
    width: 16px;
    height: 48px;
    border-radius: 16px;
    border: none;
    background-color: var(--fg);
}

#zoomZone {
    position: relative;
    width: 1450px;
    height: 2400px;
    z-index: 0;
    margin: 0;
    padding: 0;
}

#title {
    position: absolute;
    top: 48px;
    left: 272px;
    font-size: 64px;
    width: fit-content;
}

#relatedSites {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 192px;
    position: absolute;
    top: 224px;
    left: 80px;
    font-size: 24px;
    z-index: 2;
}

.relatedSite {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 48px;
    text-align: left;
}

.relatedSite__icon {
    height: 100%;
}

#nodesLegend {
    position: absolute;
    top: 144px;
    left: 352px;
    height: fit-content;
    width: fit-content;
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    gap: 16px;
    z-index: 2;
}

.nodesLegend__line {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 24px;
    width: 100%;
}

.nodesLegend__grid {
    display: grid;
    grid-template-columns: repeat(3, 160px);
    gap: 8px;
}

.nodeInfo {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: start;
    gap: 8px;
}

.nodeInfo__text {
    display: flex;
    align-items: center;
    font-size: 16px;
    width: 104px;
    height: 36px;
    text-align: left;
}

#eventsLegend {
    position: absolute;
    display: flex;
    flex-direction: column;
    top: 112px;
    left: 1200px;
    gap: 112px;
    font-size: 24px;
    z-index: 2;
    width: 192px;
}

.event {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: end;
    gap: 8px;
    width: 192px;
    height: 192px;
}

.event__text {
    font-size: 24px;
}

.event__image {
    width: 192px;
    height: 128px;
    border: solid 3px var(--fg);
    border-radius: 6px;
}

#chart {
    position: absolute;
    top: 0;
    left: 0;
}

.node {
    position: absolute;
}

.node__text {
    display: block;
    position: absolute;
    transform: translate(-50%, -50%);
    font-size: 16px;
    z-index: 3;
    width: 80px;
}

.node__shape {
    display: block;
    width: 40px;
    height: 40px;
    z-index: 2;
}

.node .node__shape {
    position: absolute;
    transform: translate(-50%, -50%);
}

.node__shape--grey {
    background-color: var(--grey);
}

.node__shape--federalist {
    background-color: var(--federalist);
}

.node__shape--jeffersonian {
    background-color: var(--jeffersonian);
}

.node__shape--whig {
    background-color: var(--whig);
}

.node__shape--democrat {
    background-color: var(--democrat);
}

.node__shape--republican {
    background-color: var(--republican);
}

.node__shape--ideology {
    border-radius: 100%;
    border: solid 2px var(--fg);
}

.node__shape--faction {
    border: solid 2px var(--fg);
    border-radius: 4px;
}

.node__shape--current {
    border: solid 2px var(--fg);
    border-radius: 4px;
    transform: translate(-50%, -50%) rotate(45deg) !important;
}

.portrait__text {
    display: block;
    position: absolute;
    transform: translate(-50%, calc(-50% + 54px));
    font-size: 16px;
    z-index: 3;
    width: 128px;
}

.portrait__shape {
    display: block;
    position: absolute;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 80px;
    z-index: 3;
    border-radius: 6px;
    background-position: center;
    background-size: cover;
}

.portrait__shape--grey {
    border: solid 3px var(--grey);
}

.portrait__shape--federalist {
    border: solid 3px var(--federalist);
}

.portrait__shape--jeffersonian {
    border: solid 3px var(--jeffersonian);
}

.portrait__shape--whig {
    border: solid 3px var(--whig);
}

.portrait__shape--democrat {
    border: solid 3px var(--democrat);
}

.portrait__shape--republican {
    border: solid 3px var(--republican);
}

#arrows {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    overflow: visible;
    inset: 0;
    width: 1450px;
    height: 100%;
}

.arrow {
    stroke-width: 2;
    stroke: var(--grey);
}

.arrow--federalist {
    stroke: var(--federalist);
}

.arrow--jeffersonian {
    stroke: var(--jeffersonian);
}

.arrow--whig {
    stroke: var(--whig);
}

.arrow--democrat {
    stroke: var(--democrat);
}

.arrow--republican {
    stroke: var(--republican);
}

.arrow__text {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    pointer-events: none;
    font-size: 16px;
}

.arrowhead {
    fill: var(--grey);
}

.arrowhead--federalist {
    fill: var(--federalist);
}

.arrowhead--jeffersonian {
    fill: var(--jeffersonian);
}

.arrowhead--whig {
    fill: var(--whig);
}

.arrowhead--democrat {
    fill: var(--democrat);
}

.arrowhead--republican {
    fill: var(--republican);
}