@import url("vars.css");
@import url("globals.css");
@import url("navbar.css");
@import url("forms.css");
@import url("table.css");
@import url("select.css");
@import url("dropdown.css");

.cancel-link {
    height: 2.3rem !important;
}

/* main content body */
#content {
    padding: 0;
    margin: 8px;

    .content-title {
        text-transform: uppercase;
        font-weight: 500;
        font-size: 1rem;
        margin-bottom: 10px;
        border-left: 3px solid var(--header-bg);
        padding-left: 10px;
    }
}

/* success/error messages */
.messagelist li {
    padding: 10px 15px;
    margin: 0 0 10px 0;
    border-radius: 4px;
}

/* bread crumb title and actions */
#content-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 4px;
    /* override base.css */

    .object-tools {
        margin-top: 0px;
    }
}

.object-tools li, div.export-dropdown {
    justify-items: center;
    align-items: center;
    margin-left: 10px;
    display: flex;
    height: auto;
    float: left;


    > a, button {
        padding: 5px 10px;
        padding-top: 3px !important;
        padding-bottom: 3px !important;
        margin: 0;
        font-weight: 800 !important;
        border-radius: 6px;
        background-color: var(--header-bg) !important;
        color: var(--body-bg) !important;
        text-decoration: none;
        transition: background-color 0.2s ease-in-out;
        box-shadow: 0 1px 1px 0 var(--border-color);
    }

    > a:hover, button:hover {
        background-color: var(--body-bg) !important;
        color: var(--header-bg) !important;
    }
}


tButton, form.actions, .actions {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 8px;

    > a, button {
        display: flex;
        align-items: center;
        padding: 4px 6px;
        cursor: pointer;
        margin: 0;
        font-weight: 700 !important;
        border-radius: 5px;
        text-decoration: none;
        transition: background-color 0.2s ease-in-out;
        /*box-shadow: 0 1px 1px 0 var(--border-color);*/
    }

    > a, button {
        background-color: var(--body-bg) !important;
        color: var(--header-bg) !important;
    }

    > .danger {
        background-color: #fff !important;
        color: #e42323 !important;
    }

    > .danger:hover {
        background-color: #e41111 !important;
        color: #fff !important;
    }

    > a:hover, button:hover {
        background-color: var(--header-bg) !important;
        color: var(--body-bg) !important;
    }
}


#toolbar #searchbar {
    height: 1.75rem;
    border: 1px solid var(--border-color);
    padding: 2px 5px;
    margin: 0;
    vertical-align: center;
    font-size: 0.8125rem;
    max-width: 100%;
}

#changelist {
    padding: 8px;

}

main {
    width: calc(100vw - 260px);
    /* overflow-x: auto; */
}

section.report {
    background-color: #f4f6f8;
    border-radius: 8px;
}

content:has(.info-block) div.info-block {
    background-color: var(--body-bg);
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

section.banner {
    margin-bottom: 20px;
    background-color: var(--body-bg);
    border-radius: 2px;
}

section.chart {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    margin: 0 0 -0.9rem -1rem;
    background-color: transparent;

    & content {
        width: var(--width, 100%);
        margin: 0;
        background-color: var(--body-bg);
        border-radius: 5px;
    }
}

section:has(content) {
    background: var(--body-bg);
    padding: 10px;
    border-radius: 2px;

    header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 4px;
        margin: 0 0 16px 0;
        border-bottom: 2px double var(--border-color);
        text-transform: uppercase;
        height: auto;
        font-size: 0.875rem;
        font-weight: 400;

        * {
            padding: 0px;
            margin: 0px;
        }

        button {
            padding: 4px 8px;
            margin: 0;
            height: auto;
        }

        span {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
    }

    content {
        width: 100%;

        &.details {
            display: grid;
            grid-template-columns: repeat(var(--columns, 4), 1fr);
            column-gap: 15px;
            row-gap: 20px;
        }

        label {
            font-weight: 800;
        }

        table {
            width: 100%;
        }
    }

    content.details div {
        label {
            text-transform: uppercase;
            font-size: .75rem;
            display: block;
        }

        span {
            /*&:not.status{*/
            /*    font-size: 1rem;*/
            /*}*/
            display: block;
        }
    }


    footer {
        display: flex;
        align-items: flex-end;
    }

    footer.pagination {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 10px;

        span:first-child {
            font-size: .75rem;
            color: var(--body-quiet-color);
        }

        div {
            display: flex;
            align-items: center;
            gap: 10px;
        }
    }
}


.status {
    width: fit-content;
    height: fit-content;
    background-color: var(--background);
    border-radius: 4px;
    color: white;
    padding: 2px 4px;
    font-size: .7rem;
}

section.summary-row {
    position: sticky;
    bottom: 0;
    margin-top: 50px;
    font-size: 1rem;

    content {
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-weight: 800;

        div {
            font-weight: 600;

            span {
                font-weight: 800;
            }
        }
    }
}


#loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
}

.spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 255, 255, 0.2);
    border-top: 6px solid #3498db;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

body.loading {
    overflow: hidden;
    user-select: none;
    pointer-events: none;
}

.spinner::after {
    content: "";
    position: absolute;
    top: 150%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

@supports not (backdrop-filter: blur(12px)) {
    #loading-spinner {
        background: rgba(0, 0, 0, 0.7);
    }
}

section:has(.dp-calculation-table) {
    header {
        font-weight: 800;
    }
}

.clear-scrip-search {
    padding: 2px;
    cursor: pointer;
    font-size: 10px;
    color: #aaa;
    background: none;
    border: none;
}


.apps-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.app-item {
    background-color: var(--body-bg);
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-weight: bold;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.app-item:hover {
    background-color: var(--header-bg);
    color: var(--body-bg);
}


.list-button {
    text-wrap: nowrap;
    padding: 5px 8px;
    margin: 0;
    border-radius: 4px;
    background-color: var(--header-bg);
    color: var(--body-bg);
    text-decoration: none;
    transition: background-color 0.2s ease-in-out;
    box-shadow: 0 1px 1px 0 var(--border-color);
    font-size: 0.6875rem;
    font-weight: 550;
    letter-spacing: 0.5px;
    font-family: var(--font-family-primary);

    &:hover {
        background-color: var(--body-bg) !important;
        color: var(--header-bg) !important;
    }
}

.deletelink {
    display: none;
    visibility: hidden;
}

.tox-statusbar__path-item{
    display: none;
    visibility: hidden;
}

.tox-menu-nav__js.tox-collection__item[title="Code"] {
    display: none !important;
}
