body {
    font-family: "GG Sans", sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;

    background-color: #25242b;
    color: #fff;

    --toolbar-height: 42px;
}

input,
button {
    font-size: 1em;
    font-family: inherit;
    border: none;
    border-radius: 0.5em;
    padding: 0.5em 1em;
    background-color: #ffffff10;
    color: #fff;
    outline: none;
}

input::placeholder {
    color: #ffffff80;
}

select {
    font-size: auto;
    font-family: inherit;
    border: none;
    border-radius: 0.5em;
    padding: 0.25rem 0.5rem;
    font-weight: bold;
    background-color: #ffffff10;
    color: #fff;
    outline: none;
}

button:hover,
select:hover {
    background-color: #ffffff20;
}

label {
    user-select: none;
    -webkit-user-select: none
}

hr {
    border: none;
    height: 2px;
    width: 100%;
    background-color: #ffffff10;
}

.toolbar {
    height: var(--toolbar-height);
    background-color: #ffffff10;
    display: flex;
    align-items: center;
    gap: 0em;
    /* padding: 10px 1em; */
    flex-shrink: 0;
    box-sizing: border-box;
}

.toolbar-inner {
    display: flex;
    align-items: center;
    gap: 0em;
    padding: 10px 1em;
    flex-shrink: 0;
    box-sizing: border-box;
}

.toolbar-title {
    font-weight: bold;
    margin-right: 1em;
    user-select: none;
    -webkit-user-select: none
}

.toolbar-dropdown {
    font-weight: bold;
    user-select: none;
    -webkit-user-select: none
}

.toolbar-dropdown {
    font-size: 0.813rem;
    font-family: inherit;
    border: none;
    border-radius: 0.5em;
    padding: 0.25rem 0.5rem;
    font-weight: bold;
    color: #fff;
    outline: none;
}

.toolbar-dropdown:hover {
    background-color: #ffffff20;
}

.toolbar-dropdown.selected {
    background-color: #ffffff20;
}

.main {
    display: flex;
    flex-grow: 1;
    height: calc(100vh - var(--toolbar-height));
}

.doc {
    flex-grow: 1;
    padding: 1em;
    overflow-y: auto;
    position: relative;
}

.deck {
    width: 240px;
    padding: 1em;
    padding-bottom: 3rem;
    box-sizing: border-box;
    overflow: hidden;
    height: 100%;
    flex-shrink: 0;
}

.deck>input {
    width: 100%;
    box-sizing: border-box;
}

.cards {
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    padding-top: 0;
    margin-top: 0.5rem;
    gap: 0.5rem;
    overflow: scroll;
    height: 100%;
}

.card {
    position: relative;
}

.card img {
    display: block;
    width: 100%;
    border-radius: 6px;
    user-select: none;
    -webkit-user-select: none
}

button {
    font-size: 0.813rem;
    font-family: inherit;
    border: none;
    border-radius: 0.5em;
    padding: 0.25rem 0.5rem;
    font-weight: bold;
    background-color: #ffffff10;
    color: #fff;
    outline: none;
}

.button {
    padding: 0.5rem;
    color: #18193a;
    cursor: pointer;
    transition: all 0.2s ease-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

.button:active {
    transform: scale(0.95);
    opacity: 0.5;
}

.card-options,
.card-number {
    opacity: 0;
}

.card:hover .card-options,
.card:hover .card-number {
    opacity: 1;
}

.card-options {
    transition: opacity 0.2s ease-out;
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    display: flex;
    width: auto;
    background: #ecf0f7cc;
    backdrop-filter: blur(8px) saturate(1.2);
    padding: 0 0.25rem;
    border-radius: 100px;
    box-sizing: border-box;
    gap: 0.25rem;
    z-index: 0;
    box-shadow: 0 0 5px #00000050;
}

.card-options.red {
    background: #f01729cc;
}

.card-options.red>.button {
    color: #fff;
}

.card-number {
    transition: opacity 0.2s ease-out;
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    width: 1rem;
    background: #ecf0f7cc;
    backdrop-filter: blur(8px) saturate(1.2);
    color: #14121b;
    height: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.25rem;
    border-radius: 100px;
    box-shadow: 0 2px 5px #00000050;
    font-weight: 600;
    z-index: 99;

    user-select: none;
    -webkit-user-select: none;
}

.doc-page.hidden {
    display: none !important;
}

.doc-page {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 1em;
    box-sizing: border-box;
    overflow: hidden;
}

.deck-view {
    display: flex;
    flex-wrap: wrap;
    justify-content: start;
    align-items: start;
    padding-bottom: 310px;
}

.deck-view .card {
    width: 240px;
    margin-bottom: -75%;
}

.deck-view .card:hover {
    z-index: 100;
    transform: translateY(-5px);
}

.deck-view .card img {
    pointer-events: none;
}

.deck.wide {
    width: 500px;
}

.deck.wide>.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    gap: 0.25rem;
}

.deck.wide .card {
    height: fit-content;
}

.deck-view.scroll .card {
    margin-bottom: 0;
}

.deck-view.scroll {
    display: flex;
    overflow-x: scroll;
    flex-direction: column;
    gap: 0.25rem;
    padding-bottom: 0;
}

