/* NAVBAR STYLES ARE ALWAYS THE SAME */
/* Navbar styling for both themes */
.navbar {
    background-color: #000000 !important;
}

.nav-link {
    color: #ffffff;
}

/* Override Bootstrap's bg-dark class */
.bg-dark {
    color: white !important;
    background-color: #000000 !important;
}

/* Ensure dropdown menus match the theme */
.navbar .dropdown-menu {
    color: 333333 !important;
    background-color: #000000;
    z-index: 1050;
}

/* Dropdown item hover states */
.navbar .dropdown-menu .dropdown-item:hover {
    color: #000000 !important;
    background-color: #ffffff;
}

/* Dropdown divider color */
.navbar .dropdown-divider {
    border-color: #999999 !important;
}

/* Force these styles in both themes */
[data-bs-theme=light] .navbar .dropdown-menu,
[data-bs-theme=dark] .navbar .dropdown-menu {
    background-color: #000000 !important;
}

[data-bs-theme=light] .navbar .dropdown-item,
[data-bs-theme=dark] .navbar .dropdown-item {
    color: #ffffff !important;
}

/* CATS SORTING */
.custom-control-input {
  touch-action: manipulation;
}

.handle {
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  padding: 12px;  /* Larger touch target */
}

#sortable li {
  touch-action: pan-y pinch-zoom;
}

/* PRICE LIST STYLES */
.price_table {
    height: 500px;  /* Fixed height for all cards */
    display: flex;
    flex-direction: column;
}

.price_table .card-header {
    flex: 0 0 auto;  /* Don't allow header to grow/shrink */
}

.price_table .table-responsive {
    flex: 1 1 auto;  /* Allow table to grow/shrink */
    overflow-y: auto;  /* Enable vertical scrolling */
    max-height: calc(100% - 50px);  /* Subtract header height */
}

/* GOLD STANDARD =) */
:root {
    --bs-gold: #daa520;  /* Using Bootstrap naming convention */
  }

  /* Text color utility */
  .text-gold {
    color: var(--bs-gold) !important;
  }

  /* Background color utility */
  .bg-gold {
    background-color: var(--bs-gold) !important;
  }

  /* Border color utility */
  .border-gold {
    border-color: var(--bs-gold) !important;
  }

/* VOTING */
.voting-div {
    height: 90px;
    width: 60px;
}

#vote-up, #vote-down {
    margin: 0 auto;
    display: block;
    cursor: pointer;
    color: var(--bs-secondary);  /* Default color */
    transition: color 0.2s ease;
}

#vote-up:hover {
    color: var(--bs-success);  /* Green on hover */
}

#vote-down:hover {
    color: var(--bs-danger);   /* Red on hover */
}

#vote-count {
    height: 20px;
    text-align: center;
}

/* Light mode customisation */
[data-bs-theme=light] {
    --bs-warning-bg-subtle: #daa520;
    --bs-body-color: #000000;
    --bs-body-bg: #eeeeee;
    --bs-heading-color: #000;
    --bs-link-color: #000;
    --bs-link-color-rgb: none;
    --bs-link-decoration: underline;
    --bs-link-hover-color: var(--bs-gold);
    --bs-link-hover-color-rgb: none;
    --te-card-bg: #ffffff;
    --te-card-cap-bg: #000000;
    --te-card-cap-color: #ffffff;
    --te-card-color: #000000;
    --te-card-cap-color-inv: var(--bs-gold);
    --te-card-cap-bg-inv: #000;
    --bs-border-radius: 0.375rem;
    --bs-footer-copyright: #000000;
}

[data-bs-theme=light] .text-info {
    color: #858585 !important;
  }

[data-bs-theme=light] .form-control {
    color: #000000;
    border: 1px solid #000;
    background-color: #ffffff;
}

[data-bs-theme=light] .price-edit {
    color: #000000;
    border: 1px solid #000;
    background-color: #ffffff;
    width: auto;
}

[data-bs-theme=light] input::placeholder {
    color: #4e4e4e;
}

[data-bs-theme=light] .form-control:focus {
    color: #000000;
    background-color: #ffffff;
    border-color: #000000;
    box-shadow: none;
}

[data-bs-theme=light] .price-edit:focus {
    color: #000000;
    background-color: #ffffff;
    border-color: #000000;
    box-shadow: none;
}

