.tabbed-window {
  position: absolute;
  width: 84%;
  height: 50cqh;
  margin: 30% 8%;
  padding: 0;
  z-index: 100;
}

.tabbed-window-header {
  height: 8cqh;
}

.tabbed-window-split-body-left {
  position: absolute;
  width: 25%;
  height: calc(100% - 8cqh);
}

.tabbed-window-split-body-right {
  position: absolute;
  width: calc(75% - 4cqh);
  height: calc(100% - 12cqh);
  left: 25%;
  padding: 2cqh 2cqh;
}

.tabbed-window-back-button {
  position: absolute;
  top: 75%;
  right: 8%;
  width: 20%;
  height: 5cqh;
  font-size: 3cqh;
  border: none;
  z-index: 101;
  padding: 0;
}

.heatmap-table {
  width: 100%;
  border-spacing: 0.4cqh;
  table-layout: fixed;
}

/* Fixed layout + small font keep every op's grid the same size — otherwise the
   wider subtraction labels (e.g. "18-9") overflow and stretch the table. */
.heatmap-table th,
.heatmap-table td {
  width: 10%;
  padding: 0.3cqh 0;
  font-size: 1.9cqh;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
}

.heatmap-table th,
.heatmap-table td:first-child {
  color: #fff;
  font-weight: 700;
}

/* Data cells carry the color-coded background; dark text reads on white→green. */
.heatmap-table td.heatmap-grid-cell {
  color: #111;
  border-radius: 0.4cqh;
  cursor: pointer;
}

/* #items-window {
  position: absolute;
  width: 80%;
  height: 50vb;
  margin: 30% 10%;
  background-color: #0009;
  border: 1px solid #fff6;
  padding: 0;
  z-index: 100;
}

#items-window-header {
  height: 8vb;
} */

.window-header-tab {
  position: absolute;
  height: 5cqh;
  background-color: #5f5283;
  top: 1cqh;
  width: 42.5%;
  font-size: 3.5cqh;
  text-align: center;
  padding: 1cqh 0 1cqh;
}

.window-header-tab-1 {
}

.window-header-tab-2 {
  margin-left: 47.5%;
}

#items-window-header-shop {
  #items-window-header-shop-lock {
    display: none;
  }
  &:disabled {
    &:hover {
      cursor: not-allowed !important;
    }
    opacity: 0.5;
    img {
      height: 4cqh;
      display: block !important;
    }
  }
}

.window-header-tab-inactive {
  background-color: #3e325f;
  height: 4.5cqh;
  margin-top: 0.5cqh;
  &:hover {
    cursor: pointer;
  }
}

/* .items-window-header-tab-locked {
  &:hover {
    cursor: not-allowed !important;
  }
  opacity: 0.5;
  img {
    height: 4vb;
  }
} */

.window-body-container {
  background-color: #5f5283;
  height: calc(100% - 8cqh);
  overflow-y: scroll;
}

.items-window-action-button {
  width: 40%;
  margin: 2% 4%;
  padding: 1.5cqh 0;
}

#items-window-body {
}
#items-window-seeds {
  /* border-bottom: 1px solid white; */
}

#items-window-seed-discard-message {
  display: none;
  margin-left: 2cqh;
}

.items-window-action-button-hidden {
  display: none;
}

.seed-slots {
  display: inline-block;
  width: 40%;
  background-color: #6666;
  height: 16cqh;
  margin: 2.5%;
}

.seed-data {
  display: block;
  width: 50%;
  background-color: #6666;
  float: inline-end;
  margin: 2.5%;
  height: 16cqh;
  overflow-y: scroll;
}

.seed-data-inner {
  padding: 2cqh;
  font-size: 3cqh;
}

#seed-slots .seed-slot {
  display: inline-block;
  width: 6cqh;
  height: 6cqh;
  background-color: #0009;
  margin-top: 1cqh;
  margin-left: 1cqh;
  fill: white;
}

#seed-slots .seed-slot-occupied {
  &:hover {
    cursor: pointer;
  }
}

#seed-slots .seed-slot-highlighted {
  box-shadow: inset 0 0 3cqh #3f39;
}