.deck-size {
    position: absolute;
    bottom: 5px;
    left: 25px;
    color: #ffffff;
    text-shadow: 0 0 5px #00000050;
    font-size: 1.5em;
    font-weight: bold;
    user-select: none;
    -webkit-user-select: none;
    z-index: 101;
    pointer-events: none;
}

.search-outer {
    position: relative;
}

.search {
    width: 100%;
    box-sizing: border-box;
}

.clear-search {
    position: absolute;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    right: 0;
    top: 0;
    color: #ffffff80;
    padding: 0 0.5rem;
    cursor: pointer;
}

.clear-search.hide {
    display: none;
}

.print-view {
    display: flex;
    flex-direction: column;
    gap: 5px;
    /* justify-content: center;
    align-items: center; */
    overflow: scroll;
    height: 100%;
}

.page {
    height: 100%;
    /* aspect-ratio: 8.5/11; */
    background-color: #000;
    box-shadow: 0 0 5px #00000050;
    padding: 0.5rem;
    box-sizing: border-box;
    flex-shrink: 0;
}

.toolbar-separator {
    width: 1px;
    margin: 0 1rem;
    height: 20px;
    background-color: #ffffff2e;
}

.card-hover,
.settings-outer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    visibility: hidden;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 9999;
    /* backdrop-filter: blur(2px) saturate(1.2); */
    /* background-color: #00000015; */
    z-index: 9999;
}

.settings-outer {
    background-color: #000000cf;
    backdrop-filter: blur(2px) saturate(1.2);
}

.card-hover.visible,
.settings-outer.visible {
    visibility: visible;
}

.settings-outer.visible {
    pointer-events: all;
}

.card-hover>img {
    height: 100%;
    max-width: 600px;
    max-height: 600px;
    object-fit: contain;
    border-radius: 10px;
    overflow: hidden;
}

.rightmost {
    height: var(--toolbar-height);
    display: flex;
    align-items: center;
    gap: 0em;
    padding: 10px 1em;
    flex-shrink: 0;
    box-sizing: border-box;
    margin-left: auto;
}

.settings-button {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.settings {
    width: 500px;
    height: 500px;
    background-color: #25242B;
    box-shadow: 0 0 5px #00000050;
    border: 1px solid #ffffff2e;
    padding: 1rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;

    border-radius: 12px;
}

.settings>h1,
.settings span {
    margin: 0;
    user-select: none;
    -webkit-user-select: none;
}

.settings>button {
    width: fit-content;
}

.modal-bottom {
    margin-top: auto;
}

.checkbox-outer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.checkbox-outer label {
    width: 100%;
}

.context-outer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 0px);
    z-index: 99;
    visibility: hidden;
}

.context-outer.visible {
    visibility: visible;
}

.context {
    position: fixed;
    background: #000000b1;
    backdrop-filter: blur(4px) saturate(1.2);
    z-index: 100;
    border: 1px solid #ffffff1e;
    box-shadow: 0 0 5px #00000050;
    padding: 0.5rem;
    min-width: 150px;
    border-radius: 15px;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.context-item {
    /* cursor: pointer; */
    font-size: 0.85rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    user-select: none;
    -webkit-user-select: none;
}

.context-item:hover {
    background-color: #0C8CE9;
    color: #fff;
}

.context-separator {
    /*! width: 100%; */
    height: 1px;
    background-color: #ffffff2e;
    margin: 0.25rem 2px;
    box-sizing: border-box;
}

.context-item>span {
    margin-left: 20px;
}

.context-item>svg {
    position: absolute;
    left: 14px;
}

.toolbar-dropdown {
    z-index: 999;
}

.menu-doc-name {
    background: #0000002a;
    color: #fff;
    border: 0;
    border-radius: 5px;
    margin: 0 5px;
    margin-right: 8px;
    padding: 2px 10px;
    font-size: 16px;
    font-family: 'GG Sans', sans-serif;
    font-weight: 500;
    outline: none;
    width: 100px;
    min-width: 120px;
    box-sizing: border-box;
}

.menu-doc-name:focus {
    outline: 3px solid #ffffff18;
}

.tabs {
    display: flex;
    height: 100%;
    padding-top: 0.25rem;
    box-sizing: border-box;
}

.tab {
    background-color: transparent;
    color: #fff;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    min-width: 60px;
    padding: 0.25rem 1rem;

    font-weight: 500;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
}

.tab.active {
    font-weight: 600;
    background-color: #25242B;
}

.tab.active > span::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -18px;
    width: 18px;
    height: 30px;
    background-color: #333239;
    border-radius: 10px;
    pointer-events: none;
    
    z-index: 2;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -10px;
    width: 10px;
    height: 10px;
    background-color: #25242B;
    pointer-events: none;
    
    z-index: 1;
}

.tab.active > span::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: -18px;
    width: 18px;
    height: 30px;
    background-color: #333239;
    border-radius: 10px;
    pointer-events: none;

    z-index: 2;
}

.tab.active::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: -10px;
    width: 10px;
    height: 10px;
    background-color: #25242B;
    pointer-events: none;

    z-index: 1;
}

.toolbar-dropdown.select {
    display: flex;
    align-items: center;
    min-width: 140px;
}

.toolbar-dropdown.select svg {
    margin-left: auto;
}

.display-name {
    font-size: 0.85rem;
    font-weight: 500;
    margin-right: 1rem;
    user-select: none;
    -webkit-user-select: none;
}