[data-bs-theme=light] .btn-primary {
    --bs-btn-color: #000000;
    --bs-btn-bg: #40961a;
    --bs-btn-border-color: #000000;
    --bs-btn-hover-color: #000000;
    --bs-btn-hover-bg: #4db620;
    --bs-btn-hover-border-color: #000000;
    --bs-btn-active-color: #daa520;
    --bs-btn-active-bg: #000000;
    --bs-btn-active-border-color: #daa520;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #2a9fd6;
    --bs-btn-disabled-border-color: #2a9fd6;
  }

/* secondary is the item categories on edit price list */
[data-bs-theme=light] .btn-secondary {
    --bs-btn-bg: #fff;
    --bs-btn-border-color: #eeeeee;
    border-radius: 0px;
    border-top: 0px;
    border-right: 0px;
    border-left: 0px;
}

  [data-bs-theme=light] .btn-info {
    --bs-btn-color: #daa520;
    --bs-btn-bg: #000000;
    --bs-btn-border-color: #daa520;
    --bs-btn-hover-color: #000000;
    --bs-btn-hover-bg: #ffc226;
    --bs-btn-hover-border-color: #000000;
    --bs-btn-focus-shadow-rgb: 168, 82, 212;
    --bs-btn-active-color: #000000;
    --bs-btn-active-bg: #daa520;
    --bs-btn-active-border-color: #daa520;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #420063;
}

[data-bs-theme=light] .btn-warning {
    --bs-btn-color: #000000;
    --bs-btn-bg: #dbc824;
    --bs-btn-border-color: #000000;
    --bs-btn-hover-color: #000000;
    --bs-btn-hover-bg: #f7e228;
    --bs-btn-hover-border-color: #000000;
    --bs-btn-focus-shadow-rgb: 168, 82, 212;
    --bs-btn-active-color: #daa520;
    --bs-btn-active-bg: #000000;
    --bs-btn-active-border-color: #daa520;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #420063;
    --bs-btn-disabled-border-color: #93c;
}

[data-bs-theme=light] .btn-success {
    --bs-btn-color: #ffffff;
    --bs-btn-bg: #000000;
    --bs-btn-border-color: #000000;
    --bs-btn-hover-color: #000000;
    --bs-btn-hover-bg: #ffffff;
    --bs-btn-hover-border-color: #000000;
    --bs-btn-focus-shadow-rgb: 168, 82, 212;
    --bs-btn-active-color: #000000;
    --bs-btn-active-bg: #dbc824;
    --bs-btn-active-border-color: #dbc824;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #420063;
    --bs-btn-disabled-border-color: #93c;
}

[data-bs-theme=light] .btn-delete {
    --bs-btn-color: #cc0000;
    --bs-btn-bg: #000000;
    --bs-btn-border-color: #cc0000;
    --bs-btn-hover-color: #000000;
    --bs-btn-hover-bg: #cc0000;
    --bs-btn-hover-border-color: #000000;
    --bs-btn-focus-shadow-rgb: 168, 82, 212;
    --bs-btn-active-color: #000000;
    --bs-btn-active-bg: #a30000;
    --bs-btn-active-border-color: #a30000;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #420063;
    --bs-btn-disabled-border-color: #93c;
}

[data-bs-theme=light] .alert-primary {
    background-color: #3b3b3b;
  }

[data-bs-theme=light] #checkbox {
    accent-color: #252525;
  }

[data-bs-theme=light] .nav-tabs .nav-link,
.nav-pills .nav-link {
  color: #fff;
  background-color: #000000;
}

[data-bs-theme=light] .nav-tabs .nav-link:hover,
.nav-pills .nav-link:hover {
  background-color: #282828;
}

[data-bs-theme=light] .nav-tabs .nav-link.disabled, .nav-tabs .nav-link.disabled:hover,
.nav-pills .nav-link.disabled,
.nav-pills .nav-link.disabled:hover {
  color: var(--bs-secondary-color);
  background-color: #000000;
}

[data-bs-theme=light] .nav-tabs .nav-link.active,
.nav-pills .nav-link.active {
  color: #000000;
  background-color: #ffffff;
}
/*LIGHT MODE END*/

