/* Automations modal: General checkboxes + functional Loot List tab. */

/* O modal inteiro tem que caber no viewport (720p): trava a altura e rola o corpo */
#automations-modal {
  width: 422px;
  height: 458px;
  max-width: 94vw;
  max-height: 92vh;
}

#automations-modal .modal-body {
  padding: 8px;
  max-height: calc(92vh - 70px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

/* General tem 9 checkboxes: sem wrap elas esticam o modal além do viewport em 1280px */
#automations-modal .checkboxes {
  flex-wrap: wrap;
  justify-content: flex-start;
  row-gap: 2px;
}

#automations-modal .checkboxes label {
  flex: 0 0 auto;
  padding: 2px 10px 2px 0;
}

#automations-modal .automations-chrome {
  margin-bottom: 6px;
}

#automations-modal .house-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

#automations-modal .house-tab {
  flex: 1;
  padding: 6px 0;
  cursor: pointer;
}

#automations-modal .house-tab.active {
  font-weight: bold;
  text-decoration: underline;
}

#automations-modal .house-tab-content {
  display: none;
}

#automations-modal .house-tab-content.active {
  display: block;
}

.lootlist-letter-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-bottom: 6px;
  max-height: 64px;
  overflow-y: auto;
}

.lootlist-letter-btn {
  min-width: 22px;
  padding: 2px 4px;
  cursor: pointer;
}

.lootlist-letter-btn.active {
  font-weight: bold;
  text-decoration: underline;
}

.lootlist-search {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 6px;
  padding: 4px 6px;
}

.lootlist-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 12px;
}

.lootlist-default-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
}

.lootlist-default-note {
  opacity: 0.7;
}

.lootlist-route-btn {
  cursor: pointer;
  white-space: nowrap;
}

#lootlist-item-list {
  width: 404px;
  height: 222px;
  max-height: 222px;
  overflow-y: auto;
  margin-bottom: 6px;
}

.lootlist-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  font-size: 12px;
  min-height: 36px;
}

.lootlist-sprite {
  display: block;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  image-rendering: pixelated;
}

.lootlist-row .lootlist-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lootlist-row .lootlist-rare {
  font-weight: bold;
}

.lootlist-controls {
  border-top: 1px solid #444;
  padding-top: 6px;
}

.lootlist-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 12px;
}

.lootlist-enabled-btn {
  min-width: 72px;
  cursor: pointer;
}

.lootlist-presets {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  margin-bottom: 4px;
}

.lootlist-presets select {
  flex: 1;
}

#lootlist-preset-name {
  flex: 1;
  padding: 4px 6px;
  background: #1a1a1a;
  border: 1px solid #444;
  color: #e0e0e0;
  border-radius: 3px;
  font-family: inherit;
  font-size: 12px;
}
