.reward-detail-placeholder {
  color: #433120;
  font-size: 42px;
  font-weight: 900;
}

[data-reward-detail] {
  cursor: pointer;
}

.loot-reward-clickable {
  cursor: pointer;
}

.loot-reward-clickable:focus-visible {
  outline: 2px solid #f4c74d;
  outline-offset: 2px;
}

:root {
  --rarity-common: rgb(178, 178, 178);
  --rarity-rare: rgb(160, 217, 72);
  --rarity-epic: rgb(201, 134, 255);
  --rarity-legendary: rgb(247, 148, 32);
}

.lootbox-modal {
  --gf-modal-width: min(800px, calc(100% - 20px));
}

.lootbox-modal-body {
  padding: 0;
  max-height: 450px;
  min-height: 450px;
  overflow-y: auto;
  background: #60412c;
}

.lootbox-modal-body::-webkit-scrollbar {
  width: 10px;
}

.lootbox-modal-body::-webkit-scrollbar-thumb {
  background-color: rgba(215, 155, 66, 0.72);
  border-radius: 5px;
}

.lootbox-modal-body::-webkit-scrollbar-track {
  background-color: rgba(32, 23, 17, 0.36);
}

.loot-row {
  position: relative;
  display: grid;
  grid-template-columns: 130px 100px 1fr;
  align-items: center;
  min-height: 72px;
  background: #60412c;
  border-bottom: 1px solid rgba(215, 155, 66, 0.38);
}

.loot-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
}

.loot-row.rarity-common::before {
  background-color: var(--rarity-common);
}

.loot-row.rarity-rare::before {
  background-color: var(--rarity-rare);
}

.loot-row.rarity-epic::before {
  background-color: var(--rarity-epic);
}

.loot-row.rarity-legendary::before {
  background-color: var(--rarity-legendary);
}

.loot-rarity {
  padding-left: 18px;
  font-size: 18px;
  font-weight: bold;
  color: #f5e6cf;
  white-space: nowrap;
}

.loot-chance {
  text-align: center;
  font-size: 15px;
  font-weight: bold;
  color: #f5e6cf;
  white-space: nowrap;
}

.loot-rewards {
  display: flex;
  gap: 10px;
  padding: 8px 14px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
}

.loot-rewards::-webkit-scrollbar {
  height: 3px;
}

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

.loot-rewards::-webkit-scrollbar-track {
  background: rgba(32, 23, 17, 0.36);
}

.loot-reward {
  width: 64px;
  height: 64px;
  background: #6b472f;
  border: 1px solid rgba(215, 155, 66, 0.62);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-sizing: border-box;
}

.loot-reward img,
.loot-reward canvas {
  width: 40px;
  height: 40px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
}

.loot-reward canvas {
  width: 40px !important;
  height: 40px !important;
}

