#market {
    padding: 80px 10px;
    min-height: 40vh;
    margin: 0 auto;
    color: var(--light);
}

#market.inactive .tabs,
#market:not(.inactive) .backdrop,
#market.selling .form_controls .button,
#market.collapsed #search_listed_filters,
#market.collapsed #reset_form,
#market.collapsed #search_bulk_filters,
#market.collapsed:not(.search_bulk) .form_controls .button.search,
#market.search_bulk .form_controls #reset_form,
#market:not(.search_bulk) .input_bulk_search,
#market:not(.search_bulk) #search_bulk_filters,
#market:not(.search_listed) .input_item_name,
#market:not(.search_listed) #search_listed_filters {
    display: none;
}

#market #reset_form {
    margin-right: 0.2em;
}

#market #toggle_form:before {
    content: "Collapse";
}

#market.collapsed #toggle_form:before {
    content: "Expand";
}

#market.selling .form_controls tr>td {
    padding-top: 0;
}

#market #search_bulk_filters,
#market li.tooltip>div:first-child>div,
#market .tabs>div,
#market .backdrop,
#market form .crowns,
#market .button {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#market>div {
    position: relative;
    margin: 0 auto;
    padding: 10px;
    max-width: 1300px;
}

#market>div:not(#search_results),
#market select,
#market form .button,
#market #search_results .button,
#market form .crowns,
#market .tabs>div,
#market input[type=number],
#market form input[type=text] {
    background: #0d0d0d;
    border: 2px solid rgba(255, 255, 255, 0.15);
    -webkit-box-shadow: 0px 0px 3px 0px rgb(0 0 0 / 75%), inset 0px 0px 30px 2px rgb(0 0 0 / 50%);
    -moz-box-shadow: 0px 0px 3px 0px rgb(0 0 0 / 75%), inset 0px 0px 30px 2px rgb(0 0 0 / 50%);
    box-shadow: 0px 0px 3px 0px rgb(0 0 0 / 75%), inset 0px 0px 30px 2px rgb(0 0 0 / 50%);
}

#market.inactive .backdrop {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.67);
}

#market .backdrop span {
    position: absolute;
    text-align: center;
    left: 0;
    top: 50%;
    width: 100%;
    font-size: 22.464px;
    padding: 0.5em 0;
    color: #fff;
    background: var(--dark-orange);
    transform: translateY(-50%);
}

#market .backdrop span:after {
    content: "";
    display: block;
    margin: 0 auto;
    background: transparent url(/media/gui/64/badge_eye_white.png) no-repeat center center;
    background-image: -webkit-image-set(url(/media/gui/64/badge_eye_white.png) 1x, url(/media/gui/128/badge_eye_white.png) 2x);
    background-image: image-set(url(/media/gui/64/badge_eye_white.png) 1x, url(/media/gui/128/badge_eye_white.png) 2x);
    background-size: 90% auto;
    width: 1.61429em;
    height: 1em;
}

#market .tabs {
    position: absolute;
    top: -4px;
    left: -2px;
    transform: translateY(-100%);
}

#market select,
#market form .crowns,
#market input[type=number],
#market form input[type=text],
#market form table.stat_filter_group tr>td>div,
#market .tabs>div {
    background: #060606;
    border-color: #313131;
    padding: 0 0.5882em;
}

#market input[type=submit],
#market form input[type=text] {
    display: block;
    width: 100%;
    padding: 2px 0.5882em;
    font-family: 'Ubuntu Condensed', sans-serif;
    font-variant: none;
    cursor: pointer;
}

#market form input[type=text] {
    cursor: text;
}

#market form .crowns,
#market #search_results .button,
#market form .button {
    display: inline-block;
    padding: 2px 0.5882em;
    font-family: 'Ubuntu Condensed', sans-serif;
    font-variant: none;
}

#market form .crowns>span,
#market form .crowns:after {
    vertical-align: middle;
}

