html.battle-loot-mode,
body.battle-loot-mode {
  overflow: hidden !important;
}

body.battle-loot-mode #content {
  min-height: 0;
  overflow: hidden;
}

body.battle-loot-mode #rewardsViewport {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0;
}

body.battle-loot-mode #battleLootSection,
body.battle-loot-mode #battleLootRows {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#rewardsViewport {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 2px 8px;
}

#rewardsViewport > .collapse-area {
  margin-bottom: 0;
  padding: 0 2px 4px !important;
}

.collapse-area {
  background: transparent;
  border-radius: 0;
}

#content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding-left: 2px;
  padding-right: 2px;
  padding-top: 0;
}

.form-group {
  color: white;
  font-size: 16px;
  font-weight: bolder;
}

label {
  color: #fff;
}

.form-control,
.form-select,
.form-select option {
  font-weight: bold;
  background-color: var(--gf-input-bg);
  color: var(--gf-input-text);
  border: 1px solid rgba(215, 155, 66, 0.72);
  border-radius: 7px;
}

.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 2px rgba(215, 155, 66, 0.25), inset 0 1px 2px rgba(89, 56, 30, 0.16);
  border-color: rgba(229, 184, 93, 0.88);
  outline: none;
  background-color: var(--gf-input-bg-focus);
}

.reward-card {
  background: rgba(96, 65, 44, 0.94);
  border: 1px solid rgba(215, 155, 66, 0.52);
  border-radius: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  color: #f7ead5;
  box-shadow: none;
}

.reward-col {
  min-width: 0;
}

.rift-empty-message {
  grid-column: 1 / -1;
  width: 100%;
  margin-bottom: 0;
}

#individualRows,
#bossRows {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 8px;
}

#battleLootRows {
  overflow: hidden;
  --battle-loot-scrollbar-width: 10px;
}

.battle-loot-table-wrap {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-bottom: 0;
  border: 0;
  border-top: 1px solid rgba(215, 155, 66, 0.52);
  border-bottom: 1px solid rgba(215, 155, 66, 0.52);
  border-radius: 0;
  background: transparent;
  color: #f7ead5;
  box-shadow: none;
}

.battle-loot-table-header {
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 2;
  overflow: hidden;
  box-sizing: border-box;
  padding-inline-end: var(--battle-loot-scrollbar-width);
  background: #4f3625;
}

.battle-loot-table-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.battle-loot-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  color: #f7ead5;
  font-size: clamp(11px, 1.2vw, 14px);
}

.battle-loot-table th,
.battle-loot-table td {
  padding: clamp(4px, 0.8vw, 8px) clamp(3px, 1vw, 12px);
  border-bottom: 1px solid rgba(215, 155, 66, 0.34);
  text-align: center;
  vertical-align: middle;
}

.battle-loot-table th {
  background: #4f3625;
  color: #f3c24a;
  font-weight: 900;
  border-bottom: 2px solid rgba(215, 155, 66, 0.52);
  text-shadow: none;
}

.battle-loot-table th:not(:last-child),
.battle-loot-table td:not(:last-child) {
  border-right: 1px solid rgba(215, 155, 66, 0.34);
}

.battle-loot-table th:first-child,
.battle-loot-table td:first-child {
  width: 60%;
  text-align: left;
}

[dir="rtl"] .battle-loot-table th:first-child,
[dir="rtl"] .battle-loot-table td:first-child {
  text-align: right;
}

.battle-loot-table th:nth-child(2),
.battle-loot-table td:nth-child(2),
.battle-loot-table th:nth-child(3),
.battle-loot-table td:nth-child(3) {
  width: 20%;
  white-space: nowrap;
}

.battle-loot-table tbody tr:last-child td {
  border-bottom: 0;
}

.battle-loot-table tbody tr {
  background: linear-gradient(90deg, rgba(79, 54, 37, 0.96), rgba(79, 54, 37, 0.76));
}

.battle-loot-table tbody tr:nth-child(even) {
  background: linear-gradient(90deg, rgba(73, 49, 34, 0.96), rgba(73, 49, 34, 0.74));
}

.battle-loot-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(86, 58, 39, 0.98), rgba(86, 58, 39, 0.82));
}

.battle-loot-name {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.battle-loot-name span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #fff3dc;
  font-weight: 800;
  line-height: 1.15;
}

