/* Reset margins and paddings */
body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: hidden;
    background: #041512;
}

span[class="Mil-Spec Grade"],
span[class="Distinguished"],
span[class="High Grade"] {
    background-color: rgb(75, 105, 255);
}

span[class="Consumer Grade"],
span[class="Base Grade"] {
    background-color: rgb(176, 195, 217);
}

span[class="Industrial Grade"] {
    background-color: rgb(94, 152, 217);
}

span[class="Restricted"],
span[class="Exceptional"],
span[class="Remarkable"] {
    background-color: rgb(136, 71, 255);
}

span[class="Classified"],
span[class="Superior"],
span[class="Exotic"] {
    background-color: rgb(211, 44, 230);
}

span[class="Covert"],
span[class="Extraordinary"],
span[class="Master"] {
    background-color: rgb(235, 75, 75);
}

span[class="Contraband"] {
    background-color: rgb(228, 174, 57);
}

.market-container {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 0 20px 0;
    height: 100%;
    scrollbar-width: none;
}

.market-grid {
    margin-top: 130px;
    padding: 10px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    align-items: stretch;
}

/* Item card */
.inventory-item {
    background-color: #061D19;
    border-radius: 10px;
    padding: 15px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease;
}

.inventory-item:hover {
    transform: translateY(-5px);
    /* Slight hover effect */
}

/* Item image */
.item-image {
    width: 100%;
    height: auto;
    margin-bottom: 10px;
    border-radius: 5px;
}

/* Stickers */
.stickers {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.stickers div {
    width: 25px;
    height: 25px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 50%;
}

.stickers img {
    width: 24px;
    height: 24px;
    margin-right: 5px;
}

.stickers {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
}

.sticker {
    width: 20px !important;
    height: 20px !important;
    margin-bottom: 5px;
}

/* Item price */
.item-price,
.item-float {
    margin: 0;
    margin-top: 10px;
    color: white;
    font-size: 16px;
}

.item-detail {
    font-size: 12px;
    font-weight: 500;
    color: #d6d6d6;
    margin: 0;
    /* line-height: 1.6; */
    text-align: left;
    white-space: nowrap;
}

.item-detail .stattrack {
    color: rgba(246, 128, 42, 1);
    font-size: 12px;
    font-weight: 501;
}

.item-detail .quality {
    color: #06c49e;
    /* Color for item quality */
    font-weight: 501;
    font-size: 12px;
    /* Slightly larger than float */
}

.item-detail .float {
    color: white;
    /* Float value color */
    font-weight: 501;
    font-size: 12px;
}

.item-detail .price {
    display: block;
    /* Places price on a new line */
    color: white;
    /* White for the main part of the price */
    font-weight: 501;
    font-size: 13px;
    /* Larger size for price */
}

.item-detail .fractional {
    font-size: 10px;
    /* Smaller size for fraction */
    font-weight: 500;
    color: #828e8c;
    /* Grey for fraction */
}


.item-name,
.item-price {
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #fff !important;
    opacity: 0.5 !important;
    margin: 5px 0 !important;
}

/* Buy button */
.buy-button {
    width: 100%;
    height: 30px;
    background: #14CBB4;
    border-radius: 5px;
    border: none;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 12px;
}

.buy-button img {
    width: 20px;
}

/* Item rarity */
.item-rarity {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: #122825;
    opacity: 100%;
    border-radius: 6px;
    width: 10px;
    height: 10px;
    padding: 5px;
}

.item-rarity span {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 2px;
}

/* Top bar */
.top-bar {
    position: fixed;
    top: 70px;
    height: 50px;
    left: 0;
    width: calc(100% - 40px);
    display: flex;
    gap: 15px;
    background: #041512;
    align-items: center;
    padding: 0 20px;
    padding-bottom: 10px;
}

.sorting-container div {
    color: white;
    font-size: clamp(12px, 2vw, 30px);
    font-family: Inter, sans-serif;
    text-align: left;
    width: 100%;
    font-weight: 400;
}

/* Sorting button */
.sorting-button {
    flex-grow: 1;
    height: inherit;
    background: #061D19;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    width: 100%;
    padding-right: 10px;
}

.sorting-container {
    color: white;
    font-family: Inter, sans-serif;
    text-align: left;
    padding-left: 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.sorting-button img {
    width: auto;
    height: 15px;
}

/* Search and filter buttons */
.sorting-buttons {
    width: 50px;
    height: 50px;
    background: #061D19;
    border-radius: 5px;
    border: none;
    justify-content: center;
    display: flex;
    align-items: center;
    padding: 0;
    flex-shrink: 0;
}

.sorting-buttons button {
    cursor: pointer !important;
}

.search-input-container {
    display: none;
    flex-grow: 1;
    gap: 15px;
    height: 50px;
    transition: width 0.3s ease;
}

.search-input-container input {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 4px;
    background: #061D19;
    color: white;
    font-family: Inter, sans-serif;
    font-size: clamp(16px, 2vw, 30px);
}

/* Stretch input animation */
.top-bar.active .filter-button,
.top-bar.active .sorting-buttons {
    display: none;
}

.top-bar.active .search-input-container {
    display: flex;
    flex-grow: 1;
}

.filter-button,
.search-button {
    background: #061D19;
    border: none;
    justify-content: center;
    display: flex;
    align-items: center;
    padding: 0;
    width: 45px;
    height: 45px;
}

.filter-button img,
.search-button img {
    width: auto;
    height: 50%;
}

.find {
    height: 50px;
    width: 50px;
}

.find svg {
    cursor: pointer !important;
    color: white;
    background-color: #06D7AD;
    border-radius: 5px;
}

.loading-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    color: white;
}

div#loading {
    pointer-events: none;
}

div#loading,
div#load-more {
    background-color: rgba(20, 203, 180, 1);
    padding: 10px 20px;
    border-radius: 10px;
}

div#load-more {
    cursor: pointer;
}