#seed-slots .seed-slot-locked {
  opacity: 0.5;
  &:hover {
    cursor: pointer;
  }
}

.seed-icon {
  fill: white;
}

.seed-slot-single {
  width: 12cqh;
  height: 12cqh;
  display: block;
  margin: 2cqh auto 2cqh;
}

.tabbed-window-subheading {
  margin-top: 2cqh;
  border-bottom: 1px solid white;
  font-size: 4cqh;
  padding-left: 1cqh;
}

.inventory-item-row {
  padding: 2cqh 1cqh;
}

.inventory-item-use-button {
  border: 1px solid white;
  margin: 0 1cqh;
  float: inline-end;
  padding: 0.5cqh 2cqh;
  right: 0;
  font-size: 2.5cqh;
  background-color: #9999;
  &:hover {
    cursor: pointer;
    background-color: #9993;
  }
}

.inventory-item-use-button-disabled {
  background-color: #9990 !important;
  color: #ccc !important;
  border-color: #ccc !important;
  &:hover {
    cursor: not-allowed !important;
  }
}

.inventory-item-description {
  display: block;
  font-size: 2cqh;
  font-style: italic;
}

.inventory-item-name {
  display: inline-block;
  margin-right: 2cqh;
  font-size: 3cqh;
}

.lock-icon {
  pointer-events: none;
}

.shop-item-price-star {
  height: 2.5cqh;
  float: right;
  margin-left: 0.5cqh;
}

/* Shop Grid Layout */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5cqh;
  padding: 1cqh;
}

.shop-card {
  background-color: #2a2a4a;
  border: 1px solid #4a4a6a;
  border-radius: 1cqh;
  padding: 1.5cqh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
}

.shop-card-disabled {
  cursor: not-allowed;
}

.shop-card-name {
  font-size: 2.2cqh;
  font-weight: bold;
  margin-bottom: 0.5cqh;
}

.shop-card-description {
  font-size: 1.6cqh;
  color: #aaa;
  margin-bottom: 1cqh;
  min-height: 3cqh;
}

.shop-card-icon {
  height: 6cqh;
  width: 6cqh;
  margin-bottom: 1.5cqh;
  object-fit: contain;
}

.shop-card-buy-button {
  background-color: #6b4c9a;
  border: none;
  border-radius: 0.5cqh;
  padding: 1cqh 2cqh;
  color: white;
  font-size: 2cqh;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5cqh;
}

.shop-card-buy-button:hover {
  background-color: #7d5cb0;
}

.shop-card-disabled .shop-card-buy-button {
  background-color: #4a4a5a;
  color: #888;
  cursor: not-allowed;
}

.shop-card-buy-button img {
  height: 2cqh;
}

/* Shop Menu Full Screen Layout */
#shop-menu {
  display: flex;
  flex-direction: column;
  background-color: #1a1a2e;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
}

#shop-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 8cqh;
  padding: 0 3cqh;
  background: #181b46;
  border-bottom: 1cqh solid #e720b8;
}

#shop-menu-title {
  font-size: 4cqh;
  font-weight: bold;
  color: white;
}

#shop-menu-stars {
  display: flex;
  align-items: center;
  gap: 1cqh;
  font-size: 3cqh;
  fill: white;
}

#shop-menu-stars img,
#shop-menu-stars svg {
  height: 4.5cqh;
}

#shop-menu-grid {
  flex: 1;
  overflow-y: auto;
  padding: 2cqh;
  padding-left: 10cqh;
  padding-right: 6cqh;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18cqh, 1fr));
  gap: 2cqh;
  align-content: start;
}

#shop-menu-back {
  position: absolute;
  bottom: 3cqh;
  left: 3cqh;
  fill: white;
}

#shop-menu-back img,
#shop-menu-back svg {
  height: 6cqh;
}

/* Inventory Menu Full Screen Layout */
#inventory-menu {
  display: flex;
  flex-direction: column;
  background-color: #70719a;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
}

#inventory-menu-body {
  flex: 1;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

#inventory-menu-sidebar {
  width: 10%;
  background-color: #383a5a;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2cqh;
}

#inventory-menu-sidebar-icons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2cqh;
}

