/* Center-align Tier column (second column) */
#spells-table tbody tr td:nth-child(2),
#spells-table thead th:nth-child(2) {
  text-align: center;
}

/* Only regular table rows (not detail rows) should have pointer cursor */
#spells-table tbody tr:not([data-dt-row]) {
  cursor: pointer;
  position: relative;
  transition: background-color 0.2s ease;
}

#spells-table tbody tr:not([data-dt-row]):hover {
  background-color: hsla(var(--md-hue), 15%, 20%, 1) !important;
}

#spells-table tbody tr:nth-child(odd) {
  background-color: hsla(var(--md-hue), 15%, 12%, 1);
}

#spells-table tbody tr:nth-child(even) {
  background-color: hsla(var(--md-hue), 15%, 16%, 1);
}

/* Chevron indicator for expandable rows - only on rows without colspan (detail rows have colspan="4") */
#spells-table tbody tr:not([data-dt-row]) td:first-child::before {
  content: '▼';
  display: inline-block;
  margin-right: 8px;
  transition: transform 0.3s ease;
  font-size: 0.7em;
  vertical-align: middle;
  color: hsla(var(--md-hue), 15%, 60%, 1);
}

#spells-table tbody tr.expanded td:first-child::before {
  transform: rotate(180deg);
}

.filter-dropdown {
    position: relative;
    display: inline-block;
    margin-left: 15px;
}
.filter-button {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    border: 1px solid #aaa;
}
.filter-button:hover {
    background-color: hsla(225deg,15%,8%,1);
}
.filter-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: hsla(225deg,15%,8%,1);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    padding: 10px;
    z-index: 1000;
    min-width: 150px;
}
.filter-content.show {
    display: block;
}
.filter-checkbox {
    display: block;
    margin: 5px 0;
    cursor: pointer;
}
.filter-checkbox input {
    margin-right: 8px;
}
.filter-reset-button {
    display: none;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid #aaa;
    margin-left: 8px;
    background-color: transparent;
    color: inherit;
    vertical-align: middle;
}
.filter-reset-button:hover {
    background-color: hsla(225deg,15%,8%,1);
}
.filter-reset-button svg {
    width: 12px;
    height: 12px;
    vertical-align: middle;
}

@media (max-width: 768px) {
    #spells-table td:nth-child(1),
    #spells-table td:nth-child(2) {
        word-break: break-word;
        white-space: normal;
        min-width: 2em;
    }

    #spells-table {
        table-layout: auto !important;
    }
}