/* Star Savior Tier List Styles */

.custom-tier-list-bsr {
  width: 100%;
  margin-top: 30px;
}

/* Tier Row - CZN Style */
.tier-row-bsr {
  display: flex;
  margin-bottom: 12px;
  background: #141417;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid #2a2a30;
}

/* Tier Label (Left Side) */
.tier-label-bsr {
  min-width: 50px;
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.3rem;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  padding: 10px 8px;
  position: relative;
}

/* Tier Colors - Matching Prydwen gradients */
.tier-label-bsr.tier-t0 {
  background: #d32f2f;
}
.tier-label-bsr.tier-ss {
  background: #ec6563;
}
.tier-label-bsr.tier-s {
  background: #ff7f7f;
}
.tier-label-bsr.tier-a {
  background: #f9a2a2;
}
.tier-label-bsr.tier-b {
  background: #ffbf7f;
}
.tier-label-bsr.tier-c {
  background: #ffff7f;
}
.tier-label-bsr.tier-d {
  background: linear-gradient(135deg, #bfff7f 0%, #81c784 100%);
}

/* Role Columns Container */
.tier-roles-container {
  display: flex;
  flex: 1;
  min-height: 45px;
}

/* Header Row Roles Container - Different Background */
.tier-roles-container-header {
  background-color: #2a2a30;
}

/* Individual Role Column */
.role-column-bsr {
  flex: 1;
  padding: 8px 6px;
  border-left: 1px solid #2a2a30;
  display: flex;
  flex-direction: column;
}

/* Desktop: Header row columns - center content vertically */
.tier-header-row .role-column-bsr {
  justify-content: center;
  align-items: center;
  padding: 10px 6px;
}

/* Role Header */
.role-header-bsr {
  font-size: 0.75rem;
  color: #ccc;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding: 6px 0;
  font-weight: 600;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

/* Desktop: Header row styling - no background, larger text, centered */
.tier-header-row .role-header-bsr {
  background: transparent;
  font-size: 1rem;
  margin-bottom: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

/* Header row role colors */
.tier-header-row .role-header-star {
  color: #4caf50;
}
.tier-header-row .role-header-moon {
  color: #2196f3;
}
.tier-header-row .role-header-order {
  color: #ff9800;
}
.tier-header-row .role-header-sun {
  color: #f44336;
}
.tier-header-row .role-header-chaos {
  color: #9c27b0;
}

/* Header Row - Only show category headers once at top on desktop */
.tier-header-row {
  display: flex;
}

/* Invisible tier label in header row for alignment */
.tier-header-label-invisible {
  visibility: hidden;
  border: 0px;
  background-color: #23232a;
}

/* Hide role headers in tier rows on desktop (they're only in header row) */
.tier-row-bsr:not(.tier-header-row) .role-header-bsr {
  display: none;
}

/* Character Grid in Role Column */
.role-characters-bsr {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: flex-start;
}

/* Character Card - Prydwen CZN Style */
.char-card-bsr {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100px;
  cursor: pointer;
  transition: transform 0.2s;
  text-decoration: none;
  padding: 2px;
}

.char-card-bsr:hover {
  transform: translateY(-4px);
}

.char-avatar-bsr {
  width: 80px;
  height: 80px;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.char-avatar-bsr img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 0px;
}

/* Rarity Background Colors (same as Character List) */
.char-avatar-bsr.rarity-UR {
  background: linear-gradient(160deg, #5a2d2d 0%, #ff6b6b 65%);
}
.char-avatar-bsr.rarity-SSR {
  background: linear-gradient(160deg, #6e4c42 0%, #e0c870 65%);
}
.char-avatar-bsr.rarity-SR {
  background: linear-gradient(160deg, #2d2f4d 0%, #7a5af8 65%);
}
/* Character-SR and Character-SSR classes for Star Savior */
.char-avatar-bsr.Character-SSR {
  background: linear-gradient(160deg, #6e4c42 0%, #e0c870 65%);
}
.char-avatar-bsr.Character-SR {
  background: linear-gradient(160deg, #2d2f4d 0%, #7a5af8 65%);
}

/* Character Name */
.char-name-bsr {
  margin-top: 6px;
  font-size: 0.75rem;
  color: #ccc;
  text-align: center;
  line-height: 1.2;
  max-width: 95px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Element Badge */
.element-badge-bsr {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 35px;
  height: 35px;
  overflow: hidden;
  z-index: 2;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

.element-badge-bsr img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.empty-role {
  color: #444;
  font-size: 0.75rem;
  font-style: italic;
  text-align: center;
  padding: 20px 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  /* Hide header row on mobile */
  .tier-header-row {
    display: none;
  }

  /* Show role headers in each column on mobile */
  .tier-row-bsr:not(.tier-header-row) .role-header-bsr {
    display: block;
  }

  .tier-row-bsr {
    flex-direction: column;
  }

  .tier-label-bsr {
    min-width: 100%;
    width: 100%;
    padding: 8px;
    font-size: 1.1rem;
  }

  .tier-roles-container {
    flex-direction: column;
  }

  .role-column-bsr {
    border-left: none;
    border-top: 1px solid #2a2a30;
    padding: 10px;
  }

  .role-header-bsr {
    font-size: 0.8rem;
    margin-bottom: 6px;
    padding: 5px 0;
  }

  .char-card-bsr {
    width: 80px;
  }

  .char-avatar-bsr {
    width: 70px;
    height: 70px;
  }

  .char-name-bsr {
    font-size: 0.7rem;
    max-width: 75px;
  }

  .element-badge-bsr {
    width: 16px !important;
    height: 16px !important;
  }
}

/* Last Updated Info */
.last-updated {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 20px;
}

/* Tier Description */
.tier-description {
  background: rgba(26, 26, 29, 0.6);
  border: 1px solid #32323e;
  border-radius: 2px;
  padding: 20px;
  margin-bottom: 25px;
}

.tier-description h3 {
  color: #7a5af8;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.tier-description ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tier-description li {
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: #bbb;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.tier-badge {
  display: inline-block;
  min-width: 28px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.75rem;
  text-align: center;
  color: white;
}

.tier-badge.t0 { background: #d32f2f; }
.tier-badge.ss { background: #ec6563; }
.tier-badge.s { background: #ff7f7f; }
.tier-badge.a { background: #f9a2a2; }
.tier-badge.b { background: #ffbf7f; }
.tier-badge.c { background: #ffff7f; }



.employees-filter-bar.lost {
  /* background-color: #1a1a1e;  REMOVED dark background */
  /* border: 1px solid #32323e; REMOVED border */
  border-radius: 4px;
  padding: 8px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  /* box-shadow: 0 4px 10px rgba(0,0,0,0.3); REMOVED shadow */
}

.filter-bar-element {
  display: flex;
  align-items: center;
}

/* Search Field */
.filter-bar-element.search {
  position: relative;
  margin-right: 4px;
}

.filter-bar-element.search input.form-control {
  background-color: #0e0e11;
  border: 1px solid #32323e;
  border-radius: 4px;
  color: #e0e0e0;
  padding: 0 30px 0 10px;
  font-size: 0.9rem;
  height: 38px;
  width: 200px;
  transition: border-color 0.2s;
  box-sizing: border-box;
  line-height: 38px;
}

.filter-bar-element.search input.form-control:focus {
  outline: none;
  border-color: #7a5af8;
}

.filter-bar-element.search .clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  display: none;
  user-select: none;
}

.filter-bar-element.search input:not(:placeholder-shown) + .clear {
  display: block;
}

/* Button Groups */
.btn-group {
  display: inline-flex;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #32323e;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #212126;
  color: #a0a0a0;
  border: none;
  border-right: 1px solid #32323e;
  padding: 0 16px;
  height: 38px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn:last-child {
  border-right: none;
}

.btn:hover {
  background-color: #2a2a30;
  color: #fff;
}

.btn.active {
  background-color: #7a5af8a1;
  color: #fff;
  box-shadow: inset 0 3px 5px rgba(0,0,0,0.125);
  border-color: #7a5af8a1;
}

.btn svg {
  fill: currentColor;
}

/* Reset Button */
.reset-button {
  background-color: #2a2a30;
  border: 1px solid #32323e;
  border-radius: 4px;
  color: #a0a0a0;
  padding: 0 16px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.reset-button:not([disabled]):hover {
  background-color: #7a5af8a1;
  border-color: #7a5af8a1;
  color: white;
}

.reset-button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Images inside buttons (like Types) */
.btn img {
  width: 28px; /* Increased size */
  height: 28px;
  object-fit: contain;
  transition: filter 0.2s;
  display: block;
  transform: scale(1.2); /* Zoom in to reduce visual border */
}

/* Specific styling for element buttons to reduce padding */
.element-filter {
  padding: 0 10px !important;
}

/* Mobile responsiveness for Filter Bar */
@media (max-width: 768px) {
  .employees-filter-bar.lost {
      flex-direction: column;
      align-items: stretch;
      padding: 10px;
  }

  .filter-bar-element {
      width: 100%;
      justify-content: center;
  }

  .filter-bar-element.search input.form-control {
      width: 100%;
  }

  .btn-group {
      width: 100%;
      display: flex;
  }

  .btn {
      flex: 1;
      padding: 0 4px;
      font-size: 0.85rem;
  }

  .reset-button {
      width: 100%;
      justify-content: center;
  }
}