[hidden] { display:none; }

html {
    --main-bg-color: #101010;
    --main-color: #cad2da;
    --drag-color: #423946;
    --header-color: #050506;
    --main-gradient: radial-gradient(rgb(35, 35, 45), rgb(20, 20, 25));
    --bank-bg: #202020;
    --account-bg: #303030;
    --tran-file-bg: #404040;
    --incomplete-color: orange;
    --complete-color: #00F300;
    --arrow-left-svg: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="210 230 500 560"><path d="M577.706667 768a87.893333 87.893333 0 0 1-55.466667-19.626667l-217.6-179.626666a72.533333 72.533333 0 0 1 0-113.493334l217.6-179.626666a89.6 89.6 0 0 1 94.293333-11.093334 75.093333 75.093333 0 0 1 44.8 67.84v359.253334a75.093333 75.093333 0 0 1-44.8 67.84 95.146667 95.146667 0 0 1-38.826666 8.533333z"/></svg>');

    scrollbar-color: var(--drag-color) var(--main-bg-color);
    scrollbar-width: thin;
    color-scheme: dark;
}
html, body {
    width: 100%;
    height:100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}
body {
    background-color: var(--main-bg-color);
    color: var(--main-color);
    font: 18px "Ubuntu Sans Mono", sans-serif;
    position: relative;
    display: flex;
    flex-direction: column;
}
header {
    font-size: calc(0.5em + 0.5vw);
    background-color: var(--header-color);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}