/* Dark mode customisation */
[data-bs-theme=dark] {
    --bs-warning-bg-subtle: var(--bs-gold);
    --bs-body-bg: #444444;
    --bs-body-color: #ffffff;
    --bs-link-color: #ffffff;
    --bs-link-hover-color: var(--bs-gold);
    --te-card-bg: #282828;
    --te-card-cap-bg: #000000;
    --te-card-cap-color: #ffffff;
    --te-card-color: #ffffff;
    --te-card-cap-color-inv: var(--bs-gold);
    --te-card-cap-bg-inv: #000;
    --te-card-cap-color-welcome: #ffffff;
    --bs-item-name-color: #000000;
    --bs-border-radius: 0.375rem;
    --bs-footer-copyright: #ffffff;
}

[data-bs-theme=dark] .text-info {
    color: #9e9e9e !important;
  }

[data-bs-theme=dark] .form-control {
    color: #ffffff;
    background-color: #000000;
    border: 0 solid #fff !important;
}

[data-bs-theme=dark] .price-edit {
    color: #ffffff;
    background-color: #000000;
    border: 1px solid #ffffff !important;
}

[data-bs-theme=dark] input::placeholder {
    color: #bbbbbb;
}

[data-bs-theme=dark] .form-control:focus {
    color: #ffffff;
    background-color: #000000;
    border-color: 0 solid #fff !important;
    outline: 0;
    box-shadow: 0 0 0 0.1rem #daa520;
}

[data-bs-theme=dark] .price-edit:focus {
    color: #ffffff;
    background-color: #000000;
    border: 1px solid #ffffff !important;
    box-shadow: 0 0 0 0 transparent;
}

[data-bs-theme=dark] .btn-primary {
    --bs-btn-color: #000000;
    --bs-btn-bg: #40961a;
    --bs-btn-border-color: #000000;
    --bs-btn-hover-color: #000000;
    --bs-btn-hover-bg: #4db620;
    --bs-btn-hover-border-color: #ffffff;
    --bs-btn-focus-shadow-rgb: 74, 173, 220;
    --bs-btn-active-color: #daa520;
    --bs-btn-active-bg: #000000;
    --bs-btn-active-border-color: #daa520;
}

/* secondary is the item categories on edit price list */
[data-bs-theme=dark] .btn-secondary {
    --bs-btn-bg: #282828;
    --bs-btn-border-color: #444444;
    border-radius: 0px;
    border-top: 0px;
    border-right: 0px;
    border-left: 0px;
}

[data-bs-theme=dark] .btn-info {
    --bs-btn-color: #daa520;
    --bs-btn-bg: #000000;
    --bs-btn-border-color: #daa520;
    --bs-btn-hover-color: #000000;
    --bs-btn-hover-bg: #ffc226;
    --bs-btn-hover-border-color: #000000;
    --bs-btn-focus-shadow-rgb: 168, 82, 212;
    --bs-btn-active-color: #000000;
    --bs-btn-active-bg: #daa520;
    --bs-btn-active-border-color: #daa520;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #420063;
}

[data-bs-theme=dark] .btn-warning {
    --bs-btn-color: #dbc824;
    --bs-btn-bg: #000000;
    --bs-btn-border-color: #dbc824;
    --bs-btn-hover-color: #000000;
    --bs-btn-hover-bg: #dbc824;
    --bs-btn-hover-border-color: #dbc824;
    --bs-btn-focus-shadow-rgb: 168, 82, 212;
    --bs-btn-active-color: #000000;
    --bs-btn-active-bg: #dbc824;
    --bs-btn-active-border-color: #dbc824;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #420063;
    --bs-btn-disabled-border-color: #93c;
}

[data-bs-theme=dark] .btn-success {
    --bs-btn-color: #000000;
    --bs-btn-bg: #ffffff;
    --bs-btn-border-color: #ffffff;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: #000000;
    --bs-btn-hover-border-color: #ffffff;
    --bs-btn-focus-shadow-rgb: 168, 82, 212;
    --bs-btn-active-color: #000000;
    --bs-btn-active-bg: #dbc824;
    --bs-btn-active-border-color: #dbc824;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #420063;
    --bs-btn-disabled-border-color: #93c;
}

