/* ==== Search Bar Styling ==== */
#wtd-band-searchfilter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.wtd-filter,
#wtd-band-searchfilter select,
#wtd-band-searchfilter input,
#wtd-band-searchfilter button {
    padding: 0.5rem;
    background-color: #111;
    color: #eee;
    border: 1px solid #444;
    border-radius: 4px;
    flex: 1 1 150px;
    max-width: 200px;
}

#wtd-clear {
    background-color: #8b0000;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
}

/* ==== Band Grid Container ==== */
.wtd-band-grid {
    /* Switch from flexbox to CSS grid for consistent row alignment */
    display: grid;
    /* Fill gaps left by filtered (hidden) cards so there are no empty
       columns before or after visible items */
    grid-auto-flow: dense;
    /* Always display three cards per row on larger screens */
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    align-items: stretch;
}

/*
 * The band directory inserts empty divs with IDs like "letter-A",
 * "letter-B", etc. as jump targets for the A–Z navigation bar.
 * In a CSS grid these empty elements create unwanted empty cells
 * before the first band in each letter group.  Force these anchor
 * elements to span the full row with zero height so they don't
 * consume a column or affect layout, while still serving as valid
 * anchors.
 */
.wtd-band-grid > div[id^="letter-"] {
    grid-column: 1 / -1;
    height: 0;
    margin: 0;
    padding: 0;
}

/* ==== Band Card ==== */
.wtd-band-card {
    /* Let the grid determine sizing; ensure cards stretch to match
       tallest item in each row and use flexbox internally for
       vertical layout */
    width: 100%;
    height: 100%;
    background-color: #111;
    color: #fff;
    padding: 1rem;
    border: 2px solid #8b0000;
    border-radius: 10px;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wtd-band-card img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.wtd-band-card h3 {
    margin: 10px 0;
    font-size: 1.1rem;
}

/* ==== Tags ==== */
.wtd-tag,
.wtd-band-card .tag {
    display: inline-block;
    background-color: #8b0000;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 1rem;
    margin: 0.25rem;
    font-size: 0.8rem;
    cursor: pointer;
}

/* ==== Responsive Layout ==== */
@media (max-width: 1024px) {
    /* Collapse the grid into a single column on smaller screens */
    .wtd-band-grid {
        grid-template-columns: 1fr;
    }
}

/* ==== A–Z Jump Links ==== */
#wtd-az-jumpbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0 2rem;
}

#wtd-az-jumpbar a {
    display: inline-block;
    background-color: #333;
    color: white;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
}

#wtd-az-jumpbar a:hover {
    background-color: #8b0000;
    color: white;
}
