:root {
    --tah-background-color: #00000000;
    --tah-border-radius: 3px;
    --tah-gap: 5px;

    --tah-button-background-color: #000000b3;
    --tah-button-border-color: none;
    --tah-button-box-shadow: 0 2px 0 -1px #0c0c0c, 0 0 0 1px #060606,
        0 0 5px #000000ff;
    --tah-button-disabled-text-color: var(--tah-text-secondary-color);
    --tah-button-text-color: var(--tah-text-primary-color);
    --tah-button-height: 32px;
    --tah-button-min-width: 32px;
    --tah-button-hover-box-shadow: 0 2px 0 -1px var(--tah-text-tertiary-color),
        0 0 0 1px red, 0 0 10px var(--tah-text-tertiary-color);
    --tah-button-hover-text-color: #fff;
    --tah-button-active-background-color: #3c0078bf;
    --tah-button-active-box-shadow: 0 0 0 1px #9b8dff, inset 0 0 10px #9b8dff;
    --tah-button-toggle-background-color: #000000b3;
    --tah-button-toggle-hover-background-color: #3c0078bf;
    --tah-button-toggle-hover-box-shadow: 0 0 0 1px #9b8dff, 0 0 10px #9b8dff;
    --tah-text-disabled-color: var(--tah-text-secondary-color);
    --tah-text-primary-color: #dddddd;
    --tah-text-secondary-color: #dddddd80;
    --tah-text-tertiary-color: #ff6400;
    --tah-text-hover-primary-color: var(--tah-text-primary-color);
    --tah-text-hover-secondary-color: var(--tah-text-secondary-color);
    --tah-text-hover-tertiary-color: var(--tah-text-tertiary-color);
    --tah-text-shadow: 1px 1px 1px rgb(0 0 0), 0px 1px 3px rgb(0 0 0);
}

#token-action-hud {
    align-items: center;
    border-radius: var(--tah-border-radius);
    display: flex;
    flex-direction: row;
    height: auto;
    left: 150px;
    position: fixed;
    top: 80px;
    width: auto;
    z-index: 100;
}

#token-action-hud [class*="icon-"] {
    display: inline-block;
    width: 100%;
}

#tah-character-name {
    color: var(--tah-text-primary-color);
    font-size: var(--font-size-16);
    margin: 0;
    padding: 0;
    pointer-events: none;
    position: absolute;
    text-align: left;
    text-shadow: var(--tah-text-shadow);
    top: -22px !important;
}

.tah-hidden {
    display: none !important;
}

#token-action-hud:hover #tah-collapse-hud,
#token-action-hud:hover > #tah-buttons {
    display: flex;
}

#tah-collapse-hud,
#tah-buttons {
    align-items: center;
    display: none;
    font-style: normal;
    font-weight: normal;
    height: var(--tah-button-height);
    position: relative;
    z-index: 1;
}

#tah-collapse-expand {
    font-style: normal;
    font-weight: normal;
    left: -16px;
    position: absolute;
}

#tah-collapse-hud,
#tah-buttons button {
    background: transparent;
    border: 0;
    line-height: unset;
    margin: 0;
    padding: 0;
}

#tah-collapse-hud:hover,
#tah-collapse-hud:focus,
#tah-buttons button:hover,
#tah-buttons button:focus {
    box-shadow: none;
}

#tah-collapse-expand button > :is(.fa, .fas),
#tah-buttons button > :is(.fa, .fas) {
    color: var(--tah-text-primary-color);
    font-size: var(--font-size-12);
    margin: 3px;
    padding: 3px;
    pointer-events: none;
    position: relative;
    text-align: center;
    text-shadow: var(--tah-text-shadow);
}

#tah-collapse-expand button > :is(.fa, .fas) {
    font-size: medium;
}

#tah-collapse-hud {
    left: -3px;
}

#tah-expand-hud {
    left: -3px;
    top: 16px;
}