[data-bs-theme=dark] .btn-delete {
    --bs-btn-color: #cc0000;
    --bs-btn-bg: #000000;
    --bs-btn-border-color: #cc0000;
    --bs-btn-hover-color: #000000;
    --bs-btn-hover-bg: #cc0000;
    --bs-btn-hover-border-color: #000000;
    --bs-btn-focus-shadow-rgb: 168, 82, 212;
    --bs-btn-active-color: #000000;
    --bs-btn-active-bg: #a30000;
    --bs-btn-active-border-color: #a30000;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #420063;
    --bs-btn-disabled-border-color: #93c;
}

[data-bs-theme=dark] .table-bordered {
    --bs-table-border-color: #ffffff;
}

[data-bs-theme=dark] .alert-primary {
    background-color: #000;
}

[data-bs-theme=dark] #checkbox {
    accent-color: #ffffff;
}

[data-bs-theme=dark] .nav-tabs .nav-link,
.nav-pills .nav-link {
  color: #fff;
  background-color: #000000;
}

[data-bs-theme=dark] .nav-tabs .nav-link:hover,
.nav-pills .nav-link:hover {
  color: #000000;
  background-color: #cfcfcf;
}

[data-bs-theme=dark] .nav-tabs .nav-link.disabled, .nav-tabs .nav-link.disabled:hover,
.nav-pills .nav-link.disabled,
.nav-pills .nav-link.disabled:hover {
  color: var(--bs-secondary-color);
  background-color: #000000;
}

[data-bs-theme=dark] .nav-tabs .nav-link.active,
.nav-pills .nav-link.active {
  color: #000000;
  background-color: #ffffff;
}

/*DARK MODE END*/

/*OVERIDES CYBORG PROPERTIES*/
h6, .h6, h5, .h5, h4, .h4, h3, .h3, h2, .h2, h1, .h1 {
    margin-bottom: 0rem;
}

p {
    margin-bottom: 0.25rem;
  }

a {
    color: var(--bs-link-color);

}
a:hover {
    --bs-link-color: var(--bs-link-hover-color);
  }

thead,
tbody,
tfoot,
tr,
td,
th {
  vertical-align: middle;
}

.alert-warning {
  background-color: #daa520;
}

.table {
    --bs-table-color: var(--bs-body-color);
    --bs-table-bg: var(--te-card-bg);
    --bs-table-hover-color: var(--bs-gold);
    --bs-table-hover-bg: var(--bs-card-cap-bg-inv);
}

.table > :not(caption) > * > * {
    box-shadow: none;
 }

.card {
  color: var(--bs-body-color);
  background-color: var(--te-card-bg);
}

.card-body {
    color: var(--te-card-color);
  }

.card-header {
    color: var(--te-card-cap-color);
    background-color: var(--te-card-cap-bg);
    text-align: center;
}

.card-header-inv {
    color: var(--te-card-cap-color-inv);
    background-color: var(--te-card-cap-bg-inv);
    text-align: center;
    border-radius: var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0;
  }


.card-footer {
    color: var(--te-card-cap-color);
    background-color: var(--te-card-cap-bg);
    font-size: 0.75rem !important;
    text-align: center;
  }

.card-footer a{
    color: var(--te-card-cap-color);
}

.alert {
    text-align: center;
}

.list-group {
    --bs-list-group-bg: none ;
}

.text-muted {
    --bs-text-opacity: none;
    color: none !important;
    }

.alert-warning {
    background-color: none;
}

/* Buttons */
.btn {
    --bs-btn-color: var(--bs-body-color);
    display: inline-block;
    color: var(--bs-btn-color);
    border: var(--bs-btn-border-width) solid var(--bs-btn-border-color);
    background-color: var(--bs-btn-bg);
}

.btn:hover {
    color: var(--bs-btn-hover-color);
    background-color: var(--bs-btn-hover-bg);
    border-color: var(--bs-btn-hover-border-color);
}

.btn-check + .btn:hover {
    color: var(--bs-btn-color);
    background-color: var(--bs-btn-bg);
    border-color: var(--bs-btn-border-color);
}

.btn:focus-visible {
    color: var(--bs-btn-hover-color);
    background-color: var(--bs-btn-hover-bg);
    border-color: var(--bs-btn-hover-border-color);
    outline: 0;
    box-shadow: var(--bs-btn-focus-box-shadow);
}