#market form .crowns:after {
    content: "";
    display: inline-block;
    height: 1em;
    width: 1em;
    margin-left: 0.2em;
    background-image: url('/media/items/32/coin_stack_full.png');
    background-image: -webkit-image-set(url('/media/items/32/coin_stack_full.png') 1x, url('/media/items/64/coin_stack_full.png') 2x);
    background-image: image-set(url('/media/items/32/coin_stack_full.png') 1x, url('/media/items/64/coin_stack_full.png') 2x);
    background-size: 100% auto;
    background-position: right bottom;
}

#market form .button,
#market #search_results .button,
#market form input[type=submit] {
    background-color: rgba(128, 128, 255, 0.25);
    border-color: rgba(128, 128, 255, 0.5);
    -webkit-transition: border-color 100ms linear, background-color 100ms linear;
    -moz-transition: border-color 100ms linear, background-color 100ms linear;
    transition: border-color 100ms linear, background-color 100ms linear;
    cursor: pointer;
}

#market form input[type=submit]:hover {
    background-color: rgba(128, 128, 255, 0.4);
}

#market #search_results .button,
#market form .button {
    background-color: rgba(128, 255, 255, 0.25);
    border-color: rgba(128, 255, 255, 0.5);
}

#market #search_results .button:hover,
#market form .button:hover {
    background-color: rgba(128, 255, 255, 0.4);
}

#market #search_results .button.cancel,
#market #search_results .button.unlist {
    background-color: rgba(255, 128, 128, 0.25);
    border-color: rgba(255, 128, 128, 0.5);
}

#market #search_results .button.cancel:hover,
#market #search_results .button.unlist:hover {
    background-color: rgba(255, 128, 128, 0.4);
}

#market .tabs>div {
    display: inline-block;
    margin-right: 2px;
    cursor: pointer;
    -webkit-transition: border-color 100ms linear, color 100ms linear;
    -moz-transition: border-color 100ms linear, color 100ms linear;
    transition: border-color 100ms linear, color 100ms linear;
}

#market .tabs>div:hover {
    border-color: #fff;
    color: #fff;
}

#market .tabs>div.active {
    background-color: rgba(128, 255, 255, 0.25);
}

#market .tabs>div.active:not(:hover) {
    border-color: rgba(128, 255, 255, 0.25);
}

#market #search_bulk_filters .bulk_item,
#market #search_results>div,
#market #search_results>ul>li,
#market form,
#market .tabs>div {
    font-size: 20.48px;
    font-variant: small-caps;
}

#market #search_results>div {
    color: #fff;
    filter: drop-shadow(#000 0 1px 0) drop-shadow(#000 1px 0 0) drop-shadow(#000 0 -0.8px 0) drop-shadow(#000 -0.8px 0 0);
}

#market form .enable,
#market form .enable label>span:first-child {
    position: relative;
    text-align: left;
}

#market form .enable.inactive {
    opacity: 1;
    pointer-events: none;
}

#market form table.stat_filter_group tr:nth-child(2)>td:nth-child(4n+2) select,
#market form #stat_filter.inactive,
#market form table.stat_filter_group tr>td input.inactive,
#market form .enable.inactive>*,
#market form .enable>select:not(.active) {
    filter: brightness(0.5);
    pointer-events: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#market form .enable input {
    display: none;
}

#market li.tooltip .order_by,
#market form .enable label {
    cursor: pointer;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#market form .enable label span {
    margin: 0px;
}

#market form .enable label>span:first-child {
    display: inline-block;
    width: 17px;
    height: 17px;
    margin-right: 0.5em;
}

#market form .enable label>span:first-child:before {
    content: '';
    display: inline-block;
    width: 100%;
    height: 100%;
    background: #222;
    border: 1px solid #eee;
}

#market form .enable label>span:first-child:before {
    filter: brightness(0.5);
}

#market form .enable label:before,
#market form .enable label:after {
    display: none;
}