.battle-loot-icon {
  width: clamp(24px, 3vw, 34px);
  height: clamp(24px, 3vw, 34px);
  flex: 0 0 clamp(24px, 3vw, 34px);
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.battle-loot-value {
  color: #fff3dc;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.battle-loot-table-wrap .filter-empty-message {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f7ead5;
}

@media (max-width: 575px) {
  .battle-loot-table {
    font-size: clamp(9px, 2.8vw, 11px);
  }

  .battle-loot-table th:first-child,
  .battle-loot-table td:first-child {
    width: 58%;
  }

  .battle-loot-table th:nth-child(2),
  .battle-loot-table td:nth-child(2),
  .battle-loot-table th:nth-child(3),
  .battle-loot-table td:nth-child(3) {
    width: 21%;
  }

  .battle-loot-name {
    gap: 4px;
  }

  .battle-loot-icon {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
  }

  .battle-loot-table th,
  .battle-loot-table td {
    padding: 4px 2px;
  }
}

#bossOverviewRows {
  overflow: visible;
}

.boss-overview-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 8px 0;
}

.boss-overview-card {
  background: rgba(79, 54, 37, 0.86);
  border: 0;
  border-top: 1px solid rgba(215, 155, 66, 0.52);
  border-bottom: 1px solid rgba(215, 155, 66, 0.52);
  border-radius: 0;
  overflow: visible;
  min-width: 0;
  color: #f7ead5;
  box-shadow: none;
}

.boss-overview-card:not(.boss-overview-meta):not(.boss-overview-effects-card) .boss-overview-heading {
  text-align: center;
}

.boss-overview-meta,
.boss-overview-effects-card {
  background: rgba(73, 49, 34, 0.84);
}

.boss-overview-grid > .boss-overview-card:not(.boss-overview-meta):not(.boss-overview-effects-card),
.boss-overview-reserve-slot > .boss-overview-card {
  background: rgba(79, 54, 37, 0.86);
}

.boss-overview-card + .boss-overview-card,
.boss-overview-grid > .boss-overview-reserve-slot + .boss-overview-card {
  border-top: 0;
}

.boss-overview-heading {
  margin: 0;
  background: transparent;
  color: var(--gf-gold-strong);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
  padding: 7px 10px;
  border-bottom: 1px solid rgba(215, 155, 66, 0.52);
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: anywhere;
}

.boss-overview-stats {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0;
  padding: 0;
}

@media (min-width: 576px) {
  .boss-overview-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.boss-overview-stat {
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(215, 155, 66, 0.22);
  border-radius: 0;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.boss-overview-stat-key {
  font-size: 0.78rem;
  font-weight: 800;
  color: rgba(247, 234, 213, 0.78);
  line-height: 1.18;
}

.boss-overview-stat-value {
  font-size: 0.92rem;
  font-weight: 900;
  color: #fff3dc;
  line-height: 1.05;
  text-align: right;
  white-space: nowrap;
}

.boss-overview-effects {
  padding: 0;
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0;
}

.boss-overview-empty {
  color: #f7ead5;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px;
}

.boss-overview-effect-stat {
  min-height: 48px;
}

.boss-effect-name {
  flex: 1 1 auto;
  font-size: 0.78rem;
  font-weight: 800;
  color: rgba(247, 234, 213, 0.86);
  line-height: 1.15;
}

.boss-effect-icon-wrap {
  width: 34px;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.boss-effect-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.boss-overview-item-grid {
  padding: 8px 10px;
  min-height: 90px;
  height: auto;
  background: transparent;
  justify-content: safe center;
}

.boss-overview-item-grid.item-grid {
  flex-wrap: wrap;
  align-content: flex-start;
  height: auto;
  overflow-x: hidden;
  overflow-y: visible;
}

.reward-title {
  font-size: 0.9rem;
  font-weight: 900;
  margin: 0;
  color: var(--gf-gold-strong);
  text-transform: uppercase;
  background: transparent;
  border-bottom: 1px solid rgba(215, 155, 66, 0.52);
  padding: 5px 8px;
  letter-spacing: 0.2px;
}

.reward-list {
  margin: 0;
  padding-left: 18px;
  color: #f7ead5;
}

.reward-list li {
  margin-bottom: 2px;
}

.badge-line {
  font-size: 0.73rem;
  color: rgba(247, 234, 213, 0.82);
  margin: 0;
  font-weight: 700;
  padding: 4px 8px;
  background: transparent;
  border-bottom: 1px solid rgba(215, 155, 66, 0.38);
}

.item-grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 8px 8px;
  height: 86px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  background: transparent;
}

.reward-card .item-grid {
  border-top: 1px solid rgba(215, 155, 66, 0.18);
}

#individualSection .item-grid {
  justify-content: safe center;
}

.item-grid::-webkit-scrollbar {
  height: 3px;
}

.item-grid::-webkit-scrollbar-thumb {
  background: rgba(215, 155, 66, 0.72);
  border-radius: 4px;
}

.item-grid::-webkit-scrollbar-track {
  background: rgba(32, 23, 17, 0.32);
}

.item-card {
  width: 72px;
  min-width: 72px;
  height: 72px;
  background: #6b472f;
  border: 1px solid rgba(215, 155, 66, 0.46);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}

.item-card.id-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.item-image-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.item-image {
  width: 42px !important;
  height: 42px !important;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
}

.item-fallback {
  font-size: 10px;
  color: rgba(247, 234, 213, 0.72);
  font-weight: 700;
  text-transform: uppercase;
}

.item-amount {
  width: 100%;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  padding: 0 2px;
  background: rgba(32, 23, 17, 0.74);
  border-top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.item-card[data-name]:hover::after {
  content: attr(data-name);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  max-width: 180px;
  width: max-content;
  background: rgba(32, 22, 15, 0.95);
  color: #f3e0c2;
  font-size: 11px;
  line-height: 1.2;
  padding: 4px 6px;
  border-radius: 4px;
  border: 1px solid rgba(243, 194, 74, 0.45);
  pointer-events: none;
  z-index: 20;
  white-space: normal;
}

.boss-overview-reserve-slot {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.boss-overview-reserve-card,
.boss-overview-reserve-slot > .boss-overview-card {
  border-top: 0;
}

@media (max-width: 768px) {
  #content {
    padding-left: 0;
    padding-right: 0;
  }

  #rewardsViewport {
    padding-left: 0;
    padding-right: 0;
  }

  #bossLevelFilterWrap,
  #bossStageFilterWrap {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .item-grid {
    gap: 5px;
    height: 76px;
  }

  .boss-overview-item-grid {
    min-height: 76px;
    height: auto;
  }

  .item-card {
    width: 64px;
    min-width: 64px;
    height: 64px;
  }

  .item-image {
    width: 36px !important;
    height: 36px !important;
  }

  .item-amount {
    height: 18px;
    font-size: 10px;
  }
}