/* Popup container - can be anything you want */
.popup {
    position: relative;
    display: inline-block;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }

  /* The actual popup */
  .popup .popuptext {
    visibility: hidden;
    width: 250px;
    background-color: #fff;
    color: #000;
    text-align: center;
    text-wrap: wrap;
    border-radius: 6px;
    border: 1px solid #000000;
    padding: 8px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -80px;
  }

  /* Toggle this class - hide and show the popup */
  .popup .show {
    visibility: visible;
    -webkit-animation: fadeIn 1s;
    animation: fadeIn 1s;
  }

  /* FOOTER */
  .discord-logo {
      filter: brightness(1.5) contrast(0.9);  /* Brighter but slightly less contrast */
  }

  .footer-copyright {
    color: var(--bs-footer-copyright);
  }

/* VIEW TOGGLER STYLES */
.view-toggler {
    text-decoration: none;
    cursor: pointer;
}

.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.list-view {
    grid-template-columns: 1fr;
}
/* END VIEW TOGGLER STYLES */

/* LISTING STYLES */
.listing-container .card {
    border-radius: 0px !important;
}

.listing-container {
    column-gap: 1px;
    display: grid;
    padding-bottom: 20px;
    position: relative;
    row-gap: 1px;
}

.listing-container .listing-discount {
    position: absolute;
    margin-left: 5px;
    margin-top: 3px;
    padding-left: 5px;
    padding-right: 5px;
    padding-top: 2px;
    padding-bottom: 2px;
}

.listing-container .card-text.red {
    background: rgb(255, 0, 0);
    background: radial-gradient(circle, rgb(106 0 0) 0%, rgba(255, 255, 255, 0) 100%);
    border: 2px solid #620000;
}

.listing-container .card-text.yellow {
    background: rgb(239 255 0);
    background: radial-gradient(circle, rgb(140 121 0) 0%, rgba(255, 255, 255, 0) 100%);
    border: 2px solid #736700;
}

.listing-container .card-text.orange {
    background: rgb(255 177 0);
    background: radial-gradient(circle, rgb(106 69 0) 0%, rgba(255, 255, 255, 0) 100%);
    border: 2px solid #764d01;
}

.listing-container .listing-bonus {
    margin-top: 5px;
    padding-left: 5px;
    padding-right: 5px;
    padding-top: 2px;
    padding-bottom: 1px;
    font-size:12px;
    color: #0e0e0e;
}

.listing-container .listing-stats {
    font-size:12px;
}

.listing-container .listing-value {
    font-size:10px;
}

.listing-container .listing-category {
    font-size:12px;
}

.listing-container .listing-player {
    font-size:12px;
}

.listing-container .listing-player span {
    text-decoration:underline;
}

.listing-pagination {
    font-size:12px;
}

.listing-header {
    background-color:#282828; margin-left:1px; margin-right:1px; margin-bottom:2px;
}

.listing-section {
    display: grid;grid-template-columns: repeat(5, 1fr);grid-template-rows: repeat(5, 1fr); gap: 2px;
}

.listing-filters {
    grid-row: span 5 / span 5; background-color:#282828;
}

.listing-wrapper {
    grid-column: span 4 / span 4; grid-row: span 5 / span 5;
}

.listing-container.list-view .card-text {
    display: flex !important;
    justify-content: space-between;
    align-content: stretch;
    align-items: center;
    padding-right:10px;
}

@media (max-width: 575.98px) {
    .listing-container.list-view .card-text {
        display: block !important;
        justify-content: space-between;
        align-content: stretch;
        align-items: center;
        padding-right: 10px;
    }
}
/* END LISTING STYLES */

/* TABLE STYLES */

#alltradereceipts {
    width: 100%;
}

#alltradereceipts td, #alltradereceipts th {
    border: 0x solid #ddd;
    padding: 8px;
}

#alltradereceipts tr{
    background-color: var(--te-card-bg);
    border-radius: 10px;
}

#alltradereceipts tr:hover {
    color: var(--bs-gold);
}

#alltradereceipts th {
    padding-top: 12px;
    padding-bottom: 12px;
    text-align: left;
    background-color: var(--te-card-cap-bg);
    color: var(--te-card-cap-color);
}

#alltradereceipts tr:first-child th:first-child {
    border-top-left-radius: var(--bs-border-radius);
}