#market form .enable label>span:first-child:after {
    position: absolute;
    left: 3px;
    top: 2px;
    width: 14px;
    height: 6px;
    content: '';
    opacity: 0;
    border: 3px solid var(--tough);
    border-top: none;
    border-right: none;
    -webkit-transform: rotate(-45deg);
    -ms-transform: rotate(-45deg);
    transform: rotate(-45deg);
    -webkit-box-shadow: -1px 1px 1px 0 rgba(0, 0, 0, 0.3), inset 1px -1px 1px 0 rgba(0, 0, 0, 0.3);
    -moz-box-shadow: -1px 1px 1px 0 rgba(0, 0, 0, 0.3), inset 1px -1px 1px 0 rgba(0, 0, 0, 0.3);
    box-shadow: -1px 1px 1px 0 rgba(0, 0, 0, 0.3), inset 1px -1px 1px 0 rgba(0, 0, 0, 0.3);
    -webkit-transition: all 100ms linear;
    -moz-transition: all 100ms linear;
    transition: all 100ms linear;
}

#market form .enable label:hover>span:first-child:after {
    opacity: 0.3;
}

#market form .enable input[type=checkbox]:checked+label>span:first-child:after {
    opacity: 1;
}

#market form .enable label:hover:before,
#market form .enable input[type=checkbox]:checked:hover+label>span:first-child:after {
    border-color: #fff;
}

#market form h1,
#market form h2,
#market form h3 {
    margin: 0;
}

#market form table.stat_filter_group tr>td>*,
#market form table {
    width: 100%;
}

#market table.stat_filter_group tr>td div.close,
#market form table tr>td {
    padding: 0.83em 2px 0 2px;
}

#market form table tr>td:first-child {
    padding-left: 0;
}

#market form table tr>td:last-child {
    padding-right: 0;
}

#market form table.rows_2 tr>td {
    width: 50%;
}

#market form table.rows_3 tr>td {
    width: calc(100% / 3);
}

#market form table.rows_4 tr>td {
    width: 25%;
}

#market form table.stat_filter_group {
    position: relative;
}

#market form table.stat_filter_group tr>td {
    white-space: nowrap;
}

#market form table.stat_filter_group tr>td>select {
    min-height: 27.2px;
}

#market form table.stat_filter_group tr>td:nth-child(4n+1) {
    width: calc(100% / 12);
}

#market form table.stat_filter_group tr>td:nth-child(4n+2) {
    width: calc(100% / 15);
}

#market form table.stat_filter_group input {
    text-align: center;
}

#market form table.input_item_name tr>td,
#market form table.input_bulk_search tr>td {
    padding-top: 0;
}

#market form table.input_item_name tr>td:first-child {
    width: 75%;
}

#market form table tr>td select {
    display: block;
    width: 100%;
}

#market form table.form_controls tr>td:last-child {
    text-align: right;
}

#market #search_bulk_filters>div {
    margin: 0 28.25px;
}

#market #search_bulk_filters>div>div:first-child {
    padding: 10px;
    margin: 0.83em;
    background: #1b1b1b;
    border-left: 0.25em solid var(--light);
    -webkit-box-shadow: 0px 0px 3px 0px rgb(0 0 0 / 75%);
    -moz-box-shadow: 0px 0px 3px 0px rgb(0 0 0 / 75%);
    box-shadow: 0px 0px 3px 0px rgb(0 0 0 / 75%);
}

#market.highlighted #search_bulk_filters .bulk_item.highlighted,
#market #search_bulk_filters>div.dyes>div:first-child,
#market #search_bulk_filters>div.charms>div:first-child,
#market #search_bulk_filters>div.materials>div:first-child,
#market #search_bulk_filters>div.talismans>div:first-child {
    border-color: rgba(255, 255, 128, 0.5);
}

#market #search_bulk_filters>div.consumables>div:first-child {
    border-color: rgba(128, 255, 255, 0.5);
}

#market #search_bulk_filters>div.components>div:first-child {
    border-color: rgba(128, 255, 128, 0.5);
}

#market form table.stat_filter_group tr:not(:first-child)>td:nth-child(n+3):nth-child(-n+4) input.active {
    border-color: rgba(255, 128, 128, 0.5);
}

#market form table.stat_filter_group tr>td:nth-child(n+11):nth-child(-n+12) input.active {
    border-color: rgba(255, 191, 128, 0.5);
}