@media (min-width: 768px) {
  .boss-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .boss-overview-grid > .boss-overview-card {
    border-left: 0;
  }

  .boss-overview-grid > .boss-overview-card:nth-child(2n):not(.boss-overview-meta):not(.boss-overview-effects-card) {
    border-left: 1px solid rgba(215, 155, 66, 0.32);
  }

  .boss-overview-effects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .boss-overview-stats .boss-overview-stat:not(:nth-child(2n)),
  .boss-overview-effects .boss-overview-stat:not(:nth-child(2n)) {
    border-right: 1px solid rgba(215, 155, 66, 0.22);
  }

  .boss-overview-meta,
  .boss-overview-effects-card {
    grid-column: span 2;
  }

  .boss-overview-meta,
  .boss-overview-effects-card {
    border-left: 0 !important;
  }

  #bossRows {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #individualRows {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  .boss-overview-grid > .boss-overview-reserve-card,
  .boss-overview-reserve-slot {
    grid-column: 1 / span 2;
    width: calc(50% - 4px);
    justify-self: center;
  }

  .boss-overview-reserve-slot {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .boss-overview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .boss-overview-grid > .boss-overview-card {
    border-left: 0;
  }

  .boss-overview-grid > .boss-overview-card:nth-child(3) {
    border-left: 0;
  }

  .boss-overview-grid > .boss-overview-card:nth-child(4),
  .boss-overview-grid > .boss-overview-card:nth-child(5),
  .boss-overview-grid > .boss-overview-card:nth-child(6),
  .boss-overview-reserve-slot > .boss-overview-card + .boss-overview-card {
    border-left: 1px solid rgba(215, 155, 66, 0.32);
  }

  .boss-overview-meta,
  .boss-overview-effects-card {
    grid-column: span 4;
  }

  .boss-overview-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .boss-overview-effects {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .boss-overview-stats .boss-overview-stat:not(:nth-child(2n)),
  .boss-overview-effects .boss-overview-stat:not(:nth-child(2n)) {
    border-right: 0;
  }

  .boss-overview-stats .boss-overview-stat:not(:nth-child(4n)),
  .boss-overview-effects .boss-overview-stat:not(:nth-child(3n)) {
    border-right: 1px solid rgba(215, 155, 66, 0.22);
  }

  .boss-overview-grid > .boss-overview-reserve-card,
  .boss-overview-reserve-slot {
    grid-column: 2 / span 2;
  }

  .boss-overview-reserve-slot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  #individualRows {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  #individualRows {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}


