/* Floating upload action, mobile only. Sits just above the bottom bar. */
.quick-upload-fab {
    display: none;
}

@media (max-width: 768px) {
    .quick-upload-fab {
        display: flex;
        position: fixed;
        z-index: 95;
        left: 14px;
        bottom: 64px;
        width: 46px;
        height: 46px;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: var(--color1, #044464);
        color: #fff;
        box-shadow: 0 6px 14px rgba(4, 68, 100, 0.22);
        cursor: pointer;
    }

    .quick-upload-fab i {
        font-size: 18px;
        line-height: 1;
    }

    .quick-upload-fab__spark {
        position: absolute;
        top: -7px;
        right: -1px;
        width: 16px;
        height: 16px;
        pointer-events: none;
    }

    .quick-upload-fab__spark::before,
    .quick-upload-fab__spark::after {
        content: "";
        position: absolute;
        background: var(--color5, #E2C064);
        border-radius: 2px;
    }

    .quick-upload-fab__spark::before {
        width: 3px;
        height: 11px;
        top: 0;
        right: 4px;
        transform: rotate(28deg);
    }

    .quick-upload-fab__spark::after {
        width: 9px;
        height: 3px;
        top: 5px;
        right: 0;
        transform: rotate(28deg);
    }

    .quick-upload-fab:active {
        transform: scale(0.96);
    }
}

.qs-backdrop {
    position: fixed;
    inset: 0;
    z-index: 130;
    background: rgba(4, 20, 32, 0.38);
}

.qs-sheet {
    position: fixed;
    z-index: 140;
    left: 10px;
    right: 10px;
    bottom: 72px;
    max-height: min(78vh, 640px);
    display: flex;
    flex-direction: column;
    padding: 8px 14px 16px;
    border-radius: 22px;
    background: #fff;
    color: var(--color1, #044464);
    box-shadow: 0 16px 40px rgba(4, 68, 100, 0.22);
    overflow: hidden;
}

.qs-sheet__handle {
    width: 42px;
    height: 4px;
    margin: 4px auto 10px;
    border-radius: 99px;
    background: rgba(4, 68, 100, 0.18);
}

.qs-sheet__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.qs-sheet__head strong {
    font-size: 15px;
    font-weight: 700;
}

.qs-hint {
    margin: 0 0 10px;
    text-align: center;
    font-size: 12px;
    color: rgba(4, 68, 100, 0.62);
}

.qs-sheet__head--plain {
    justify-content: space-between;
}

.qs-back,
.qs-close,
.qs-row__go {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(4, 68, 100, 0.06);
    color: var(--color1, #044464);
}

.qs-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.qs-field span {
    font-size: 12px;
    font-weight: 700;
    color: rgba(4, 68, 100, 0.62);
}

.qs-select {
    appearance: none;
    -webkit-appearance: none;
    display: block;
    width: 100%;
    height: 42px;
    line-height: 42px;
    padding: 0 12px 0 34px;
    border: 0;
    border-radius: 12px;
    background-color: rgba(4, 68, 100, 0.06);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23044464' stroke-width='1.6' d='M1 1.2 6 6.2 11 1.2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    color: #044464;
    -webkit-text-fill-color: #044464;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    opacity: 1;
}

.qs-select option {
    color: #044464;
    background: #fff;
}

.qs-go,
.qs-up {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    border: 0;
    border-radius: 12px;
    background: rgba(4, 68, 100, 0.06);
    color: var(--color1, #044464);
    text-align: right;
}

.qs-list {
    overflow: auto;
    max-height: 42vh;
    margin: 0 -4px 10px;
}

.qs-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
    border-radius: 12px;
    background: rgba(4, 68, 100, 0.04);
}

.qs-row.is-on {
    background: rgba(226, 192, 100, 0.35);
}

.qs-row.is-off {
    opacity: 0.55;
}

.qs-row__main {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    height: 42px;
    padding: 0 10px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: right;
}

.qs-row__main span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qs-browse {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0 0 8px;
    font-size: 12px;
}

.qs-browse button {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 0;
    border-radius: 8px;
    padding: 4px 6px;
    background: transparent;
    color: rgba(4, 68, 100, 0.7);
}

.qs-browse button.is-on {
    color: var(--color1, #044464);
    font-weight: 700;
    background: rgba(226, 192, 100, 0.28);
}

.qs-browse > i {
    font-size: 10px;
    color: rgba(4, 68, 100, 0.4);
}

.qs-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 42px;
    margin-top: 12px;
    border: 0;
    border-radius: 12px;
    background: var(--color5, #E2C064);
    color: var(--color1, #044464);
    font-weight: 700;
}

.qs-up {
    height: 38px;
    margin-bottom: 8px;
    padding: 0 10px;
}

.qs-go {
    height: 44px;
    justify-content: center;
    background: var(--color1, #044464);
    color: #fff;
    font-weight: 700;
}

.qs-go:disabled {
    opacity: 0.45;
}

.qs-empty {
    margin: 18px 0;
    text-align: center;
    font-size: 13px;
    color: rgba(4, 68, 100, 0.62);
}

body.app-dark-mode .qs-sheet,
.layout-theme.theme-dark .qs-sheet {
    background: #0d2833;
    color: #edf5f9;
}

body.app-dark-mode .qs-hint,
.layout-theme.theme-dark .qs-hint,
body.app-dark-mode .qs-field span,
.layout-theme.theme-dark .qs-field span,
body.app-dark-mode .qs-empty,
.layout-theme.theme-dark .qs-empty {
    color: rgba(237, 245, 249, 0.7);
}

body.app-dark-mode .qs-browse button,
.layout-theme.theme-dark .qs-browse button {
    color: rgba(237, 245, 249, 0.75);
}

body.app-dark-mode .qs-browse button.is-on,
.layout-theme.theme-dark .qs-browse button.is-on {
    color: #edf5f9;
    background: rgba(226, 192, 100, 0.22);
}

body.app-dark-mode .qs-select,
.layout-theme.theme-dark .qs-select {
    background-color: rgba(237, 245, 249, 0.08);
    color: #edf5f9;
    -webkit-text-fill-color: #edf5f9;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23edf5f9' stroke-width='1.6' d='M1 1.2 6 6.2 11 1.2'/%3E%3C/svg%3E");
}

body.app-dark-mode .qs-select option,
.layout-theme.theme-dark .qs-select option {
    color: #edf5f9;
    background: #0d2833;
}

body.app-dark-mode .qs-up,
body.app-dark-mode .qs-row,
body.app-dark-mode .qs-back,
body.app-dark-mode .qs-close,
.layout-theme.theme-dark .qs-up,
.layout-theme.theme-dark .qs-row,
.layout-theme.theme-dark .qs-back,
.layout-theme.theme-dark .qs-close {
    background: rgba(237, 245, 249, 0.08);
    color: #edf5f9;
}