#inventory-sidebar-fruit svg {
  width: 4.5cqh;
  height: 4.5cqh;
  margin: 0.25cqh;
}

.inventory-sidebar-icon {
  width: 5cqh;
  height: 5cqh;
  padding: 0.8cqh;
  box-sizing: content-box;
  fill: white;
}

.inventory-sidebar-icon-active {
  opacity: 1;
  background-color: #4a4c6a;
  border-radius: 1cqh;
}

.inventory-sidebar-icon img {
  width: 100%;
  height: 100%;
}

#inventory-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 8cqh;
  padding: 0 3cqh;
  background: #181b46;
  border-bottom: 1cqh solid #e720b8;
}

#inventory-menu-title {
  font-size: 4cqh;
  font-weight: bold;
  color: white;
}

#inventory-menu-stars {
  display: flex;
  align-items: center;
  gap: 1cqh;
  font-size: 3cqh;
  fill: white;
}

#inventory-menu-stars img,
#inventory-menu-stars svg {
  height: 4.5cqh;
}

#inventory-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#inventory-shop-bar {
  padding: 1.5cqh 2cqh;
  display: flex;
  justify-content: flex-end;
}

.inventory-shop-button {
  display: inline-flex;
  align-items: center;
  gap: 1cqh;
  font-size: 2.5cqh;
  padding: 1cqh 2cqh;
}

.inventory-shop-button svg {
  width: 3cqh;
  height: 3cqh;
  fill: white;
}

.inventory-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#inventory-menu-grid {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2cqh 4cqh;
  align-content: start;
}

/* Seeds View */
#inventory-seeds-view {
  padding: 1.5cqh 2cqh;
  overflow-y: auto;
  overflow-x: hidden;
}

#seeds-subheading {
  font-size: 2.5cqh;
  color: #aaa;
  margin-bottom: 1.5cqh;
  padding-bottom: 0.5cqh;
  border-bottom: 1px solid #6a6a8a;
}

#seed-info-panel,
#flower-storage-info-panel {
  display: flex;
  flex-direction: row;
  background-color: #2a2a4a;
  border: 1px solid #6a6a8a;
  border-radius: 1cqh;
  padding: 1.5cqh;
  margin-bottom: 2cqh;
  align-items: center;
}

#seed-info-icon,
#flower-storage-info-icon {
  width: 8cqh;
  height: 8cqh;
  background-color: #3a3a5a;
  border: 2px solid #6a6a8a;
  border-radius: 1cqh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 2cqh;
  flex-shrink: 0;
  fill: white;
}

#seed-info-icon img,
#flower-storage-info-icon img {
  width: 5cqh;
  height: 5cqh;
}

#seed-info-icon svg,
#flower-storage-info-icon svg {
  width: 5cqh;
  height: 5cqh;
}

#seed-info-details,
#flower-storage-info-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#seed-info-dna {
  display: flex;
  gap: 0.5cqh;
  margin-bottom: 0.8cqh;
}

.seed-dna-indicator {
  width: 1.8cqh;
  height: 1.8cqh;
  background-color: #5080ff;
  border-radius: 0.2cqh;
}

#seed-info-text,
#flower-storage-info-text {
  font-size: 1.8cqh;
  color: #aaa;
}

#seed-plant-button,
#flower-storage-use-button {
  background-color: #0248eb;
  border: none;
  border-radius: 0.5cqh;
  padding: 0.8cqh 2cqh;
  color: white;
  font-size: 2cqh;
  cursor: pointer;
  margin-left: 1.5cqh;
}

#seed-plant-button:hover,
#flower-storage-use-button:hover {
  background-color: #5a7cb8;
}

#flower-storage-use-button:disabled {
  background-color: #4a4a5a;
  color: #888;
  cursor: not-allowed;
}

#seeds-grid,
#flower-storage-grid {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 2cqh;
  justify-content: start;
  overflow-y: auto;
  overflow-x: hidden;
}

#seeds-grid .seed-slot,
#flower-storage-grid .flower-slot {
  fill: white;
  svg {
    width: 50%;
    height: 50%;
  }
}

/* Fruit View */
#inventory-fruit-view {
  padding: 1.5cqh 2cqh;
  overflow-y: auto;
  overflow-x: hidden;
}

