:root {
}

* {
    box-sizing: border-box;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: none;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: "Arial","Microsoft YaHei",sans-serif;
    position: relative;
    min-width: 320px;
}

body {
    --ns-rgba-50: rgba(0,0,0,0.5);
    --ns-rgba-30: rgba(0,0,0,0.3);
    --ns-rgba-20: rgba(0,0,0,0.2);
    --ns-rgba-10: rgba(0,0,0,0.1);
    --ns-rgba-5: rgba(0,0,0,0.05);
    --ns-file-row1: #B3E5FC;
    --ns-file-row2: #98DBF9;
    --ns-file-row3: #81D4FA;
}

[data-bs-theme="dark"] body {
    --ns-rgba-50: rgba(255,255,255,0.48);
    --ns-rgba-30: rgba(255,255,255,0.32);
    --ns-rgba-20: rgba(255,255,255,0.24);
    --ns-rgba-10: rgba(255,255,255,0.12);
    --ns-rgba-5:  rgba(255,255,255,0.08);
    --ns-file-row1: #0b5ed7;
    --ns-file-row2: #0a58ca;
    --ns-file-row3: #0d6efd;
}

.mono {
    font-family: ui-monospace,"Cascadia Mono","Segoe UI Mono","Liberation Mono",Menlo,Monaco,Consolas,"Arial","Microsoft YaHei",monospace;
}

.arial {
    font-family: "Arial","Microsoft YaHei",sans-serif;
}

.tag-edit-button {
    color: #233;
    text-decoration:none;
    cursor: pointer;
    padding: 0.5em;
    border-radius: 50%;
    height: 2em;
    width: 2em;
    min-width: 2em;
    text-align: center;
    display: inline-flex;
    text-decoration: none !important;
    position:relative;
    align-items:center;
    transition: background 0.1s ease-in;
}

.tag-edit-button:not(.selected):hover { background: var(--ns-rgba-10); }
.tag-edit-button:not(.selected):active { background: var(--ns-rgba-20); }

.context-menu {
    position: absolute;
    z-index: 2000;
    padding: 8px 0;
    border-radius: 6px;
    box-shadow: 0 0 10px 2px var(--ns-rgba-20);
    background: rgb(var(--bs-body-bg-rgb));
    max-width: 95%;
}

[data-bs-theme="dark"] .file-bar {
    border-top: solid 1px var(--ns-rgba-10);
}

[data-bs-theme="dark"] .context-menu {
    box-shadow: none;
    border: solid 1px var(--ns-rgba-20);
}

.context-menu .item {
    padding: 5px 0;
    cursor: default;
    user-select: none;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.context-menu .item .checked {
    display: inline-block;
    width: 2rem;
    text-align: center;
    flex-shrink: 0;
}

.context-menu .item .text {
    display: inline-block;
    white-space: nowrap;
    margin-right: 0.5rem;
    flex-grow: 1;
}

.context-menu .item .sc {
    display: inline-block;
    white-space: nowrap;
    margin-right: 1.5rem;
    font-size: 90%;
    color: var(--bs-secondary-color);
}

.context-menu .item .tag-edit-button {
    margin-right: 0.25rem;
    height: calc(1rem + 4px);
    border-radius: calc(0.5rem + 2px);
    font-size: 1rem;
}

.context-menu .item .tag-edit-button:last-child {
    margin-right: 1rem;
}

.context-menu .sep {
    border: solid 1px var(--ns-rgba-10);
    border-width: 1px 0 0 0;
    height: 1px;
    margin: 4px 0;
}

.context-menu .item:hover {
    background: var(--ns-rgba-5);
}

.abbr {
    flex: 0 1 auto;
    text-overflow: ellipsis;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.dropdown-item { padding: 0.5em var(--bs-dropdown-item-padding-x) !important;} 

.noscrollbar {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.noscrollbar::-webkit-scrollbar {
    display: none;
}

.msg-pill {
    transition: background 0.5s;
}

.msg-loading-border {
    position:relative;
    color: transparent !important;
}

.msg-loading-border::before {
    position: absolute;
    display: block;
    content: ' ';
    background:
        radial-gradient(circle 2px at 30% 50%, var(--ns-rgba-50) 100%, transparent 101%) no-repeat,
        radial-gradient(circle 2px at 50% 50%, var(--ns-rgba-50) 100%, transparent 101%) no-repeat,
        radial-gradient(circle 2px at 70% 50%, var(--ns-rgba-50) 100%, transparent 101%) no-repeat;
    background-size: 100% 100%;
    width: 100%; height: 100%; left: 0; top: 0;
    animation: msg-loading 1s linear infinite;
}

@keyframes msg-loading {
    0% {
        background:
        radial-gradient(circle 2px at 30% 40%, var(--ns-rgba-50) 100%, transparent 101%) no-repeat,
        radial-gradient(circle 2px at 50% 50%, var(--ns-rgba-50) 100%, transparent 101%) no-repeat,
        radial-gradient(circle 2px at 70% 50%, var(--ns-rgba-50) 100%, transparent 101%) no-repeat;
    }
    33% {
        background:
        radial-gradient(circle 2px at 30% 50%, var(--ns-rgba-50) 100%, transparent 101%) no-repeat,
        radial-gradient(circle 2px at 50% 40%, var(--ns-rgba-50) 100%, transparent 101%) no-repeat,
        radial-gradient(circle 2px at 70% 50%, var(--ns-rgba-50) 100%, transparent 101%) no-repeat;
    }
    66% {
        background:
        radial-gradient(circle 2px at 30% 50%, var(--ns-rgba-50) 100%, transparent 101%) no-repeat,
        radial-gradient(circle 2px at 50% 50%, var(--ns-rgba-50) 100%, transparent 101%) no-repeat,
        radial-gradient(circle 2px at 70% 40%, var(--ns-rgba-50) 100%, transparent 101%) no-repeat;
    }
}

.toast-container .btn-close {
    --bs-btn-close-filter: none;
}

hr {
    margin: 1rem 0 !important;
}