.page-title {
    padding: 0.2em;
    margin: 0;
    margin-left: 30vw;
}
.dragging {
    background: var(--drag-color) !important;
}
.center-content {
    display: flex;
    justify-content: center; /* Main Axis */
    align-items: center; /* Cross Axis */
}
.center-content-x {
    display: flex;
    justify-content: center; /* Main Axis */
}
.center-content-y {
    display: flex;
    align-items: center; /* Cross Axis */
}
.emoji {
    font-family: "Noto Emoji", "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji","Android Emoji","EmojiSymbols","EmojiOne Mozilla","Twemoji Mozilla","Segoe UI Symbol","Noto Color Emoji Compat",emoji;
    font-weight: normal;
    user-select: none;
    margin-right: 10px;
}
.github-link {
    justify-self: end;
    background: #010409;
    width: calc(2em + 1vw);
    height: calc(2em + 1vw);
    border-radius: 50%;
    margin-right: .5em;
}
.github-link>svg {
    font-size: 0.8em;
    fill: rgb(240, 246, 252);
    width: 85%;
    height: 85%;
}
canvas {
    margin-top: 0.7vh;
    margin-left: 0.5vw;
    max-width: 96%;
}
#transactions {
    display: flex;
    flex-direction: column;
    justify-content: end;
    flex-grow: 1;
}
.transactions {
    display: none;
    border: 2px solid rgb(49, 49, 53);
    width: fit-content;
    max-height: 80%;
    overflow-y: scroll;
}
#transactions[hidden] { display:none; }
table {
    border-collapse: separate;
    border-spacing: 0;
    font-family: "Ubuntu Sans Mono", system-ui;
}
table th {
    border-top: 1px solid var(--main-color);
    border-right: 1px solid var(--main-color);
    border-bottom: 1px solid var(--main-color);
}
table td {
    border-right: 1px solid var(--main-color);
    border-bottom: 1px solid var(--main-color);
}
table th:first-child, table td:first-child {
    border-left: 1px solid var(--main-color);
}
td, th {
    padding-left: 3px;
    padding-right: 3px;
    white-space: nowrap;
}
.table-content-wrapper {
    overflow-y: auto;
    max-height: 75vh;
}
.col-type {
    color: #999;
    font-size: 0.8em;
    display: block;
}
.sparse-descriptor {
    color: #999;
    font-size: 0.6em;
    display: block;
}
/* .sort-wrapper {} */
.transaction-viewer div:has(>.sort-arrow) {
    justify-content: center;
    margin-left: 3px;
}
.transaction-viewer div:has(>.arrow-up:focus-visible) {
    border-top: 2px solid white;
}
.transaction-viewer div:has(>.arrow-down:focus-visible) {
    border-bottom: 2px solid white;
}
.heading-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: center;
}
.sort-arrow {
    width: 15px;
    height: 15px;
    border: 0;
    background: #474747;
    mask: var(--arrow-left-svg);
    cursor: pointer;
}
.sort-arrow.active {
    background: var(--main-color);
}
.sort-arrow:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}
.arrow-up {
    transform: rotate(90deg);
}
.arrow-down {
    transform: rotate(-90deg);
}
.flex-row {
    display: flex;
    flex-direction: row;
}
.flex-col {
    display: flex;
    flex-direction: column;
}
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: rgb(14, 14, 16);
}
#transaction-input, #period {
    margin-top: 8px;
}
.named {
    box-shadow: 0 0 5px black;
    margin-top: 5px;
    background: var(--main-gradient);
    border-radius: 10px;
}
.bank-list, .content {
    display: flex;
    flex-direction: column;
}
.content[hidden] {
    display: none !important;
}
.header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 8px 4px 4px 4px;
    user-select: none;
    -webkit-user-select: none;
}
.emoji {
    color: var(--incomplete-color);
}
.header.fully-filled .emoji {
    color: var(--complete-color);
}
.btn-wrapper {
    display: flex;
}
.headersList {
    white-space: nowrap;
    overflow-x: auto;
}
.headersList > h4 {
    margin: 8px;
}
.headersList > span {
    display: block;
}
.page-bar {
    justify-content: left;
    padding-top: 0.3vh;
    flex-wrap: wrap;
}
.ellipsis {
    user-select: none;
}
.icon {
    appearance: none;
    width: 1.4em;
    height: 1.4em;
    font-size: inherit;
    margin-left: 25px;
    fill: rgb(240, 246, 252);
    background-color: rgb(14, 14, 15);
    border-radius: 0.3em;
    box-shadow: 0 0 4px black;
    user-select: none;
    cursor: pointer;
    background-size: 100%;
    background-repeat: no-repeat;
    background-origin: border-box;
    border: 1px solid transparent;
    padding: 1px;
    outline-offset: 5px;
}
.icon:hover {
    box-shadow: 0 0 2px black;
    background-origin: padding-box;
}
.icon:active {
    box-shadow: 0 0 2px black inset;
    background-origin: content-box;
}
.icon-expand {
    background-image: url("../../assets/arrows-expand.svg");
}
.icon-collapse {
    background-image: url("../../assets/arrows-collapse.svg");
}
.icon-edit {
    background-image: url("../../assets/pencil.svg");
    background-size: 90% 90%;
    background-position: center;
}
.icon-done {
    background-image: url("../../assets/check-mark.svg");
}
.icon-delete  {
    background-image: url("../../assets/trash-bin.svg");
}
.icon-delete:hover {
    background-color: darkred;
}
.icon-add {
    background-image: url("../../assets/plus.svg");
    background-size: 70% 70%;
    background-position: center;
}
.icon-left {
    background-image: url("../../assets/arrow-left.svg");
}
.icon-right {
    background-image: url("../../assets/arrow-left.svg");
    transform: rotate(180deg);
}
.page-btn {
    min-width: 1.4em;
    width: fit-content;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.1em;
    font-weight: bolder;
}
.page-btn, .icon-left, .icon-right {
    margin: 0 0.25em;
}
.page-selected {
    border: 1px solid var(--main-color);
    cursor: default;
}
.content {
    padding-left: 1%;
    padding-right: 1%;
    padding-bottom: 0.8%;
}
.bank-title, .acc-title, .file-title {
    margin: 0;
    max-width: 80%;
}
span[contenteditable="plaintext-only"] {
    cursor: text;
    padding: 0 8px;
    outline: 1px solid gray;
    border-radius: 5px;
    background: #3b3b3b;
}
span[contenteditable="plaintext-only"]:focus {
    outline: 2px solid white;
}
.setting {
    margin: 2px 6px 8px 0px;
}
.setting[type=checkbox] {
    width: 1em;
    height: 1em;
}
.balance-point-list {
    display: flex;
    flex-direction: column;
}
.balance-point-container, .btn-new-balance {
    margin-bottom: 8px;
}
.balance-point-row {
    display: inline;
}
.balance-point-row > input {
    display: inline;
}
.balance-point-row > .icon-delete {
    margin-left: 5px;
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    transform: translateY(20%);
}
.btn-new-balance {
    display: block;
    width: fit-content;
}
.hiddenAnimated {
    height: 0px;
}
#upload, #export-btn {
    margin: 8px;
}
#bank-list-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
}
#add-bank-btn {
    width: 50%;
    min-width: fit-content;
}
#bank-list {
    margin-left: 8px;
    max-width: 800px;
    width: stretch;
    display: flex;
    flex-direction: column;
}
.bank-container {
    background: var(--bank-bg);
    margin-top: 10px;
}
.account-container {
    background: var(--account-bg);
}
.transaction-file-container {
    background: var(--tran-file-bg);
}
.transaction-file-container > .header:not(.fully-filled) .icon-edit,
:not(.transaction-file-container) > .header:not(.fully-filled) .icon-expand {
    border: 1px solid var(--incomplete-color);
}
.no-select {
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10+ and Edge */
    user-select: none; /* Standard syntax */
    -webkit-touch-callout: none; /* Disable callout menu on iOS */
}
*[draggable] {
    cursor: grab;
    touch-action: pan-y;
}
.drag-over {
    outline: calc(1px + 0.2vw) solid var(--drag-color);
    background: radial-gradient(var(--drag-color), var(--main-bg-color));
}
@keyframes flash {
  0% {
    background-color: transparent;
  }
  50% {
    background-color: #f8b332;
  }
  100% {
    background-color: transparent;
  }
}
.flash-highlight {
  animation: flash 1s linear forwards;
}
.tab-bar {
    justify-content: left;
    padding: 0;
    margin: 0;
    border: 0;
    background-color: var(--header-color);
    position: sticky;
    top: 0;
    z-index: 1;
    overflow-y: clip;
    padding-top: 1px;
}
.tab-bar > div {
    flex-grow: 1;
    display: flex;
    flex-direction: row;
    justify-content: center;
    background-color: var(--main-bg-color);
    margin: 0;
    padding: 0;
    border: 0;
    max-width: 200px;
}
.tab-bar > div:has(input:checked) {
    background-color: var(--header-color);
}
.tab-bar label {
    width: 100%;
    height: 100%;
    text-align: center;
    padding: 0.2778em;
    margin: 0;
    border: 0;
    
    cursor: pointer;
    background-color: var(--header-color);
    /* 
    border-bottom-right-radius: 0.8em; */
}
.tab-bar > div:has(input:checked) + div:has(input:not(:checked)) {
    border-bottom-left-radius: 0.8em;
}
.tab-bar > div:has(input:not(:checked)) + div:has(input:not(:checked)) {
    border-left: 1px solid var(--main-bg-color);
}
.tab-bar > div {
    background-color: var(--header-color);
}
.tab-bar > div:has(input:not(:checked)) > label:hover {
    border-radius: 10px;
    box-shadow: inset 0px 0px 0px 5px var(--header-color);
    background-color: #2f3233;
}
/* .tab-bar > div:has(input:not(:checked)):hover > label {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none" fill="none"><rect width="80" height="80" x="10" y="10" rx="20" ry="20" vector-effect="non-scaling-stroke" fill="%234c5053"/></svg>');
    background-size: 100% 100%;
} */
.tab-bar > div:has(input:focus-visible) > label {
    box-shadow: inset 0px 0px 0px 2px white;
}
.tab-bar > div:has(input:checked) > label {
    background-color: var(--main-bg-color);
    border-top-left-radius: 0.8em;
    border-top-right-radius: 0.8em;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    color: white;
    cursor: default;
    outline: 1px solid #777;
    clip-path: inset(-15px -15px 0px -15px);
    z-index: 2;
}
/* .tab-content { } */
.tab-bar input[type="radio"] {
    appearance: none;
    clip: rect(0 0 0 0); 
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap; 
    width: 1px;
    margin: 0;
}
#bank-tab {
    overflow-y: auto;
}
.csv-viewer tbody {
    background: var(--bank-bg);
}
label[for="transaction-input"] {
    display: block;
    padding-top: 1vh;
    padding-bottom: 1vw;
}
.context-menu {
    position: fixed;
    background-color: var(--main-bg-color);
    box-shadow: 0px 0px 5px 5px #00000033;
    padding: 15px 0px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
}
.context-menu-item {
    padding: 10px 15px;
    background: transparent;
    border: 0;
    font-size: 14px;
}
.context-menu-item:hover {
    background-color: #3e4046;
}
.graph-container {
    position: relative;
}
.graph-container:has(>.activity-graph) {
    padding-bottom: 13px;
}
.activity-graph {
    position: absolute;
    top: 0;
    width: 95%;
    margin-top: 0;
    height: 7px;
    margin-left: 2.5%;
}
.classifier-list {
    display: flex;
    flex-direction: column;
}
.classifier {
    background: var(--bank-bg);
    width: fit-content;
    margin: 8px 8px;
    padding: 8px;
    border-radius: 10px;
    max-width: 97%;
}
.classifier-header {
    display: flex;
    flex-direction: row;
    align-items: center;
}
.classifier-header:has(.classifier-dropdown:focus-visible) {
    border-left: 2px solid white;
}
.classifier-dropdown {
    mask: var(--arrow-left-svg);
    background: var(--main-color);
    border: 0;
    width: 1.5em;
    height: 1.5em;
    transform: rotate(180deg);
    cursor: pointer;
    padding: 0;
    margin-right: 5px;
    transition: transform 0.3s ease-in-out; 
}
.classifier-dropdown.expanded {
    transform: rotate(-90deg);
}
.classifier-content {
    margin-top: 5px;
    interpolate-size: allow-keywords;
    transition: all 0.3s ease-in-out;
    overflow: clip;
}
.classifier-content > *:not(.csv-viewer) {
    margin-bottom: 5px;
    display: flex;
    flex-direction: row;
    align-items: center;
}
.classifier input, .classifier select,
.classifer *[content-editable="plaintext-only"], .classifier-delete {
    box-sizing: content-box;
    font-size: 0.9em;
    height: 1.2em;
    padding: 2px;
    border: 1px solid #ddd;
    border-radius: 5px;
}
/* .classifier icon-edit {
    transform: translate(0, 10%);
} */
.classifier input:disabled, .classifier select:disabled {
    color: var(--main-color);
    background: var(--bank-bg);
}
.classifier *[content-editable="plaintext-only"] {
    color: white;
}
.classifier-amount {
    width: 123px;
    text-align: center;
}
.classifier-amount:invalid {
    background: darkred;
}
.classifier-delete:hover {
    background: darkred;
    cursor: pointer;
}
.hidden {
    height: 0;
    width: 1px;
    overflow: hidden;
    margin: 0;
    padding: 0;
    outline: 0;
    border: 0;
}

@media only screen and (max-width: 600px) {
    header {
        font-size: 3vw;
    }
    .page-title {
        margin-left: 4vw;
    }
    .content {
        padding-bottom: 0.5%;
    }
    .header .icon {
        margin-left: 8px;
    }
    .table-content-wrapper {
        max-height: 50vh;
    }
    canvas, #bank-list {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
    }
    input[type="text"], select {
        display: block;
        padding: 5px;
        font-size: medium;
    }
    input[type=checkbox] {
        width: 1.5em;
        height: 1.5em;
    }
    .balance-point-row > input {
        display: inline;
    }
    .balance-point-row {
        display: block;
    }
}