#market form table.stat_filter_group tr>td:nth-child(n+7):nth-child(-n+8) input.active,
#market #search_bulk_filters>div.scrolls>div:first-child {
    border-color: rgba(128, 128, 255, 0.5);
}

#market form table.stat_filter_group tr>td:nth-child(n+15):nth-child(-n+16) input.active,
#market #search_bulk_filters>div.offering>div:first-child {
    border-color: rgba(255, 128, 255, 0.5);
}

#market select>option[value=cosmetic],
#market select>option[value=equipment],
#market select>option[value=toy] {
    color: rgb(201, 101, 101);
}

#market select>option[value=talisman],
#market select>option[value=material],
#market select>option[value=dye],
#market select>option[value=charm] {
    color: rgb(201, 201, 101);
}

#market select>option[value=junk],
#market select>option[value=component],
#market select>option[value=vessel] {
    color: rgb(101, 201, 101);
}

#market select>option[value=consumable],
#market select>option[value=food],
#market select>option[value=candy] {
    color: rgb(101, 201, 201);
}

#market select>option[value=scroll],
#market select>option[value=container] {
    color: rgb(101, 101, 201);
}

#market select>option[value=offering],
#market select>option[value=prophecy] {
    color: rgb(201, 101, 201);
}

#market #search_bulk_filters>div>div:last-child {
    width: 90%;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    font-size: 0;
}

#market #search_bulk_filters .bulk_item {
    margin: 2px;
    padding: 0 0.5882em;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: inline-block;
    cursor: pointer;
}

#market #search_bulk_filters .dyes .bulk_item,
#market #search_bulk_filters .components .bulk_item,
#market #search_bulk_filters .consumables .bulk_item,
#market #search_bulk_filters .materials .bulk_item,
#market #search_bulk_filters .charms .bulk_item,
#market #search_bulk_filters .talismans .bulk_item {
    width: 48px;
    height: 48px;
    font-size: 0;
    background-size: auto 32px;
    background-repeat: no-repeat;
    background-position: center center;
}

#market #search_bulk_filters .talismans>div:last-child {
    max-width: 230px;
}

#market #search_bulk_filters .charms>div:last-child {
    max-width: 550px;
}

#market #search_bulk_filters .bulk_item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#market #search_bulk_filters .bulk_item.electric_pump {
    width: 96px;
}

#market.highlighted>div {
    background-color: #070707;
}

#market.highlighted #search_bulk_filters .bulk_item:not(.highlighted) {
    background-color: black;
    filter: brightness(0.5);
}

#market #search_results {
    text-align: center;
}

#market #search_results .total_results:not(:empty):before {
    content: " (";
}

#market #search_results .total_results:not(:empty):after {
    content: " available)";
}

#market #search_results>ul {
    margin-top: 10px;
}

#market #search_results>ul>li {
    position: relative;
}

#market #search_results>ul>li:nth-child(even) {
    background: #0d0d0d;
}

#market #search_results>ul>li.inactive {
    pointer-events: none;
}

#market #search_results>ul>li.inactive:nth-child(odd) {
    background: rgba(0, 0, 0, 0.25);
}

#market #search_results>ul>li.inactive:nth-child(even) {
    background: rgba(13, 13, 13, 0.25);
}

#market #search_results>ul>li.inactive>:last-child.inactive,
#market #search_results>ul>li.inactive>*:not(:last-child) {
    opacity: 0.25;
}

#market #search_results>ul>li.inactive>:last-child:not(.inactive) {
    border-color: rgba(255, 255, 255, 0.0375);
}

#market li.tooltip>div {
    width: 640px;
    margin: 0 auto;
}

#market li.tooltip .item_tooltip {
    position: relative;
    display: block;
    text-align: right;
    min-height: 200.75px;
    font-variant: none;
}

#market li.tooltip .cost>* {
    vertical-align: middle;
}

#market li.tooltip .controls * {
    vertical-align: middle;
}

#market li.tooltip>div:last-child>div>div:not(.button):not(.buttons) {
    padding: 2px 0;
}

