:root {
    --fade-time: 80ms;
    --preview-add-color: #1F1F9F;
    --preview-remove-color: #9F1F1F;
}

@font-face {
    font-family: "AshenCustom";
    font-style: normal;
    font-weight: normal;
    src: url("./assets/ashen_custom.ttf");
}

html, body {
    font-family: AshenCustom, sans-serif;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

.invisible {
    opacity: 0.0;
    transition: visibility 0ms var(--fade-time), opacity var(--fade-time) linear;
    visibility: hidden;
    will-change: opacity;
}

.visible {
    opacity: 1.0;
    transition: opacity var(--fade-time) linear;
    visibility: visible;
    will-change: opacity;
}

.filtered {
    filter: grayscale(1.0) brightness(0.5);
}

.highlighted {
    filter: drop-shadow(-0.25em 0 0 white) drop-shadow(0.25em 0 0 white) drop-shadow(0 0.25em 0 white) drop-shadow(0 -0.25em 0 white);
}

.highlighted img {
    opacity: 1.0 !important;
}

.preview-add {
    filter: drop-shadow(-0.1em 0 0 var(--preview-add-color)) drop-shadow(0.1em 0 0 var(--preview-add-color)) drop-shadow(0 0.1em 0 var(--preview-add-color)) drop-shadow(0 -0.1em 0 var(--preview-add-color));
}

.preview-remove {
    filter: drop-shadow(-0.1em 0 0 var(--preview-remove-color)) drop-shadow(0.1em 0 0 var(--preview-remove-color)) drop-shadow(0 0.1em 0 var(--preview-remove-color)) drop-shadow(0 -0.1em 0 var(--preview-remove-color));
}

.preview-add img, .preview-remove img {
    opacity: 1.0 !important;
}

.word {
    contain: paint layout;
    display: inline-block;
    min-width: fit-content;
}

.word + .word {
    margin-left: 0.25em;
}

.custom-button {
    align-items: center;
    background-color: darkslategray;
    border: 0.25em solid dimgray;
    border-radius: 0.25em;
    color: white;
    contain: paint layout;
    display: flex;
    filter: drop-shadow(0 0.1em 0 white);
    font-family: AshenCustom, sans-serif;
    font-size: large;
    justify-content: center;
    margin-bottom: 0.1em;
    padding: 0.5em;
    text-shadow: -1px -1px 0 black, 0 -1px 0 black, 1px -1px 0 black, 1px 0 0 black, 1px 1px 0 black, 0 1px 0 black, -1px 1px 0 black, -1px 0 0 black;
    white-space: nowrap;
}

.custom-button:hover {
    cursor: pointer;
    filter: brightness(1.25);
    margin-bottom: 0;
    margin-top: 0.1em;
}

.custom-button:disabled {
    cursor: not-allowed;
    filter: brightness(0.5) saturate(0.0);
}

.horizontal-line {
    contain: size paint layout;
    display: flex;
    height: 1px;
    margin: 0;
    padding: 0;
}

.panel-group {
    background-color: #182828;
    color: #AAAAAA;
    contain: paint layout;
    display: flex;
    flex-direction: column;
    padding: 0.25em;
}

.panel-group-title-big {
    background-color: #243C3C;
    contain: paint layout;
    font-size: small;
    padding: 0.25em;
    text-align: center;
}

.panel-group-title-small {
    background-color: #243C3C;
    color: #AAAAAA;
    contain: paint layout;
    font-size: small;
    padding: 0.25em;
    text-align: left;
}

.panel-group-item-container {
    background-color: #081818;
    display: flex;
    flex-direction: column;
    gap: 0.25em;
    padding: 0 0 0.25em 0;
}

.panel-group-item-container .panel-group-item + .panel-group-item {
    border-top: 1px solid #384848;
    padding-top: 0.25em;
}

.panel-group-item {
    contain: layout;
    display: flex;
    gap: 0.25em;
    padding: 0 0.5em;
    scrollbar-width: none;
}

.panel-group-item-allocated {
    background-color: #1E3232;
    border-radius: 0.25em;
    contain: layout;
    display: flex;
    flex-direction: column;
    font-size: small;
    min-width: 20%;
    outline: 1px solid black;
    padding: 0.25em;
    text-align: center;
    white-space: nowrap;
}

.panel-stats-group {
    display: flex;
    gap: 1.0em;
    padding: 0.5em;
}

.panel-stats-group-title {
    color: white;
    contain: paint layout;
    font-weight: bold;
    margin-bottom: 0.5em;
}

.panel-stats-container-group {
    display: flex;
    flex-direction: column;
    font-size: small;
    text-align: left;
    width: 100%;
}

.talent-node {
    contain: size layout;
    display: flex;
    image-rendering: pixelated;
    position: absolute;
    user-select: none;
}

.talent-node img {
    contain: size paint layout;
}

.talent-node img:not(.talent-node-icon) {
    filter: brightness(0.75);
    opacity: 0.5;
}

.talent-node.active img:not(.talent-node-icon) {
    filter: none;
    opacity: 1.0;
}

.talent-node:not(.panning):hover {
    cursor: pointer;
    transform: scale(1.5);
}

#content-container {
    background-color: black;
    contain: size layout;
    display: flex;
    height: 100%;
}

#viewport-container {
    contain: size layout;
    display: flex;
    height: 100%;
    position: relative;
    width: 100%;
}

#talent-container {
    background-color: #191821;
    contain: size layout;
    display: flex;
    height: 100%;
    position: absolute;
    width: 100%;
}

#talent-tree {
    contain: size layout;
    display: flex;
    position: absolute;
    transform-origin: 0 0;
    will-change: transform;
}