.loot-amount {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18px;
  background: rgba(45, 30, 20, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom-right-radius: 6px;
  border-bottom-left-radius: 6px;
}

.loot-amount span {
  font-size: 13px;
  font-weight: bold;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.lootbox-modal,
.lootbox-modal-body {
  overflow-x: hidden;
}

.unit-stats-modal {
  --gf-modal-width: min(560px, calc(100% - 20px));
}

.reward-info-card-modal {
  --gf-modal-width: min(650px, calc(100% - 20px));
}

.reward-info-card-modal-body {
  padding: 0;
  max-height: min(78vh, 720px);
  overflow-y: auto;
  background: #60412c;
}

.reward-equipment-modal .reward-info-card-modal-body {
  display: flex;
  height: min(20vh, 360px);
  min-height: 190px;
  max-height: min(58vh, 360px);
  align-items: stretch;
  background: #60412c;
}

.reward-info-card {
  color: #f7ead5;
  min-height: 0;
  border-radius: 0 0 8px 8px;
  background: #60412c;
}

.reward-info-card .card-table {
  color: #f7ead5;
  font-size: 14px;
  text-align: center;
}

.reward-info-card .card-cell {
  padding: 5px 6px;
  text-align: center;
}

.reward-info-card .box-content hr,
.reward-info-card hr {
  width: 100%;
  border: 0;
  border-top: 1px solid rgba(215, 155, 66, 0.42) !important;
  opacity: 1 !important;
  margin: 0;
}

.reward-info-card .border-end {
  border-right: 1px solid rgba(215, 155, 66, 0.42) !important;
}

.reward-info-card .border-top,
.reward-info-card .border-bottom {
  border-color: rgba(215, 155, 66, 0.42) !important;
}

.reward-info-card .card-section {
  padding: 7px 8px;
}

.reward-info-card .card-section-title {
  color: #f3c24a;
  font-size: 15px;
  font-weight: 900;
  text-align: left;
  margin: 0 0 5px;
}

.reward-info-card .level-selector {
  background: rgba(32, 23, 17, 0.28);
  border-radius: 0;
  border-bottom: 1px solid rgba(215, 155, 66, 0.52);
  color: #f3c24a;
  font-weight: bold;
  min-height: 30px;
  padding: 2px 6px;
  user-select: none;
  font-size: 0.9rem;
  line-height: 1.2;
  box-shadow: none;
}

.reward-info-card .level-selector strong {
  line-height: 1.2;
}

.reward-info-card .effect-icon {
  width: 20px;
  height: auto;
  vertical-align: middle;
  margin-right: 2px;
}

.reward-info-card .bi-zoom-in {
  color: #f7ead5;
  font-size: 1.2rem;
}

.reward-info-card .reward-detail-effects {
  text-align: left;
}

.reward-effect-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.reward-effect-row {
  position: relative;
  margin: 0;
  padding-left: 12px;
  color: #f7ead5;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}

.reward-effect-row::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 50%;
  width: 5px;
  height: 5px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 0;
  background: transparent;
  transform: translateY(-50%) rotate(45deg);
}

.reward-info-card .max-bonus {
  font-style: italic;
  color: rgba(247, 234, 213, 0.76);
  font-size: 12px;
  white-space: nowrap;
}

.reward-decoration-modal .reward-effect-row .effect-amount {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  vertical-align: baseline;
}

.reward-decoration-modal .reward-info-card-modal-card,
.reward-construction-modal .reward-info-card-modal-card,
.unit-stats-modal .unit-stats-modal-card {
  border-color: rgba(215, 155, 66, 0.62);
}

.reward-decoration-modal .reward-info-card-modal-card {
  background: #60412c;
  border-radius: 8px;
}

.reward-decoration-modal .reward-info-card-modal-body {
  max-height: min(78vh, 720px);
  background: #60412c;
}

.reward-decoration-modal .reward-info-card {
  background: #60412c;
  border-radius: 8px;
  overflow: hidden;
}

.reward-decoration-modal .reward-info-image-cell,
.reward-construction-modal .reward-info-image-cell {
  background: transparent;
  min-height: 124px;
}

.reward-decoration-modal .reward-info-image-cell .image-wrapper,
.reward-construction-modal .reward-info-image-cell .image-wrapper {
  width: 100%;
  min-height: 118px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reward-decoration-modal .card-image,
.reward-construction-modal .card-image {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 118px;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.42));
}

.reward-construction-modal .ci-title {
  margin: 0;
  padding: 4px 6px;
  color: #f3c24a;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-shadow: none;
}

.reward-construction-modal .reward-info-card-modal-body,
.reward-construction-modal .reward-info-card {
  background: #60412c;
}

.reward-construction-modal .level-selector {
  background: #4f3625;
  border-bottom: 1px solid rgba(215, 155, 66, 0.34);
  color: #f3c24a;
  min-height: 34px;
  padding: 0;
  font-size: 14px;
  font-weight: 800;
}

.reward-construction-modal .level-selector > div {
  flex: 1 1 auto;
  padding: 4px 8px;
  text-align: center;
  line-height: 1.15;
}

.reward-construction-modal .card-table {
  color: #f7ead5;
  border-top: 0 !important;
  background: #60412c;
}

.reward-construction-modal .ci-image {
  min-height: 118px;
}

.reward-construction-modal .tci-modal-id-badge {
  position: absolute;
  left: 4px;
  bottom: 3px;
  z-index: 2;
  max-width: calc(100% - 8px);
  overflow: hidden;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(35, 25, 18, 0.62);
  color: #f3c24a;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
}

.reward-construction-modal .tci-info-content-cell {
  padding: 0;
  background: #60412c;
}

.reward-construction-modal .tci-info-grid {
  min-height: 100%;
}

.reward-construction-modal .tci-info-grid > hr {
  width: 100%;
  height: 1px;
  border: 0 !important;
  background: rgba(215, 155, 66, 0.34);
  opacity: 1 !important;
  margin: 0;
  flex: 0 0 auto;
}

.reward-construction-modal .tci-info-cell {
  display: flex;
  min-width: 0;
  flex: 1 1 0;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 7px 8px;
  color: #fff3dc;
  background: #60412c;
}

.reward-construction-modal .tci-info-icon {
  display: inline-flex;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
}

.reward-construction-modal .tci-info-icon img {
  max-width: 23px;
  max-height: 23px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.reward-construction-modal .tci-info-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  line-height: 1.05;
}

.reward-construction-modal .tci-info-text strong {
  color: rgba(247, 234, 213, 0.78);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

.reward-construction-modal .tci-info-value {
  color: #fff3dc;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.12;
  text-align: left;
  max-width: 100%;
  overflow: visible;
  overflow-wrap: anywhere;
  white-space: nowrap;
}

.reward-construction-modal .tci-info-value-small {
  font-size: 11px;
  font-weight: 750;
  line-height: 1.08;
  white-space: normal;
}

.reward-decoration-modal .deco-modal-id-badge {
  position: absolute;
  left: 4px;
  bottom: 3px;
  z-index: 2;
  max-width: calc(100% - 8px);
  overflow: hidden;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(35, 25, 18, 0.62);
  color: #f3c24a;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
}

.reward-decoration-modal .reward-info-content-cell {
  padding: 0;
  position: relative;
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

.reward-decoration-modal .reward-info-content-cell::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(50% - 0.5px);
  width: 1px;
  background: rgba(215, 155, 66, 0.42);
  pointer-events: none;
  z-index: 10;
}

.reward-decoration-modal .deco-stat-grid > .row {
  flex: 1 1 0;
  min-height: 0;
}

.reward-decoration-modal .deco-stat-grid > hr {
  width: 100%;
  height: 1px;
  border: 0 !important;
  background: rgba(215, 155, 66, 0.34);
  opacity: 1 !important;
  margin: 0;
}

.reward-decoration-modal .stat-cell {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
  padding: 4px 8px;
  color: #fff3dc;
  font-weight: 900;
  line-height: 1.2;
}

.reward-decoration-modal .stat-cell.border-end {
  border-right: 0 !important;
}

.reward-decoration-modal .stat-icon-box {
  display: inline-flex;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
}

.reward-decoration-modal .stat-icon-box img,
.reward-decoration-modal .stat-value img {
  max-width: 23px;
  max-height: 23px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.reward-decoration-modal .stat-icon-box img + img,
.reward-decoration-modal .stat-value img + img {
  margin-left: -7px;
}

.reward-decoration-modal .stat-text {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  max-width: calc(100% - 36px);
  overflow: hidden;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  line-height: 1.05;
  gap: 1px;
}

.reward-decoration-modal .stat-text strong {
  color: rgba(247, 234, 213, 0.78);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.reward-decoration-modal .stat-text .stat-value {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 3px;
  color: #fff3dc;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.12;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  white-space: nowrap;
}

.reward-decoration-modal .stat-cell.is-multi-currency .stat-icon-box {
  display: none;
}

.reward-decoration-modal .stat-cell.is-multi-currency .stat-text {
  max-width: 100%;
}

.reward-decoration-modal .sale-price-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.reward-decoration-modal .sale-price-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.reward-decoration-modal .sale-price-row img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.reward-construction-modal .reward-info-content-cell strong {
  display: block;
  margin-bottom: 2px;
  color: rgba(247, 234, 213, 0.74);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
}

.reward-decoration-modal .effect-icon,
.reward-construction-modal .effect-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  margin-right: 3px;
  vertical-align: -4px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.reward-decoration-modal .reward-detail-effects,
.reward-construction-modal .reward-detail-effects {
  border-top: 1px solid rgba(215, 155, 66, 0.52) !important;
  background: transparent;
}

.reward-decoration-modal .reward-detail-effects {
  padding: 6px 8px 7px;
}

.reward-decoration-modal .card-section-title {
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(215, 155, 66, 0.34);
}

.reward-decoration-modal .reward-effect-row {
  line-height: 1.28;
  padding-block: 2px;
}

.reward-construction-modal .reward-info-content-cell .card-cell {
  min-height: 46px;
}

.reward-equipment-modal .reward-equipment-card.box-content {
  flex: 1 1 auto;
  align-self: stretch;
  display: grid;
  flex-direction: initial;
  justify-content: initial;
  grid-template-columns: 86px 1fr;
  grid-template-rows: minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  height: 100%;
  min-height: 190px;
  padding: 10px 12px;
  background: #60412c;
  color: #f7ead5;
  align-items: center;
  align-content: center;
  border-radius: 0 0 8px 8px;
}

.reward-equipment-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
}

.reward-equipment-image {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reward-equipment-image img,
.reward-equipment-image canvas {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border: 2px solid #d44646;
  border-radius: 2px;
  background: rgba(25, 18, 13, 0.42);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.reward-equipment-image canvas {
  width: 54px !important;
  height: 54px !important;
}

.reward-alliance-layout-modal .reward-equipment-image img,
.reward-alliance-layout-modal .reward-equipment-image canvas {
  border: 0;
  box-shadow: none;
}

.reward-equipment-content {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: center;
  height: fit-content;
  max-height: 100%;
  overflow: visible;
}

.reward-equipment-effects {
  margin: 0;
  padding: 0;
  list-style: none;
  color: #f7ead5;
  font-size: 12px;
  line-height: 1.35;
}

.reward-equipment-effects li {
  margin: 1px 0;
  font-size: 12px;
}

.reward-equipment-sell-value {
  width: fit-content;
  margin: 6px 0 0;
  padding: 3px 8px;
  border: 1px solid rgba(243, 194, 74, 0.45);
  border-radius: 999px;
  background: rgba(67, 51, 38, 0.52);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #fff4dc;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.55);
}

.reward-equipment-sell-value img {
  width: 13px;
  height: 13px;
  object-fit: contain;
}

.unit-stats-modal-body {
  padding: 0;
  background: #60412c;
}

.unit-modal-list {
  min-height: 286px;
  max-height: none;
  overflow-y: auto;
  padding-right: 0;
  flex: 1;
}

.unit-modal-layout {
  display: flex;
  gap: 0;
  align-items: center;
  background: #60412c;
}

.unit-modal-row {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(215, 155, 66, 0.34);
  padding: 8px 10px;
}

.unit-modal-row:last-child {
  border-bottom: 0;
}

.unit-modal-label {
  color: rgba(247, 234, 213, 0.78);
  font-weight: 700;
}

.unit-modal-value {
  color: #fff3dc;
  font-weight: 900;
}

.stat-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
  flex: 0 0 18px;
  min-width: 18px;
  min-height: 18px;
}

.unit-modal-list::-webkit-scrollbar,
.reward-info-card-modal-body::-webkit-scrollbar {
  width: 8px;
}

.unit-modal-list::-webkit-scrollbar-thumb,
.reward-info-card-modal-body::-webkit-scrollbar-thumb {
  background: rgba(215, 155, 66, 0.72);
  border-radius: 5px;
}

.unit-modal-list::-webkit-scrollbar-track,
.reward-info-card-modal-body::-webkit-scrollbar-track {
  background: rgba(32, 23, 17, 0.36);
}

@media (max-width: 768px) {
  .loot-row {
    grid-template-columns: 76px 50px 1fr;
  }

  .loot-rarity {
    font-size: 12px;
  }

  .loot-chance {
    font-size: 12px;
  }

  .loot-reward {
    width: 50px;
    height: 50px;
    min-width: 50px !important;
    min-height: 50px !important;
  }

  .loot-reward img,
  .loot-reward canvas {
    width: 36px;
    height: 36px;
  }

  .loot-reward canvas {
    width: 36px !important;
    height: 36px !important;
  }
}

@media (max-width: 700px) {
  .reward-equipment-modal .reward-info-card-modal-card {
    min-height: 270px;
  }

  .reward-equipment-modal .reward-info-card-modal-body,
  .reward-equipment-modal .reward-equipment-card.box-content {
    min-height: 230px;
  }

  .reward-info-card .level-selector {
    min-height: 26px;
    padding: 2px 6px;
    font-size: 12px;
  }

  .reward-info-card .reward-info-image-cell {
    display: flex !important;
    min-height: 118px;
  }

  .reward-info-card .reward-info-content-cell {
    min-width: 0;
  }

  .reward-info-card .reward-info-image-cell .image-wrapper {
    width: 100%;
    padding: 6px 4px;
  }

  .reward-info-card .reward-info-image-cell .card-image {
    max-height: 110px;
    object-fit: contain;
  }

  .reward-equipment-modal .reward-equipment-card.box-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    min-height: 0;
    height: 100%;
    padding: 8px 10px 10px;
  }

  .reward-equipment-visual {
    display: none;
  }

  .reward-equipment-content {
    justify-content: center;
    align-self: stretch;
    min-height: 0;
    height: auto;
    max-height: 100%;
    margin-top: auto;
    margin-bottom: auto;
  }

  .reward-equipment-effects {
    width: 100%;
  }

  .reward-equipment-effects li {
    font-size: 12px;
    line-height: 1.28;
  }

  .reward-equipment-sell-value {
    align-self: center;
    max-width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    text-align: center;
  }

  .unit-modal-layout {
    flex-direction: row;
    align-items: center;
  }

  .unit-modal-list {
    flex: 1;
    min-width: 0;
    min-height: 286px;
    max-height: none;
  }
}
