/* Songs Filter Container - Updated for Dropdowns */

/* Keep existing container styles */
.songs-filter-container {
  margin-bottom: 30px;
  background-color: #f9f9f9;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Keep existing search styles */
.songs-search-container {
  margin-bottom: 20px;
  position: relative;
}

.songs-search-input {
  width: 100%;
  padding: 12px 20px;
  border: 1px solid #e0e0e0 !important;
  font-size: 16px;
  transition: all 0.3s ease;
  outline: none;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

.songs-search-input:focus {
  border-color: #923131;
  box-shadow: 0 0 0 2px rgba(146, 49, 49, 0.1);
}

/* Dropdown Filter Layout */
.filter-dropdowns-container {
  margin-bottom: 20px;
}

.filter-dropdowns-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.filter-dropdown {
  position: relative;
  background-color: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
  min-width: 180px;
  flex: 1;
}

.filter-dropdown-header {
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background-color: #fff;
  border-radius: 6px;
  transition: background-color 0.2s ease;
  border: 1px solid #e0e0e0;
}

.filter-dropdown-header:hover {
  background-color: #f5f5f5;
}

.filter-dropdown.active .filter-dropdown-header {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: 1px solid #f0f0f0;
}

.filter-dropdown-title {
  font-size: 14px;
  font-weight: 600;
  color: #444;
}

.dropdown-arrow {
  width: 10px;
  height: 10px;
  border-right: 2px solid #888;
  border-bottom: 2px solid #888;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
  margin-top: -4px;
}

.filter-dropdown.active .dropdown-arrow {
  transform: rotate(-135deg);
  margin-top: 2px;
}

.filter-dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-top: none;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 100;
  display: none;
  max-height: 250px;
  overflow-y: auto;
}

.filter-dropdown.active .filter-dropdown-content {
  display: block;
}

.filter-options-list {
  padding: 8px 0;
}

/* Advanced Filters Accordion */
.advanced-filters-accordion {
  margin-top: 15px;
  margin-bottom: 15px;
  background-color: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

.advanced-filters-header {
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background-color: #f5f5f5;
  border-radius: 6px;
}

.advanced-filters-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.advanced-filters-content {
  padding: 15px;
  border-top: 1px solid #e0e0e0;
}

/* Filter Actions */
.filter-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
  margin-bottom: 15px;
}

.apply-filters-button {
  background-color: #923131;
  color: white;
  border: none;
  border-radius: 20px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.apply-filters-button:hover {
  background-color: #7a2929;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.clear-filters-button {
  background-color: transparent;
  border: 1px solid #ccc;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #666;
}

.clear-filters-button:hover {
  background-color: #f0f0f0;
  color: #333;
}

/* Filter Sections */
.filter-sections {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.filter-section {
  background-color: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.03);
}

.filter-section-header {
  padding: 12px 15px;
  background-color: #f5f5f5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.filter-section-header:hover {
  background-color: #efefef;
}

.filter-section-header.active {
  background-color: #923131;
  color: white;
}

.filter-section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.filter-section-content {
  padding: 15px;
  background-color: #fff;
  max-height: 300px;
  overflow-y: auto;
}

/* Accordion Icon */
.accordion-icon {
  width: 20px;
  height: 20px;
  position: relative;
  transition: transform 0.3s ease;
}

.accordion-icon:before,
.accordion-icon:after {
  content: '';
  position: absolute;
  background-color: #333;
  transition: all 0.3s ease;
}

.filter-section-header.active .accordion-icon:before,
.filter-section-header.active .accordion-icon:after {
  background-color: #fff;
}

.accordion-icon:before {
  width: 2px;
  height: 20px;
  top: 0;
  left: 9px;
  transform: translateY(0);
}

.accordion-icon:after {
  width: 20px;
  height: 2px;
  top: 9px;
  left: 0;
}

.accordion-icon.active:before {
  transform: translateY(0) rotate(90deg);
  opacity: 0;
}

/* Filter Options */
.filter-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.filter-option-wrapper {
  margin-bottom: 5px;
}

.filter-option {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-option:hover {
  background-color: #f5f5f5;
}

/* Checkbox Style */
.checkbox-option {
  position: relative;
  padding-left: 35px;
  cursor: pointer;
  font-size: 14px;
  user-select: none;
}

.checkbox-option input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 6px;
  left: 12px;
  height: 18px;
  width: 18px;
  background-color: #fff;
  border: 2px solid #ddd;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.checkbox-option:hover .checkmark {
  border-color: #923131;
}

.checkbox-option input:checked ~ .checkmark {
  background-color: #923131;
  border-color: #923131;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-option input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-option .checkmark:after {
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Tabs Layout */
.filter-tabs-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 10px;
}

.filter-tab {
  padding: 8px 16px;
  border-radius: 20px;
  background-color: #f0f0f0;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-tab:hover {
  background-color: #e0e0e0;
}

.filter-tab.active {
  background-color: #923131;
  color: white;
}

.filter-tabs-content {
  background-color: #fff;
  border-radius: 6px;
  padding: 20px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.03);
}

.tab-content-title {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.tab-content-section {
  margin-bottom: 25px;
}

.tab-content-section:last-child {
  margin-bottom: 0;
}

/* Sort Controls */
.songs-sort-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #e0e0e0;
}

.sort-label {
  margin-right: 10px;
  color: #666;
  font-size: 14px;
}

.sort-control {
  color: #333;
  margin-right: 15px;
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
  font-weight: 500;
  font-size: 14px;
}

.sort-control:hover {
  color: #923131;
}

.sort-control.active {
  color: #923131;
  font-weight: 600;
}

.sort-control.active:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 2px;
  background-color: #923131;
  border-radius: 1px;
}

