:root {
    --padding-x: 24px;
    --padding-y: 16px;
    --announce-bar-size: 48px;
}

[data-bs-theme=dark] {
    --bs-body-color: rgb(207, 212, 214) !important;
    --bs-border-color: #353a40 !important;

    table {
        --bs-table-color: var(--bs-body-color) !important;
    }
}

*, *:before, *:after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    align-content: stretch;
}

main {
    display: flex;
    flex-grow: 1;
    align-items: stretch;
    align-content: stretch;
    height: 100%;
    position: relative;
    min-height: 1px;
}

header {
    width: 100%;
    height: 64px;
    border-bottom: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);
    display: flex;
    align-items: stretch;
    align-content: stretch;
}

nav#main-nav {
    width: 200px;
    border-right: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);
    padding: 16px 0;
    flex-shrink: 0;
}

section {
    flex-grow: 1;
    /*padding: var(--padding-x) var(--padding-y) calc(var(--padding-x) + var(--announce-bar-size));*/
    padding: var(--padding-x) var(--padding-y);

    & .row {
        padding: var(--padding-x) var(--padding-y);
    }

    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.ao-stonks-logo {
    height: 60px;
    padding: 8px;
    display: flex;
    justify-content: center;

    img {
        height: 100%;
        width: auto;
    }
}

.flex {
    display: flex !important;
}

.w200 {
    width: 200px;
}

.w400 {
    width: 400px;
}

.nav.striped > *:nth-child(even) {
    background-color: rgba(0, 0, 0, .1);
}

.pagination-nav {
    margin: 2rem 0;
}

.pagination-nav:first-child {
    margin-top: 0;
}

.img-bg {
    background-color: rgba(255, 255, 255, .15);
    border-radius: 6px;
    margin: 0 16px 16px 0;
}

i.sell {
    color: var(--bs-success);
}

i.buy {
    color: var(--bs-danger);
}

i.ql {
    color: var(--bs-info);
}

article.announcement {
    &.hidden {
        display: none;
    }

    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--announce-bar-size);
    transition: translate .75s ease-in-out;

    &:last-child {
        z-index: 999999;
    }

    &:hover {
        translate: 0 var(--announce-bar-size);
    }
}

.a-remove-style {
    color: inherit;
    text-decoration: none;
}

:root {
    --item-icon-listing-size: 60px;
}

.item-card-header {
    display: flex;
    align-items: center;
    max-height: var(--item-icon-listing-size);
}

.item-icon-box {
    margin-right: var(--bs-card-cap-padding-x);
    padding: .35rem;
    width: var(--item-icon-listing-size);
    height: var(--item-icon-listing-size);
    background-color: rgba(255, 255, 255, .15);
    flex-shrink: 0;

    img {
        width: 100%;
        height: 100%;
    }
}

.listing-chart-container {
    width: 73px;
    display: flex;
    align-items: center;
}

.table-bordered {
    th, td {
        &:first-child {
            border-left: 0;
        }

        &:last-child {
            border-right: 0;
        }
    }

    thead tr:first-child {
        border-top: 0;
    }

    tbody tr:last-child {
        border-bottom: 0;
    }
}

table a {
    text-decoration: none;
    color: inherit;
    flex-grow: 1;
    text-align: start;

    &:hover {
        text-decoration: underline;
    }
}

.item-table {
    td {
        height: 50px;
        padding: .5rem 1rem !important;

        &.name {
            display: flex;
            align-items: center;
            padding: 0 1rem;
            gap: .5rem;
        }
    }

    a.item-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .percentage {
        white-space: nowrap;
    }
}

a[role=button].btn-tiny {
    padding: .2rem;
    display: inline-block;
    font-size: .5rem;
    border-radius: 0.1725rem;
}

a {
    cursor: pointer;
    text-decoration: none;

    &:hover {
        text-decoration: underline;
    }
}

.search-form {
    width: 100%;
}

td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-responsive {
    max-width: 100%;
}

.filter-form {
    label {
        display: none;
    }
}

th.sort {
    cursor: pointer;
    &:after {
        content: '\F127';
        font-family: 'bootstrap-icons';
        margin-left: 6px;
        color: var(--bs-gray);
    }
    &.asc:after {
        content: '\F148';
        color: var(--bs-body-color);
    }
    &.desc:after {
        content: '\F128';
        color: var(--bs-body-color);
    }
}