#tah-expand-hud,
#tah-expand-hud:focus,
.tah-action-button,
.tah-action-button:focus,
.tah-group-button,
.tah-group-button:focus {
    align-items: center;
    background-color: var(--tah-button-background-color);
    border: var(--tah-button-border-color);
    border-radius: var(--tah-border-radius);
    box-shadow: var(--tah-button-box-shadow);
    color: var(--tah-button-text-color);
    display: flex;
    height: var(--tah-button-height);
    margin: 0;
    padding: 0;
    position: relative;
    text-align: center;
    text-decoration: none;
    text-shadow: var(--tah-text-shadow);
    transition: all 0.1s ease-in-out;
    white-space: nowrap;
    z-index: 1;
}

.tah-action-button,
.tah-group-button {
    font-size: var(--font-size-13);
    min-width: var(--tah-button-min-width);
}

#tah-expand-hud:hover,
.tah-action-button:active,
.tah-action-button:not(.disabled):hover,
.tah-group-button:not(.disabled):hover {
    box-shadow: var(--tah-button-hover-box-shadow);
    color: var(--tah-button-hover-text-color);
}

.tah-action-button.toggle:not(.disabled):hover {
    background: var(--tah-button-toggle-hover-background-color);
    box-shadow: var(--tah-button-toggle-hover-box-shadow);
}

.tah-action-button.active {
    background: var(--tah-button-active-background-color);
    box-shadow: var(--tah-button-active-box-shadow);
}

.tah-action-button.active.activeText > .tah-action-button-content:after {
    content: "*";
}

.tah-action-button.disabled {
    color: var(--tah-button-disabled-text-color);
}

.tah-action-button.disabled:hover {
    box-shadow: var(--tah-button-box-shadow);
}

.tah-action-button.shrink {
    min-width: min-content;
}

.tah-group-button > :is(.fa, .fas) {
    font-size: 8px;
    position: absolute;
    right: 0px;
    top: 2px;
    visibility: hidden;
}

.tah-group-button:hover:not(.disable-edit)
    > :is(.fa, .fas) {
    visibility: visible;
}

.tah-button-content:empty {
    display: none;
}

.tah-button-content {
    align-items: center;
    display: flex;
    gap: var(--tah-gap);
    overflow: hidden;
    padding: 0 10px;
    width: 100%;
}

.tah-button-text {
    padding: 0;
}

.tah-action-button-content {
    align-items: center;
    display: flex;
    gap: var(--tah-gap);
    overflow: hidden;
    padding: 0 10px;
    width: 100%;
}

.tah-action-button-text {
    overflow: hidden;
    padding-right: 1px;
    text-align: left;
    text-overflow: ellipsis;
    width: 100%;
}

#tah-collapse-expand:hover button > i,
#tah-buttons button:hover > i {
    color: var(--tah-text-hover-primary-color);
    text-shadow: 0 0 8px var(--color-shadow-primary);
}

#tah-edit-hud > :is(.fa, .fas) {
    font-size: var(--font-size-16);
}

#tah-groups,
.tah-tab-groups {
    display: flex;
    gap: var(--tah-gap);
    position: relative;
}

.tah-tab-groups {
    width: max-content;
}

.tah-tab-group,
.tah-group {
    display: flex;
    position: relative;
}

.tah-groups-container {
    display: none;
    position: absolute;
}

.tah-tab-group.hover > .tah-groups-container,
.tah-tab-group.hover > .tah-groups-container > .tah-groups {
    display: flex;
}

.tah-tab-group > .tah-groups-container.expand-down > .tah-groups {
    flex-direction: column;
    left: -10px;
    padding: 3px 10px 10px 10px;
    position: relative;
}

.tah-tab-group > .tah-groups-container.expand-up > .tah-groups {
    flex-direction: column;
    left: -10px;
    padding: 10px 10px 3px 10px;
    position: relative;
}

#tah-groups > .tah-tab-group > .tah-groups-container.expand-up > .tah-groups {
    flex-direction: column-reverse;
}

.tah-tab-group > .tah-groups-container.expand-down {
    top: calc(100% - 7px);
    padding-top: 10px;
}

.tah-tab-group > .tah-groups-container.expand-up {
    bottom: calc(100% + 3px + -10px);
    flex-direction: column-reverse;
    padding-bottom: 10px;
}

.tah-tab-group
    > .tah-groups-container.expand-up
    > .tah-groups
    > .tah-list-groups {
    flex-direction: column-reverse;
}

