* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    min-width: 0;
}

/* -------------------- */

@font-face {
    font-family: Oxygen;
    src: url("assets/oxygen.regular.ttf");
}

@font-face {
    font-family: Cousine;
    src: url("assets/Cousine-Regular.ttf");
}

:root {
    font-size: 16px;
    font-family: Oxygen;
    color: #232323;
}

body {
    padding: 20px;
    background-color: #161416;
}

.header {
    text-align: center;
    font-size: 1.7rem;
    color: #c3c3c3;
    margin: 2rem 0 2.5rem 0;
}

.widget-feed {
    margin: 0 2rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background-color: #3b3b3b;
    border-radius: 0.4rem;
}

/* -------------------- */

.widget-container {
    border-left: none;
    border-right: none;
    box-shadow: 0 0 0.7rem #0000006c;
    background-color: #858585;
    border-radius: 0.4rem;
}

.widget-header {
    position: relative;
    background-color: #686868;
    display: flex;
    height: 2.65rem;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.5rem 0.5rem 0.5rem;
    align-self: auto;
    border-radius: 0.4rem 0.4rem 0 0;
}

.widget-header:hover {
    background-color: #575757;
    cursor: pointer;
}

.widget-title {
    position: absolute;
    width: 30%;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    font-size: 1.3rem;
    line-height: 2.5rem;
    text-align: center;
    color: #ededed;
    user-select: none;
}

.widget-id {
    color: #8f8f8f;
    font-weight: bold;
    margin-right: 0.25rem;
}

.widget-button-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget-content {
    display: block;
    background-color: #e2e2e2;
    padding: 0.01px;
    min-height: 1rem;
    border-radius: 0 0 0.4rem 0.4rem;
}

.widget-footer {
    background-color: #858585;
    height: 2.5rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 0 0 0.4rem 0.4rem;
}

.widget-footer-dropdown {
    margin-right: 0.4rem;
}

.widget-footer-input-type,
.widget-footer-output-type {
    background-color: #b9b9b9;
    border-radius: 0.4rem;
    padding: 0.15rem 0.4rem;
    font-weight: bold;
    color: #3b3b3b;
    user-select: none;
}

.widget-footer > img {
    height: 1.2rem;
    filter: brightness(0.7);
}

.widget-container.footer-closed .widget-footer {
    display: none;
}

.widget-container.closed .widget-content {
    display: none;
}

/* -------------------- */

.dropdown {
    position: relative;
    width: fit-content;
    overflow: visible;
    user-select: none;
}

.dropdown-main {
    width: fit-content;
    border-radius: 0.4rem;
    background-color: #cbcbcb;
    display: flex;
    flex-direction: row;
    gap: 0.2rem;
    padding: 0.3rem;
    cursor: pointer;
    align-items: center;
}

.dropdown-main:hover {
    background-color: #cecece;
    cursor: pointer;
}

.dropdown.no-options .dropdown-main {
    cursor: not-allowed;
    background-color: #b0b0b0;
}

.dropdown.no-options .dropdown-main:hover {
    background-color: #b0b0b0;
}

.dropdown-main .dropdown-current {
    width: fit-content;
    height: 1rem;
    line-height: 0.9rem;
    flex-shrink: 0;
}

.dropdown-main .dropdown-current img {
    height: 1rem;
}

.dropdown.no-options .dropdown-icon-select {
    height: 0.6rem;
}

.dropdown-main .dropdown-icon-select {
    height: 1rem;
    flex-shrink: 0;
}

.dropdown-options {
    position: absolute;
    min-width: 100%;
    width: fit-content;
    top: 100%;
    background-color: #bbbbbb;
    flex-direction: column;
    border-radius: 0.4rem;
    z-index: 20;
}

.dropdown-options div {
    min-width: fit-content;
    border-radius: 0.4rem;
    text-align: center;
    padding: 0.2rem;
    z-index: 20;
    white-space: nowrap;
}

.dropdown-options div:hover {
    background-color: #cccccc;
    cursor: pointer;
}

.dropdown-options img {
    height: 1.2rem;
    margin: auto;
}

/* ------------------- */

.toggle-button {
    background-color: #cacaca;
    height: 1.8rem;
    width: 1.8rem;
    border-radius: 0.4rem;
    box-shadow: 0 0.1rem 0.2rem #494949;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-button img {
    height: 62%;
}

.toggle-button:hover {
    background-color: #d8d8d8;
}

.toggle-button:hover img {
    height: 67%;
}

.toggle-button.glow {
    background-color: #ffffff;
    box-shadow: 0 0 0.4rem #8f8f8f;
}