#alltradereceipts tr:first-child th:last-child {
    border-top-right-radius: var(--bs-border-radius);
}

#alltradereceipts tr:last-child td:first-child {
    border-bottom-left-radius: var(--bs-border-radius);
}

#alltradereceipts tr:last-child td:last-child {
    border-bottom-right-radius: var(--bs-border-radius);
}

/* END TABLE STYLES */

/* RW LISTING STYLES */
.listing-layout {
    background: #1d2021;
    display: flex;
    flex: 1;
    flex-direction: column;
    /*margin: 120px auto 0;*/
    padding: 0 20px;
    position: relative;
    width: 100%;
    z-index: 1;
}

[data-bs-theme=light] .listing-layout {
    background: #dddddd;
}

.catalog .filter-container {
    transform: translateZ(0);
    height: 100%;
    width:0;
    display:none;
}

.catalog .filter-container .filter-list {
    background: #2b2f30;
    margin-right: 2px;
    margin-top: 2px;
    transform: translateZ(0);
    height: 100%;
}

[data-bs-theme=light] .catalog .filter-container .filter-list {
    background: #ffffff;
}

.catalog .filter-container .filter-list .filter-wrapper {
    display: flex;
    flex-direction: column;
    position: relative;
}

.catalog .catalog-content {
    display: flex;
    flex: 1 1;
    flex-direction: column;
    margin-top: 2px;
}

.catalog .catalog-header {
    border-bottom: 2px solid #1d2021;
    position: relative;
    width: 100%;
}

[data-bs-theme=light] .catalog .catalog-header {
    border-bottom: 2px solid #dddddd;
}

.catalog .catalog-header-content {
    align-items: center;
    background: #2b2f30;
    display: flex;
    height: 60px;
    justify-content: space-between;
    padding: 0 30px;
    position: relative;
}

[data-bs-theme=light] .catalog .catalog-header-content {
    background: #ffffff;
}

.catalog .catalog-header-content .catalog-header-left {
    align-items: center;
    display: flex;
    flex: 1;
}

.catalog .catalog-header-content .catalog-header-right {
    align-items: center;
    display: flex;
}

.catalog .catalog-items {
    column-gap: 2px;
    display: grid;
    padding-bottom: 30px;
    position: relative;
    row-gap: 2px;
}

.catalog .catalog-items.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.catalog .catalog-items .catalog-item {
    position: relative;
    z-index: 70;
}

.catalog .catalog-items .catalog-item:hover {
    z-index: 99;
}

.catalog .catalog-items .catalog-item:hover .catalog-item-effect {
    transform: translateY(-25px);
    box-shadow: 0px 0px 8px 5px #252525;
}

[data-bs-theme=light] .catalog .catalog-items .catalog-item:hover .catalog-item-effect {
    box-shadow: 0px 0px 8px 5px #616161;
}

.catalog .catalog-items .catalog-item:hover .item-actions-expander {
    transform: translateY(25px);
    display: flex;
    z-index: 98;
}

.catalog .catalog-items .catalog-item .catalog-item-effect {
    background: #2b2f30;
    box-shadow: none;
    cursor: pointer;
    height: 100%;
    position: relative;
    transition: transform .2s ease, filter .2s ease, background-color .2s ease, box-shadow .2s ease;
    width: 100%;
}

[data-bs-theme=light] .catalog .catalog-items .catalog-item .catalog-item-effect {
    background: #ffffff;
}

.catalog .catalog-items .catalog-item .catalog-item-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.catalog .catalog-items .catalog-item .catalog-item-content .catalog-item-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    border-bottom: 5px solid #9c9c9c;
}

.catalog .catalog-items .catalog-item .catalog-item-content .catalog-item-wrapper.Yellow {
    border-bottom: 5px solid rgba(255, 255, 0, 0.4);
    background: radial-gradient(circle, rgba(230, 255, 0, 0.1) 0%, rgba(255, 255, 255, 0) 90%);
}

.catalog .catalog-items .catalog-item .catalog-item-content .catalog-item-wrapper.Orange {
    border-bottom: 5px solid rgba(255, 165, 0, 0.6);
    background: radial-gradient(circle, rgba(255, 165, 0, 0.4) 0%, rgba(255, 255, 255, 0) 90%);
}

