/* ==========================================================================
   DAWN OF TITANS DATABASE - TABS & ROSTER NAVIGATION STYLES
   ========================================================================== */

#TAB_CONTAINER {
  border-right: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  width: 280px;
  min-width: 240px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
  z-index: 10;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.4);
}

/* Tab Icon Bar */
#TABS {
  display: flex;
  margin: 0;
  padding: 8px 8px 0;
  list-style: none;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  gap: 4px;
}

#TABS li {
  flex: 1;
  text-align: center;
}

#TABS li a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 4px;
  position: relative;
  transition: all var(--transition-fast);
  cursor: pointer;
  opacity: 0.6;
}

#TABS li a:hover {
  opacity: 1;
  background: rgba(229, 184, 105, 0.08);
}

#TABS li a.selected {
  opacity: 1;
  background: var(--bg-surface);
  border-color: var(--border-subtle);
  border-bottom: 2px solid var(--gold-primary);
  box-shadow: 0 -2px 10px rgba(229, 184, 105, 0.15);
}

.tab_icon {
  height: 22px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
  transition: transform var(--transition-fast);
}

#TABS li a.selected .tab_icon {
  transform: scale(1.1);
  filter: drop-shadow(0 0 6px rgba(229, 184, 105, 0.5));
}

#RELIC_TAB_ICON {
  height: 22px;
  width: auto;
}

/* Tab Content Roster Panes */
.tab_content {
  background: var(--bg-surface);
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 10px 20px;
}

/* Sticky Filter Bar Container */
.filter_container_titan,
.filter_container_relic,
.filter_container_troop,
.filter_container_spell,
.filter_container,
div[id$="_FILTER_CONTAINER"] {
  padding: 8px 6px 10px;
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, #0e1422 85%, rgba(14, 20, 34, 0.95) 100%);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 8px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Filter Dropdown Row */
.filter_dropdown_row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 100%;
}

.filter_container_relic .filter_dropdown_row {
  grid-template-columns: 1fr;
}

/* Modern Search Box */
.filter_name,
.tab_content input[type="search"],
.tab_content input[type="text"] {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 8px 12px 8px 32px !important;
  font-family: var(--font-body) !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: var(--text-primary) !important;
  background-color: var(--bg-surface-elevated) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: 10px center !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-sm) !important;
  outline: none !important;
  transition: all var(--transition-fast) !important;
}

.filter_name:focus,
.tab_content input[type="search"]:focus,
.tab_content input[type="text"]:focus {
  border-color: var(--gold-primary) !important;
  box-shadow: 0 0 0 2px rgba(229, 184, 105, 0.2) !important;
  background-color: var(--bg-surface-hover) !important;
}

.filter_name::placeholder,
.tab_content input[type="search"]::placeholder,
.tab_content input[type="text"]::placeholder {
  color: var(--text-muted) !important;
  font-size: 12px !important;
}

/* Custom Select styling inside Filter Dropdown Row */
.filter_dropdown_row .c_select {
  width: 100% !important;
  min-width: 0 !important;
}

.filter_dropdown_row .c_select .c_value {
  padding: 5px 8px !important;
  background: var(--bg-surface-elevated) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-sm) !important;
}

.filter_dropdown_row .c_select .c_value:hover {
  border-color: var(--border-gold) !important;
  background: var(--bg-surface-hover) !important;
}

.filter_dropdown_row .c_select .c_displayed_option {
  font-size: 11.5px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  color: #cbd5e1 !important;
  justify-content: space-between !important;
}

.filter_dropdown_row .c_select .c_dropdown {
  width: 100% !important;
  min-width: 130px !important;
  max-height: 240px !important;
  background: #0f1624 !important;
  border: 1px solid var(--border-gold) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.8) !important;
}

/* Roster Lists */
.tab_list {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.tab_list > li {
  margin-bottom: 12px;
}

.list_category_img {
  height: 24px;
  width: auto;
  margin: 8px 0 6px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}

.list_category_name {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin: 12px 0 6px 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.menu_category,
.TITAN_category,
.TROOP_category,
.RELIC_category,
.SPELL_category {
  list-style-type: none !important;
  list-style: none !important;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.menu_category > li,
.TITAN_category > li,
.TROOP_category > li,
.RELIC_category > li,
.SPELL_category > li {
  list-style-type: none !important;
  list-style: none !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: rgba(21, 30, 48, 0.3);
  transition: all var(--transition-fast);
}

.menu_category > li:hover,
.TITAN_category > li:hover,
.TROOP_category > li:hover,
.RELIC_category > li:hover,
.SPELL_category > li:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-subtle);
  transform: translateX(2px);
}

.menu_category > li.active_entry,
.TITAN_category > li.active_entry,
.TROOP_category > li.active_entry,
.RELIC_category > li.active_entry,
.SPELL_category > li.active_entry {
  background: rgba(229, 184, 105, 0.15) !important;
  border-color: var(--border-gold) !important;
  box-shadow: inset 3px 0 0 var(--gold-primary), 0 0 10px rgba(229, 184, 105, 0.12) !important;
}

.menu_category > li.active_entry a.list_entry {
  color: var(--gold-light) !important;
  font-weight: 700 !important;
}

/* List Entry Links */
a.list_entry,
a.list_entry:visited {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--transition-fast);
}

.menu_category > li:hover a.list_entry {
  color: var(--gold-light);
}

/* Action Icons inside Roster Entry */
.compare_link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  border-radius: var(--radius-sm);
  transition: opacity var(--transition-fast);
  opacity: 0.6;
}

.compare_link:hover {
  opacity: 1;
  background: rgba(229, 184, 105, 0.15);
}

.compare_link_img {
  height: 14px;
  width: 14px;
  filter: invert(80%);
}

.load_build {
  cursor: pointer;
  height: 15px;
  width: 15px;
  margin-left: 5px;
  opacity: 0.6;
  filter: invert(80%);
  transition: all var(--transition-fast);
}

.load_build:hover {
  opacity: 1;
  transform: scale(1.15);
  filter: drop-shadow(0 0 4px var(--gold-primary));
}

.delete_build_img {
  cursor: pointer;
  height: 14px;
  width: 14px;
  margin-left: 6px;
  opacity: 0.7;
  filter: invert(30%) sepia(80%) saturate(500%) hue-rotate(330deg);
  transition: transform var(--transition-fast);
}

.delete_build_img:hover {
  opacity: 1;
  transform: scale(1.2);
}

/* Category Names Color Coding */
#TROOP_CATEGORY_NAME_6 { color: #f43f5e; font-weight: 700; }
#TROOP_CATEGORY_NAME_5 { color: #f59e0b; font-weight: 700; }
#TROOP_CATEGORY_NAME_4 { color: #10b981; font-weight: 700; }
#TROOP_CATEGORY_NAME_3 { color: #38bdf8; font-weight: 700; }
#TROOP_CATEGORY_NAME_2 { color: #94a3b8; font-weight: 700; }
#TROOP_CATEGORY_NAME_1 { color: #cbd5e1; font-weight: 700; }

#SPELL_CATEGORY_NAME_7 { color: #cbd5e1; }
#SPELL_CATEGORY_NAME_6 { color: #f43f5e; }
#SPELL_CATEGORY_NAME_5 { color: #10b981; }
#SPELL_CATEGORY_NAME_4 { color: #6366f1; }
#SPELL_CATEGORY_NAME_3 { color: #f59e0b; }
#SPELL_CATEGORY_NAME_2 { color: #38bdf8; }
#SPELL_CATEGORY_NAME_1 { color: #ec4899; }