#market li.tooltip svg {
    opacity: 0.5;
    filter: brightness(0.6);
}

#market li.tooltip>div:first-child,
#market li.tooltip>div:last-child {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 312.8px;
    padding: 10px;
}

#market li.tooltip>div:first-child {
    left: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

#market li.tooltip>div:last-child {
    right: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

#market li.tooltip .item_tooltip>div {
    display: inline-block;
    vertical-align: middle;
}

#market li.tooltip .item_tooltip>div:first-child {
    position: absolute;
    top: 50%;
    left: calc(200.75px * 0.5);
    transform: translate(-50%, -50%);
}

#market li.tooltip .item_tooltip>div:last-child {
    margin-left: 200.75px;
    min-height: 200.75px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#market li.tooltip .order_by {
    position: relative;
}

#market li.tooltip .order_by {
    padding: 0 4px;
}

#market li.tooltip ul>li div.order_by {
    display: inline-block;
}


#market li.tooltip .order_by:hover:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.15);
}

#market li.tooltip .controls,
#market li.tooltip .confirm {
    padding: 10px;
    width: 100%;
}

#market li.tooltip .confirm,
#market li.tooltip .controls,
#market li.tooltip>div:first-child>div {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

#market li.tooltip>div:first-child>div {
    text-shadow: #000 0 1px 0, #000 1px 0 0, #000 0 -1px 0, #000 -1px 0 0;
    font-family: 'Merienda', cursive;
    background-size: 100% auto;
    background-repeat: no-repeat;
    text-align: left;
}

#market li.tooltip>div:first-child>div>div {
    font-size: 17.92px;
    line-height: 90%;
    padding: 1.792px;
}

#market li.tooltip .button {
    margin: 10px 5px;
}

#market li.tooltip .buttons .button {
    min-width: 80px;
}

#market li.tooltip .total_value,
#market .tooltip .controls>*:not(.button) {
    color: #999;
}

#market .tooltip .controls .button,
#market .tooltip .confirm .button {
    color: var(--light);
}

#market .item_outline {
    -webkit-filter: drop-shadow(0 -1px 0 #333) drop-shadow(0 1px 0 #333) drop-shadow(1px 0 0 #333) drop-shadow(-1px 0 0 #333);
    filter: drop-shadow(0 -1px 0 #333) drop-shadow(0 1px 0 #333) drop-shadow(1px 0 0 #333) drop-shadow(-1px 0 0 #333);
}

#market .button.unlist:before {
    content: "Unlist";
}

#market .button.buy:before {
    content: "Buy";
}

#market .button.cancel:before {
    content: "Cancel";
}

#market .controls table {
    width: 100%;
}

#market form .button#stat_filter {
    width: 100%;
    text-align: center;
    background: #0d0d0d;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

#market form .button#stat_filter:hover {
    border-color: var(--dark);
}

#market .controls table tr>td:first-child {
    text-align: right;
    width: 33.3333%;
}

#market .controls table tr>td:last-child {
    text-align: left;
}

#market .controls table tr>td {
    padding: 5px;
}

#market .order_by>*,
#market .controls table tr>td>* {
    vertical-align: middle;
}

#market .controls table tr>td .token.coin {
    display: inline-block;
    width: 1em;
    height: 1em;
    background: transparent none no-repeat center center;
    background-size: contain;
}

#market .controls .button.buy.bulk {
    width: 60%;
}

#market #search_results .controls table input[type=number] {
    width: 50%;
}

#market li.tooltip .controls .confirm {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    padding: 0;
}

#market li.tooltip .confirm.error,
#market li.tooltip .controls .confirm.error {
    color: var(--red);
}

#market li.tooltip .controls .confirm .button {
    margin: 8px 5px;
}

#market table.stat_filter_group tr>td div.close {
    position: absolute;
    display: block;
    right: 0;
    top: 0;
    margin: 0;
    width: auto;
    width: max-content;
    height: max-content;
    background: none;
    cursor: pointer;
}

#market .close:after {
    content: "\f12a";
    font: normal normal normal 1.2em/1 Ionicons;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #830000;
}