.catalog .catalog-items .catalog-item .catalog-item-content .catalog-item-wrapper.Red {
    border-bottom: 5px solid rgba(255, 0, 0, 0.6);
    background: radial-gradient(circle, rgba(255, 0, 0, 0.4) 0%, rgba(255, 255, 255, 0) 90%);
}

.item-actions-expander {
    bottom: 0;
    height: 25px;
    display: none;
    justify-content: space-between;
    left: 0;
    position: absolute;
    right: 0;
    transition: transform .2s ease, z-index 0s;
    z-index: 2;
    /*background-color: #4db5da;*/
    background-color: #171717;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}

[data-bs-theme=light] .item-actions-expander {
    background-color: #afafaf;
}

.item-bonus {
    font-size: 12px;
    color: #0e0e0e;
}

.grid-view .item-image {
    display: block;
}

.grid-view .item-spacer {
    margin-top: 10px;
}

.list-view .catalog-item-details {
    align-items: center;
    flex-direction: row;
    justify-content: flex-start;
    display: flex;
    flex: 1;
}

.list-view .positional {
    flex: 1;
}

.item-rarity-block {
    display: inline-block;
    height: 7px;
    width: 7px;
    margin-bottom: 2px;
    border: 3px;
}

.catalog-item-wrapper.Yellow .item-rarity-block {
    background-color: yellow;
}

.catalog-item-wrapper.Orange .item-rarity-block {
    background-color: orange;
}

.catalog-item-wrapper.Red .item-rarity-block {
    background-color: red;
}

.item-stats {
    /*text-align: center;*/
    flex-basis: min-content !important;
}

.item-stat {
    font-size: 13px;
    color: #cdcdcd;
}

[data-bs-theme=light] .item-stat {
    color: #0e0e0e;
}

.item-type {
    font-size: 12px;
    color: #8f8f8f;
}

[data-bs-theme=light] .item-type {
    color: #0e0e0e;
}

.item-owner {
    font-size: 12px;
    flex-basis: min-content;
}

.item-owner i {
    font-size: 10px;
}

.item-actions-container {
    /*background-color: #4db5da;*/
    background-color: #171717;
}

[data-bs-theme=light] .item-actions-container {
    background-color: #272a2a;
}

.item-actions-container:first-child {
    border-bottom-left-radius: 5px;
}

.item-actions-container:last-child {
    border-bottom-right-radius: 5px;
}

.item-actions-container:hover {
    /*background-color: #46a1c3;*/
    background-color: #353535;
}

[data-bs-theme=light] .item-actions-container:hover {
    background-color: #3f3f3f;
}

.item-add-to-list {
    text-decoration: none;
    color: white;
    font-weight: bold;
}

.item-drop-up-menu {
    bottom: 5px;
    height: 0px;
    display: none;
    justify-content: space-between;
    left: 0;
    position: absolute;
    right: 0;
    transition: height 1s ease;
    z-index: 2;
    background-color: #272a2a;
}

[data-bs-theme=light] .item-drop-up-menu {
    background-color: #272a2a;
}

.list-view .item-stats {
    text-align: end;
}

@media (max-width: 575.98px) {
    .catalog .catalog-items.list-view {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .list-view .item-image {
        display: block;
    }

    .list-view .item-spacer {
        margin-top: 10px;
    }

    .list-view .catalog-item-details {
        align-items: unset;
        flex-direction: unset;
        justify-content: unset;
        display: unset;
        flex: unset;
    }

    .list-view .positional {
        flex: unset;
    }

    .list-view .item-stats {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .listing-layout {
        padding: 0 0px;
    }
}

.filter-container.filter-show {
    width: 270px;
    display: block;
}

.list-view .item-type {
    justify-content: center;
}
/* END RW LISTING STYLES */

/* APEX CHARTS */

.apexcharts-tooltip-active {
    color: black !important;
  }

/* EDIT PRICE LIST — mobile card layout.
   Below md, each item row becomes a self-contained card (image, name,
   values, inputs, effective price) laid out with CSS grid, instead of a
   9-column table that either hides data or scrolls sideways. */
@media (max-width: 767.98px) {
    .edit_table thead {
        display: none;
    }

    .edit_table,
    .edit_table tbody {
        display: block;
        width: 100%;
    }

    .edit_table tr {
        display: grid;
        grid-template-columns: 44px 1fr 1fr 1fr;
        grid-template-areas:
            "img  name name del"
            "img  te   te   te"
            "img  torn torn bazaar"
            "price price margin margin"
            "eff  eff  eff  eff";
        column-gap: 0.6rem;
        row-gap: 0.4rem;
        align-items: center;
        /* the tr also carries Bootstrap's .m-0/.p-0 utility classes (from the
           desktop table markup), whose margin/padding are !important — must
           match or lose the cascade */
        margin: 0 0 1.25rem !important;
        padding: 0.75rem 0.85rem 0.85rem !important;
        border: 1px solid rgba(255, 255, 255, 0.16);
        border-radius: 0.65rem;
        background: rgba(255, 255, 255, 0.03);
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
    }

    .edit_table td {
        display: block;
        width: auto !important;
        padding: 0 !important;
        border: none !important;
        text-align: left;
    }

    .edit_table td.edit_table_image {
        grid-area: img;
        align-self: start;
    }

    .edit_table td.edit_table_image img {
        width: 100% !important;
        max-width: 44px;
        border-radius: 0.3rem;
    }

    .edit_table td.item_name {
        grid-area: name;
        font-weight: 700;
        font-size: 1rem;
        line-height: 1.2;
    }

    .edit_table td[data-label="Delete"] {
        grid-area: del;
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }

    .edit_table td[data-label="Delete"]::before {
        content: "Remove";
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.02em;
        color: rgba(255, 255, 255, 0.5);
        margin-right: 0.4rem;
    }

    .edit_table td.market_value {
        grid-area: te;
        font-size: 0.95rem;
    }

    .edit_table td.market_value::before {
        content: "TE Value  ";
        color: rgba(255, 255, 255, 0.55);
        font-weight: 600;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    .edit_table td.torn_market_value {
        grid-area: torn;
    }

    .edit_table td.bazaar_average {
        grid-area: bazaar;
        text-align: right;
    }

    .edit_table td.torn_market_value,
    .edit_table td.bazaar_average {
        font-size: 0.78rem;
        color: rgba(255, 255, 255, 0.55);
    }

    .edit_table td.torn_market_value::before,
    .edit_table td.bazaar_average::before {
        content: attr(data-label) ": ";
    }

    .edit_table td[data-label="Your Fixed Price"] {
        grid-area: price;
    }

    .edit_table td[data-label="Profit Margin %"] {
        grid-area: margin;
    }

    .edit_table td[data-label="Your Fixed Price"]::before,
    .edit_table td[data-label="Profit Margin %"]::before {
        content: attr(data-label);
        display: block;
        font-size: 0.68rem;
        text-transform: uppercase;
        letter-spacing: 0.02em;
        color: rgba(255, 255, 255, 0.5);
        margin-bottom: 0.2rem;
    }

    .edit_table td .input-group {
        max-width: 100%;
        width: 100%;
    }

    .edit_table td.effective_price {
        grid-area: eff;
        margin-top: 0.25rem;
        padding: 0.45rem 0.6rem !important;
        border-radius: 0.4rem;
        background: rgba(64, 150, 26, 0.15);
        border: 1px solid rgba(64, 150, 26, 0.4) !important;
        font-weight: 700;
        font-size: 1.05rem;
        text-align: center;
    }

    .edit_table td.effective_price::before {
        content: "Effective Price";
        display: block;
        font-size: 0.68rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        color: rgba(255, 255, 255, 0.6);
        margin-bottom: 0.15rem;
    }

    /* keep the card's own drop shadow when a dirty/delete accent is added */
    .edit_table tr.row-dirty {
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5), inset 3px 0 0 var(--bs-warning, #daa520);
    }

    .edit_table tr.marked-for-delete {
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5), inset 3px 0 0 var(--bs-danger, #dc3545);
    }
}

/* EDIT PRICE LIST — unsaved-change indicators, any viewport. */
.edit_table tr.row-dirty {
    box-shadow: inset 3px 0 0 var(--bs-warning, #daa520);
}

.edit_table tr.marked-for-delete {
    box-shadow: inset 3px 0 0 var(--bs-danger, #dc3545);
    opacity: 0.6;
}

/* END APEX CHARTS */