@font-face {
    font-family: gobold;
    src: url(./assets/fonts/gobold.otf);
}

:root {
    --bg: #ffffff;
    --fg: #000000;
    --grey: #808080;
    --anglo: #ff8040;
    --franco: #20a0ff;
    --none: #808080;
    --maritimes: #00c080;
    --prairies: #ffc000;
    --other: #6a60bf;
    --liberal: #d96363;
    --conservativeOld: #80adff;
    --progressive: #89e52e;
    --progressiveConservative: #7060bf;
    --cooperativeCommonwealth: #afbf00;
    --socialCredit: #1bb2b2;
    --newDemocratic: #e5a117;
    --blocQuebecois: #75d2e5;
    --green: #3fcf3f;
    --reform: #29cc96;
    --conservativeNew: #3077bf;
    --peoples: #b395e5;
    --chart: url("./assets/lchart.png")
}

:root.dark {
    --bg: #202020;
    --fg: #ffffff;
    --chart: url("./assets/dchart.png")
}

* {
    text-align: center;
    font-family: gobold;
    font-weight: 500;
    margin: 0;
    padding: 0;
    text-decoration: none;
    user-select: none;
    color: #000000;
    text-shadow: -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: 2676px;
    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: 16px;
    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: 1275px;
    height: 1925px;
    z-index: 0;
    margin: 0;
    padding: 0;
}

#title {
    position: absolute;
    top: 40px;
    left: 300px;
    font-size: 48px;
    width: 896px;
}

#relatedSites {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 192px;
    position: absolute;
    top: 448px;
    left: 32px;
    font-size: 16px;
    z-index: 1;
}

.relatedSite {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 48px;
    text-align: left;
}

.relatedSite__icon {
    height: 100%;
}

#partiesLegend {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 288px;
    position: absolute;
    top: 92px;
    left: 32px;
    font-size: 24px;
    z-index: 1;
}

#partiesLegend__grid {
    display: grid;
    grid-template-columns: repeat(4, 72px);
    grid-template-rows: repeat(3, 80px);
    gap: 8px 0;
}

.legendParty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
    gap: 8px;
    width: 100%;
    height: 100%;
}

.legendParty__logo {
    width: 48px;
    height: 48px;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

.legendParty__name {
    font-size: 10px;
}

#nodesLegend {
    position: absolute;
    top: 137px;
    left: 392px;
    height: fit-content;
    width: fit-content;
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    gap: 24px;
    z-index: 1;
}

.nodesLegend__line {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: start;
    gap: 23px;
    font-size: 16px;
}

.nodesLegend__grid {
    display: grid;
    grid-template-columns: repeat(3, 160px);
    gap: 8px 8px;
}

.nodeInfo {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: start;
    gap: 8px;
    width: 160px;
}

.nodeInfo__text {
    display: flex;
    align-items: center;
    font-size: 12px;
    width: 104px;
    height: 36px;
    text-align: left;
}

#eventsLegend {
    position: absolute;
    display: flex;
    flex-direction: column;
    top: 204px;
    left: 1060px;
    gap: 64px;
    font-size: 10px;
    z-index: 1;
}

.event {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: end;
    gap: 8px;
    width: 198px;
    height: 192px;
}

.event__text {
    font-size: 16px;
}

.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: 10px;
    z-index: 2;
    width: 72px;
}

.node__shape {
    display: block;
    width: 36px;
    height: 36px;
    z-index: 1;
}

.node .node__shape {
    position: absolute;
    transform: translate(-50%, -50%);
}

.node__shape--grey {
    background-color: var(--grey);
}

.node__shape--anglo {
    background-color: var(--anglo);
}

.node__shape--franco {
    background-color: var(--franco);
}

.node__shape--none {
    background-color: var(--none);
}

.node__shape--maritimes {
    background-color: var(--maritimes);
}

.node__shape--prairies {
    background-color: var(--prairies);
}

.node__shape--other {
    background-color: var(--other);
}

.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;
}

.node__shape--liberal {
    outline: solid 4px var(--liberal);
}

.node__shape--conservativeOld {
    outline: solid 4px var(--conservativeOld);
}

.node__shape--progressive {
    outline: solid 4px var(--progressive);
}

.node__shape--progressiveConservative {
    outline: solid 4px var(--progressiveConservative);
}

.node__shape--cooperativeCommonwealth {
    outline: solid 4px var(--cooperativeCommonwealth);
}

.node__shape--socialCredit {
    outline: solid 4px var(--socialCredit);
}

.node__shape--newDemocratic {
    outline: solid 4px var(--newDemocratic);
}

.node__shape--blocQuebecois {
    outline: solid 4px var(--blocQuebecois);
}

.node__shape--green {
    outline: solid 4px var(--green);
}

.node__shape--reform {
    outline: solid 4px var(--reform);
}

.node__shape--conservativeNew {
    outline: solid 4px var(--conservativeNew);
}

.node__shape--peoples {
    outline: solid 4px var(--peoples);
}

#arrows {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    overflow: visible;
    inset: 0;
    width: 100%;
    height: 100%;
}

.arrow {
    stroke-width: 2;
    stroke: var(--grey);
    fill: var(--grey);
}

.arrow--liberal {
    stroke: var(--liberal);
    fill: var(--liberal);
}

.arrow--conservativeOld {
    stroke: var(--conservativeOld);
    fill: var(--conservativeOld);
}

.arrow--progressive {
    stroke: var(--progressive);
    fill: var(--progressive);
}

.arrow--progressiveConservative {
    stroke: var(--progressiveConservative);
    fill: var(--progressiveConservative);
}

.arrow--cooperativeCommonwealth {
    stroke: var(--cooperativeCommonwealth);
    fill: var(--cooperativeCommonwealth);
}

.arrow--socialCredit {
    stroke: var(--socialCredit);
    fill: var(--socialCredit);
}

.arrow--newDemocratic {
    stroke: var(--newDemocratic);
    fill: var(--newDemocratic);
}

.arrow--blocQuebecois {
    stroke: var(--blocQuebecois);
    fill: var(--blocQuebecois);
}

.arrow--green {
    stroke: var(--green);
    fill: var(--green);
}

.arrow--reform {
    stroke: var(--reform);
    fill: var(--reform);
}

.arrow--conservativeNew {
    stroke: var(--conservativeNew);
    fill: var(--conservativeNew);
}

.arrow--peoples {
    stroke: var(--peoples);
    fill: var(--peoples);
}

.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: 10px;
}