/* ============================================================================
   UI-FLT-1.2: FilterPanel Component Styling
   EMOJI-FILTER UI Sprint (M2.2.7) - Views-KI

   Responsive Container für Emoji-Filter mit Layout-System
   ============================================================================ */

.filter-panel {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  min-width: 320px;
  max-width: 480px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
  /* Fix Z-Index Issues: Modal must be above all content */
  z-index: 1000;
  position: relative;
}

/* ============================================================================
   HEADER
   ============================================================================ */

.filter-panel-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  position: relative;
}

.filter-panel-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.5rem 0;
}

.filter-panel-description {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

.filter-panel-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #6b7280;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.filter-panel-close:hover {
  background: #f3f4f6;
  color: #374151;
}

/* ============================================================================
   CONTENT
   ============================================================================ */

.filter-panel-content {
  padding: 1rem;
  max-height: 60vh;
  overflow-y: auto;
}

/* ============================================================================
   SECTIONS
   ============================================================================ */

.filter-panel-section {
  margin-bottom: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.filter-panel-section:hover {
  border-color: #d1d5db;
}

/* Section Header */
.filter-panel-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.filter-panel-section-header:hover {
  background: #f3f4f6;
}

.filter-panel-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin: 0;
}

.filter-panel-section-toggle {
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: bold;
}

/* Section Content */
.filter-panel-section-content {
  padding: 1rem;
}

.filter-panel-section-description {
  font-size: 0.8125rem;
  color: #6b7280;
  margin: 0 0 0.75rem 0;
  line-height: 1.4;
}

/* Section Filters */
.filter-panel-section-filters {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-panel-element {
  padding: 0.5rem 0.75rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.8125rem;
  color: #374151;
  transition: all 0.2s ease;
}

.filter-panel-element:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.filter-panel-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.filter-panel-actions {
  display: flex;
  justify-content: flex-end;
}

.filter-panel-reset {
  background: #dc2626;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.filter-panel-reset:hover {
  background: #b91c1c;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 640px) {
  .filter-panel {
    min-width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .filter-panel-content {
    max-height: 50vh;
  }

  .filter-panel-section-content {
    padding: 0.75rem;
  }
}

/* ============================================================================
   DARK MODE SUPPORT
   ============================================================================ */

@media (prefers-color-scheme: dark) {
  .filter-panel {
    background: #1f2937;
    color: #f9fafb;
  }

  .filter-panel-header {
    border-color: #374151;
  }

  .filter-panel-title {
    color: #f9fafb;
  }

  .filter-panel-description {
    color: #9ca3af;
  }

  .filter-panel-close {
    color: #9ca3af;
  }

  .filter-panel-close:hover {
    background: #374151;
    color: #d1d5db;
  }

  .filter-panel-content {
    /* Content styling remains light for filter visibility */
  }

  .filter-panel-section {
    border-color: #374151;
  }

  .filter-panel-section-header {
    background: #111827;
    border-color: #374151;
  }

  .filter-panel-section-header:hover {
    background: #1f2937;
  }

  .filter-panel-section-title {
    color: #e5e7eb;
  }

  .filter-panel-section-toggle {
    color: #9ca3af;
  }

  .filter-panel-section-description {
    color: #9ca3af;
  }

  .filter-panel-element {
    background: #374151;
    border-color: #4b5563;
    color: #e5e7eb;
  }

  .filter-panel-element:hover {
    background: #4b5563;
    border-color: #6b7280;
  }

  .filter-panel-footer {
    border-color: #374151;
    background: #111827;
  }
}

/* ============================================================================
   ANIMATIONS (Future Enhancement)
   ============================================================================ */

/* Panel slide-in animation */
@keyframes filterPanelSlideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.filter-panel {
  animation: filterPanelSlideIn 0.2s ease-out;
}

/* Section expand/collapse animation */
.filter-panel-section-content {
  transition: all 0.3s ease;
  max-height: 0;
  overflow: hidden;
}

.filter-panel-section-content.expanded {
  max-height: 1000px; /* Large enough for content */
}

