/* Styles for the Genre Filter Dropdown */
.genre-tag-btn {
  display: block;
  width: 100%;
  padding: 8px 12px;
  text-align: left;
  border: none;
  background-color: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
}

.genre-tag-btn:hover {
  background-color: #333;
}

.genre-tag-btn.active {
  background-color: #8B0000; /* Dark Red, matching your theme */
  font-weight: bold;
}
/* Dropdown Container */
.genre-dropdown-container {
    position: relative;
    list-style: none; /* Ensure no default list bullet */
    margin: 0; /* Clear any default margin */
    padding: 0; /* Clear any default padding */
}

/* Dropdown Button - Make it look and behave exactly like a .nav-link */
.genre-dropdown-button {
    background: none; /* No background */
    border: none; /* No border */
    cursor: pointer;
    
    /* Direct replication of .nav-link styles from styles.css */
    color: #8b0000;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: bolder;
    transition: color 0.3s ease;
    text-transform: uppercase;
    
    /* Crucial: Ensure consistent display and text rendering */
    display: inline-block; /* Mimics how anchor tags behave within a line */
    line-height: normal; /* Allow browser to determine line height for consistency with other text */
    padding: 0; /* No padding on the button itself, let gap handle spacing */
    white-space: nowrap; /* Prevent text wrapping */
    vertical-align: middle; /* Helps with vertical alignment of inline elements */
    font-family: 'SFFlorence', 'Roboto', sans-serif; /* Explicitly set font */
}

.genre-dropdown-button:hover,
.genre-dropdown-button:focus {
    color: #8b0000;
    text-shadow: 0px 0px 5px #8b0000;
    outline: none;
}

/* Dropdown Content (the actual menu) */
.genre-dropdown-content {
    display: none; /* Hidden by default */
    position: absolute;
    background-color: rgba(var(--color-bg-rgb), 0.9); 
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
    z-index: 100; /* Ensure it's above other content */
    left: 50%; /* Center the dropdown below the button */
    transform: translateX(-50%); /* Adjust to truly center */
    padding: 5px 0; /* Vertical padding */
    border: 0px solid var(--color-accent); /* Border matching your accent color */
    max-height: 300px; /* Limit height for scroll */
    overflow-y: auto; /* Enable scrolling if too many genres */
    text-align: left; /* Align text left within dropdown */
    top: calc(100% + 5px); /* Position it slightly below the button */
}

/* Links inside the dropdown */
.genre-dropdown-content a {
    color: var(--color-text); /* Default link color for dropdown items */
    padding: 8px 16px;
    text-decoration: none;
    display: block;
    white-space: nowrap; /* Prevent text wrapping */
    transition: background-color 0.2s ease, color 0.2s ease;
    text-transform: none; /* Do not uppercase dropdown options, they should be readable */
    font-size: 0.8rem; /* Slightly smaller for dropdown items if preferred */
    font-family: 'Roboto', sans-serif; /* Use Roboto for dropdown items for better readability as it's not a title */
}

/* Change color of dropdown links on hover */
.genre-dropdown-content a:hover {
    background-color: var(--color-accent); /* Highlight color on hover */
    color: var(--color-text);
}

/* Show the dropdown menu on hover or when button is clicked (handled by JS) */
.genre-dropdown-container.active .genre-dropdown-content {
    display: block;
}

/* Responsive adjustments for mobile menu */
@media (max-width: 768px) {
    .genre-dropdown-container {
        display: block; /* Make it block level in mobile menu */
        margin: 10px 0; /* Match .nav-links li margin in mobile */
        padding: 0; /* No padding on container itself */
        width: 100%;
        text-align: center; /* Center content in mobile view */
    }

    .genre-dropdown-button {
        width: 100%; /* Full width in mobile menu */
        text-align: center;
        padding: 10px 0; /* Ensure button itself has vertical padding for touch targets */
        box-sizing: border-box; /* Include padding in width */
    }

    .genre-dropdown-content {
        position: static; /* Stack naturally in mobile menu */
        width: 100%;
        box-shadow: none;
        border: none;
        background-color: #333; /* Slightly different background for sub-items */
        transform: translateX(0); /* Remove centering transform for static position */
        top: auto; /* Reset top positioning for static positioning */
    }
}