#fruit-subheading {
  font-size: 2.5cqh;
  color: #aaa;
  margin-bottom: 1.5cqh;
  padding-bottom: 0.5cqh;
  border-bottom: 1px solid #6a6a8a;
}

#fruit-info-panel {
  display: flex;
  flex-direction: row;
  background-color: #2a2a4a;
  border: 1px solid #6a6a8a;
  border-radius: 1cqh;
  padding: 1.5cqh;
  margin-bottom: 2cqh;
  align-items: center;
}

#fruit-info-icon {
  width: 8cqh;
  height: 8cqh;
  background-color: #3a3a5a;
  border: 2px solid #6a6a8a;
  border-radius: 1cqh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 2cqh;
  flex-shrink: 0;
  fill: white;
  svg {
    width: 80%;
    height: 80%;
  }
}

#fruit-info-icon img {
  width: 5cqh;
  height: 5cqh;
}

#fruit-info-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#fruit-info-dna {
  display: flex;
  gap: 0.5cqh;
  margin-bottom: 0.8cqh;
}

#fruit-info-text {
  font-size: 1.8cqh;
  color: #aaa;
}

#fruit-grid {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 2cqh;
  justify-content: start;
  overflow-y: auto;
  overflow-x: hidden;
}

#fruit-grid .fruit-slot {
  fill: white;
  svg {
    width: 50%;
    height: 50%;
  }
}

#inventory-menu-grid::-webkit-scrollbar-thumb:hover {
  background: #454966;
}

#inventory-menu-back {
  margin-top: auto;
  margin-bottom: 3cqh;
  fill: white;
}

#inventory-menu-back img,
#inventory-menu-back svg {
  height: 6cqh;
}

/* Flower Storage menu — same shell as the inventory menu, no tab sidebar. */
#flower-storage-menu {
  display: flex;
  flex-direction: column;
  background-color: #70719a;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
}

#flower-storage-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 8cqh;
  padding: 0 3cqh;
  background: #181b46;
  border-bottom: 1cqh solid #e720b8;
}

#flower-storage-menu-title {
  font-size: 4cqh;
  font-weight: bold;
  color: white;
}

#flower-storage-menu-body {
  flex: 1;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

#flower-storage-menu-sidebar {
  width: 10%;
  background-color: #383a5a;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2cqh;
}

#flower-storage-menu-back {
  margin-top: auto;
  margin-bottom: 3cqh;
  fill: white;
}

#flower-storage-menu-back svg {
  height: 6cqh;
}

#flower-storage-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 1.5cqh 2cqh;
}

/* Inventory Grid Layout */
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 3cqh;
  padding: 1cqh;
  flex: 1;
}

.inventory-slot {
  background-color: #3e3260;
  border: 1cqh solid #c2c2d4;
  border-radius: 1cqh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
}

.inventory-slot-filled {
  padding: 0;
  padding-bottom: 2cqh;
  justify-content: flex-start;
  cursor: pointer;
}

/* Currency tile (e.g. gems): same visual frame as a filled slot but no
   click target, no Use button. */
.inventory-slot-currency {
  cursor: default;
}

.inventory-slot-icon {
  height: 50%;
  width: 50%;
  object-fit: contain;
  margin-top: auto;
  margin-bottom: auto;
}

.inventory-slot-name {
  font-size: 2cqh;
  font-weight: bold;
  text-align: center;
  background-color: #82239d;
  padding: 0.4cqh 0;
  width: 100%;
  box-sizing: border-box;
}

.inventory-slot-description {
  font-size: 1.5cqh;
  color: #ccc;
  text-align: center;
  padding: 0.3cqh 0.5cqh;
}

.inventory-slot-use-button {
  background-color: #0248eb;
  border: none;
  border-radius: 0.5cqh;
  padding: 0.5cqh 1.5cqh;
  color: white;
  font-size: 1.3cqh;
  cursor: pointer;
  position: absolute;
  bottom: -1.8cqh;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2.5cqh;
  width: 50%;
  border-radius: 2cqh;
  height: 4cqh;
}

.inventory-slot-use-button:hover {
  background-color: #5a7cb8;
}