.toggle-button.glow:hover {
    background-color: #fafafa;
}

/* ------------------- */

.messages {
    width: fit-content;
    min-width: 100%;
    background-color: #ffffff;
    padding: 0.6rem;
    white-space: nowrap;
    font-family: Cousine;
}

.scrollable-content:has(> .messages) {
    border-radius: 0.4rem 0.4rem 0 0;
}

.messages .message {
    width: fit-content;
    min-width: 100%;
}

.messages .indices {
    width: fit-content;
    background-color: #ffffff;
    border-bottom: 1px solid #dddddd;
    margin-bottom: 0.55rem;
}

.messages .indices span {
    background-color: #ffffff;
    color: #555555;
}

.messages span {
    display: inline-block;
    background-color: #ededed;
    padding: 0.2rem;
    width: var(--adjusted-span-width);
    height: 1.8rem;
    line-height: 2rem;
    text-align: center;
    white-space: pre;
    padding: 0.001px;
    box-sizing: border-box;
    overflow: hidden;
}

.messages .message span.hovered {
    box-shadow: 0px 0px 0px 1px black inset;
}

.messages.use-gaps {
    padding: 0.3rem;
}

.messages.use-gaps span {
    margin: 0.3rem;
    border-radius: 0.2rem;
}

/* -------------------- */

.input-field-container {
    display: flex;
    flex-direction: row;
    margin: 1.2rem;
}

.input-field-container img {
    height: 1.8rem;
    margin-top: 0.6rem;
    margin-right: 1rem;
}

.scrollable-content:has(> .input-field) {
    border-radius: 0.4rem 0.4rem 0 0;
}

.input-field {
    background-color: #ffffff;
    padding: 0.6rem;
    width: fit-content;
    min-width: 100%;
}

.input-field:focus {
    outline: none;
}

.input-options-container {
    margin: 0 1.6rem;
    display: flex;
    align-items: center;
}

.input-options-container p {
    margin-right: 1rem;
}

.input-options-delimeter,
.input-options-convert {
    margin-right: 2rem;
}

.input-parsed-container {
    padding: 0.01px;
    padding: 1.2rem;
}

.input-alphabet-container {
    display: flex;
    flex-direction: row;
    padding: 1.2rem;
}

.input-alphabet-container img {
    height: 1.8rem;
    margin-top: 0.6rem;
    margin-right: 1rem;
}

.scrollable-content:has(> .input-alphabet) {
    border-radius: 0.4rem 0.4rem 0 0;
}

.input-alphabet {
    background-color: #ffffff;
    padding: 0.6rem;
    width: fit-content;
    white-space: nowrap;
    min-width: 100%;
    font-family: Cousine;
}

.input-alphabet span {
    display: inline-block;
    padding: 0 0.4rem;
    width: var(--adjusted-span-width);
    height: 2rem;
    line-height: 2.1rem;
    margin: 0;
    text-align: center;
    white-space: pre;
    background-color: #ededed;
    overflow: hidden;
}

.input-alphabet.use-gaps {
    padding: 0.3rem;
}

.input-alphabet.use-gaps span {
    margin: 0.3rem;
    border-radius: 0.2rem;
}

/* -------------------- */

.chart-container {
    padding: 1rem;
}

.chart-container canvas {
    height: 30rem;
}

/* -------------------- */

.stats-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    margin: 1rem;
    padding: 0.6rem 1.5rem;
    background-color: #f7f7f7;
}

.stats-pair {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 1rem;
    margin-right: 5rem;
    width: 15rem;
}

.stats-label {
    font-weight: bold;
    width: 13rem;
}

/* -------------------- */

.scrollable-div {
    position: relative;
    width: 100%;
    --bar-height: 1rem;
    --bar-radius: 0.4rem;
}

.scrollable-div > .scrollable-content {
    overflow: hidden;
}

.scrollable-div > .scrollable-bar {
    position: relative;
    height: var(--bar-height);
    background-color: #cdcdcd;
    border-radius: 0 0 var(--bar-radius) var(--bar-radius);
    overflow: hidden;
}

.scrollable-div > .scrollable-bar > .scrollable-thumb {
    position: absolute;
    background-color: #787878;
    height: var(--bar-height);
    border-radius: var(--bar-radius);
    cursor: pointer;
    transition: background-color 0.1s;
}

.scrollable-div > .scrollable-bar > .scrollable-thumb:hover {
    background-color: #808080;
}

.scrollable-div > .scrollable-bar > .scrollable-thumb.active {
    background-color: #8f8f8f;
}