.tah-list-groups,
.tah-tab-groups > .tah-tab-group > .tah-groups > .tah-actions {
    background: var(--tah-background-color);
    border-radius: var(--tah-border-radius);
}

.tah-list-groups {
    flex-direction: column;
    display: flex;
    gap: var(--tah-gap);
}

.tah-list-groups .tah-list-groups {
    background: none;
}

.tah-list-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tah-groups {
    display: flex;
    flex-direction: column;
    gap: var(--tah-gap);
    width: max-content;
}

.tah-groups.expand-down {
    flex-direction: column;
}

#tah-groups.tah-unlocked
    .tah-group
    > .tah-groups
    > .tah-list-groups
    > .tah-group {
    padding-left: 10px;
}

.tah-group[data-show-title="false"]
    > .tah-list-group
    > .tah-groups
    > .tah-list-groups
    > .tah-group:not([data-show-title="false"]) {
    padding-left: 0px;
}

.tah-group:not([data-show-title="false"])[data-has-image="false"]
    > .tah-list-group
    > .tah-groups
    > .tah-list-groups
    > .tah-group:not([data-show-title="false"])[data-has-image="false"] {
    padding-left: 10px;
}

.tah-unlocked
    .tah-group
    > .tah-list-group
    > .tah-groups
    > .tah-list-groups
    > .tah-group {
    padding-left: 10px;
}

.tah-subtitle {
    align-items: center;
    color: var(--tah-text-primary-color);
    display: flex;
    flex-wrap: wrap;
    font-size: var(--tah-font-size-10);
    gap: var(--tah-gap);
    letter-spacing: 0.1em;
    line-height: 1;
    text-shadow: var(--tah-text-shadow);
    text-transform: uppercase;
}

.tah-subtitle:hover {
    color: var(--tah-text-hover-primary-color);
    cursor: pointer;
}

.tah-subtitle-text {
    color: var(--tah-text-primary-color);
}

.tah-group[data-show-title="false"] > div > .tah-subtitle > .tah-subtitle-text {
    color: var(--tah-text-disabled-color);
}

.tah-subtitle > :is(.tah-edit-icon, .tah-collapse-icon, .tah-expand-icon) {
    bottom: 1px;
    font-size: 8px;
    pointer-events: none;
    position: relative;
    visibility: hidden;
}

.tah-subtitle:hover
    > :is(
        .tah-collapse-icon:not(.tah-hidden),
        .tah-expand-icon:not(.tah-hidden)
    ),
.tah-subtitle:hover:not(.disable-edit) > .tah-edit-icon {
    visibility: visible;
}

.tah-tab-group > .tah-actions {
    margin-top: 5px;
}

.tah-actions {
    align-items: center;
    display: flex;
    flex-flow: row wrap;
    gap: var(--tah-gap);
    width: 100%;
}

.tah-info1,
.tah-info2,
.tah-info3 {
    color: var(--tah-text-secondary-color);
    font-size: xx-small;
}

.tah-info1.tah-spotlight,
.tah-info2.tah-spotlight,
.tah-info3.tah-spotlight {
    color: var(--tah-text-tertiary-color);
}

.tah-subtitle > :is(.tah-info1, .tah-info2, .tah-info3) {
    background: var(--tah-button-background-color);
    border-radius: 5px;
    margin: 1px;
    padding: 1px 3px;
}

.tah-button-image {
    border-radius: var(--tah-border-radius);
    height: var(--tah-button-height);
    min-width: var(--tah-button-min-width);
    width: var(--tah-button-min-width);
}

.tah-list-image {
    border: none;
    border-radius: var(--tah-border-radius);
    box-shadow: var(--tah-button-box-shadow);
    height: var(--tah-button-height);
    margin-right: 5px;
    min-width: var(--tah-button-min-width);
    width: var(--tah-button-min-width);
}

.tah-icon > :is(.fa, .fas) {
    font-size: x-small;
    margin: 0px 2px 0px 0px;
}

.tah-icon-disabled {
    color: var(--tah-text-disabled-color);
}

.tah-subtitle > .tah-icon > :is(.fa, .fas) {
    text-shadow: var(--tah-text-shadow);
}