#ascendancy-container {
    background-color: #191821;
    contain: size paint layout;
    display: flex;
    outline: 4px solid white;
    position: absolute;
    transform-origin: 0 0;
    will-change: transform;
}

#ascendancy-tree-container {
    bottom: 0;
    display: flex;
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
    transform-origin: 0 0;
}

.ascendancy-tree {
    contain: size layout;
    height: 100%;
    width: 100%;
}

#ascendancy-menu {
    background-color: #191821;
    box-shadow: black 0 0 1.0em 0.5em;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    padding: 0.5em;
    position: absolute;
    z-index: 1;
}

#ascendancy-menu div {
    display: flex;
    padding: 0.25em;
}

#ascendancy-menu div:hover {
    background-color: #182828;
    cursor: pointer;
}

#tooltip-container {
    display: flex;
    filter: drop-shadow(-1px -1px white) drop-shadow(1px -1px white) drop-shadow(1px 1px white) drop-shadow(-1px 1px white);
    left: 100%;
    position: absolute;
    top: 100%;
    will-change: transform;
}

#info-tooltip {
    background-color: #101010;
    border-radius: 0.5em;
    color: #AAAAAA;
    contain: layout;
    display: flex;
    flex-direction: column;
    font-size: 1.0em;
    left: 0;
    position: absolute;
    top: 0;
    will-change: contents, transform;
}

#info-name {
    display: flex;
    white-space: nowrap;
    width: 100%;
}

#info-node-container {
    background-color: #5C5C5C;
    border-radius: 0.25em;
    color: white;
    display: flex;
}

#info-node-count {
    background-color: #808080;
    border-radius: 0.25em 0 0 0.25em;
    display: flex;
    gap: 0.25em;
    padding: 0.05em 0.25em;
    width: max-content;
}

#info-node-text {
    display: flex;
    padding: 0.05em 0.25em;
}

#info-stats {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
    padding: 0.5em;
}

#tooltip-arrow {
    border-bottom: 12px solid transparent;
    border-left: 12px solid #101010;
    border-top: 12px solid transparent;
    height: 0;
    left: 50%;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    transform-origin: -100% 50%;
    width: 0;
}

#top-bar, #ascendancy-bar {
    aspect-ratio: 256 / 22;
    background-image: url('assets/textures/gui/bar.png');
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
    box-shadow: black 0 0 1.0em 0.25em;
    contain: size paint layout;
    display: flex;
    gap: 1.0em;
    height: 44px;
    left: 50%;
    padding: 0 1em;
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    user-select: none;
}

#ascendancy-bar {
    box-shadow: black 0 0.25em 1.0em 0;
}

#side-panel {
    contain: size layout;
    display: flex;
    flex-direction: column;
    gap: 0.25em;
    height: 100%;
    padding: 0.25em;
    user-select: none;
    width: 100%;
}

#side-panel-footer {
    align-self: center;
    background-image: url('assets/textures/gui/bar.png');
    background-position: center top;
    background-repeat: no-repeat;
    background-size: calc(100% - 6px);
    contain: size paint layout;
    display: flex;
    gap: 0.25em;
    height: 1.5em;
    justify-content: center;
    padding: 0.25em 0;
    width: 100%;
}

#points-container {
    color: yellow;
    contain: size layout;
    display: flex;
    font-size: 1.25em;
    gap: 0.25em;
    height: 100%;
    left: 5%;
    margin-top: 0.5em;
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
}

#ascendancy-points-container {
    color: yellow;
    contain: size layout;
    display: flex;
    font-size: 1.25em;
    gap: 0.25em;
    justify-content: center;
    left: 50%;
    margin-top: 0.5em;
    position: absolute;
    top: 0;
    transform: translateX(-50%);
}

#talent-search-container {
    align-items: center;
    background-color: black;
    border: 1px solid white;
    contain: size layout;
    display: flex;
    height: 2em;
    left: calc(50% + 1.0em);
    position: relative;
    top: 2px;
    transform: translateX(-50%);
    width: 13em;
}

#talent-search {
    background-color: black;
    border: none;
    color: white;
    font-family: AshenCustom, sans-serif;
    font-size: 1.0em;
    height: 100%;
    outline: 1px solid white;
    position: relative;
    text-align: center;
    top: 0;
    width: 100%;
}

#talent-search-info {
    align-items: center;
    aspect-ratio: 1;
    color: white;
    display: flex;
    height: 1.5em;
    justify-content: center;
    padding: 0.25em;
    position: relative;
}

#version-select, #ascendancy-select {
    background-color: inherit;
    border: none;
    border-bottom: 1px solid white;
    color: white;
    font-size: large;
}

#version-select option, #ascendancy-select option {
    background-color: #182828;
}

#player-level {
    display: flex;
}

#loading {
    align-items: center;
    background-color: black;
    color: white;
    display: flex;
    flex-direction: column;
    font-size: 5em;
    height: 100%;
    justify-content: center;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 2;
}

#message-overlay {
    align-items: center;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    height: 100%;
    justify-content: center;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 2;
}

#message-box {
    background-color: black;
    border: 0.5em solid dimgray;
    border-radius: 1em;
    box-shadow: white 0 0 1.0em 0.25em;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    height: fit-content;
    left: 50%;
    padding: 0.5em;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 50vw;
}

#message-box-title {
    display: flex;
    font-size: xx-large;
    justify-content: center;
}

#message-box-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

#message-box-buttons {
    display: flex;
    flex-direction: column;
    gap: 1.0em;
    justify-content: center;
}