/* Clear Filters Button */
.clear-filters-container {
  margin-top: 15px;
  text-align: right;
}

.clear-filters-button {
  background-color: transparent;
  border: 1px solid #ccc;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #666;
}

.clear-filters-button:hover {
  background-color: #f0f0f0;
  color: #333;
}

/* Active Filters */
.active-filters-container {
  margin-top: 15px;
  display: none;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.active-filter {
  background-color: #f0f0f0;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  margin-right: 5px;
  margin-bottom: 5px;
}

.remove-filter {
  margin-left: 5px;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.remove-filter:hover {
  color: #923131;
}

/* Loading Overlay */
.songs-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.songs-loading-spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid rgba(146, 49, 49, 0.2);
  border-top-color: #923131;
  animation: songs-spin 0.8s infinite linear;
}

@keyframes songs-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .filter-options-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
  .songs-sort-filters {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .sort-label {
    margin-bottom: 10px;
  }
  
  .sort-control {
    margin-bottom: 10px;
  }
  
  .filter-dropdowns-row {
    flex-direction: column;
  }
  
  .filter-dropdown {
    width: 100%;
  }
  
  .filter-dropdown-content {
    position: relative;
    border: 1px solid #e0e0e0;
  }
  
  .filter-actions {
    flex-direction: column-reverse;
    gap: 10px;
  }
  
  .apply-filters-button, 
  .clear-filters-button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .filter-options-grid {
    grid-template-columns: 1fr;
  }
  
  .filter-tabs {
    overflow-x: auto;
    padding-bottom: 15px;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    display: flex;
    flex-wrap: nowrap;
  }
}

/* Greek subgenre filter transition */
.greek-subgenre-section {
  overflow: hidden;
  transition: all 0.3s ease-in-out;
}

/* Add visual indication that this is a sub-filter */
.greek-subgenre-section .filter-dropdown-header {
  padding-left: 20px; /* Add more indentation */
  background-color: rgba(0, 0, 0, 0.02); /* Slightly different background */
  border-left: 3px solid #4e97fd; /* Visual indicator */
}

/* Mood display styling */
.song-mood {
  font-size: 12px;
  color: #666;
  margin-top: 3px;
  display: flex;
  align-items: center;
}

.mood-label {
  font-weight: 500;
  margin-right: 4px;
}

.mood-value {
  background-color: #f0f0f0;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-block;
  line-height: 1.2;
}

/* For multiple moods that wrap to new line */
@media (max-width: 500px) {
  .song-mood {
    flex-wrap: wrap;
    gap: 5px;
  }
}

/* Artist search notification */
.artist-search-notification {
  background-color: #f0f8ff;
  padding: 10px 15px;
  border-radius: 4px;
  margin-bottom: 15px;
  border-left: 4px solid #923131;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.clear-artist-search {
  background-color: #923131;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
}

.clear-artist-search:hover {
  background-color: #7a2828;
  color: white;
  text-decoration: none;
}