Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
212 changes: 212 additions & 0 deletions mflix/client/app/components/FilterBar/FilterBar.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
/**
* FilterBar Component Styles
*
* CSS Module for the movie filter bar component.
* Provides a horizontal filter bar for filtering movies by genre, year, rating, etc.
*/

.filterBar {
background: white;
border-radius: 12px;
padding: 1.25rem 1.5rem;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
margin-bottom: 1.5rem;
}

.filterHeader {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 1rem;
}

.filterTitle {
font-size: 0.875rem;
font-weight: 600;
color: #64748b;
text-transform: uppercase;
letter-spacing: 0.05em;
margin: 0;
display: flex;
align-items: center;
gap: 0.5rem;
}

.clearFiltersButton {
background: transparent;
border: 1px solid #e2e8f0;
color: #64748b;
padding: 0.375rem 0.75rem;
border-radius: 6px;
font-size: 0.8rem;
cursor: pointer;
transition: all 0.2s ease;
}

.clearFiltersButton:hover {
background: #f8fafc;
border-color: #cbd5e1;
color: #475569;
}

.filterControls {
display: flex;
flex-wrap: wrap;
gap: 1rem;
align-items: flex-end;
}

.filterGroup {
display: flex;
flex-direction: column;
gap: 0.25rem;
min-width: 140px;
}

.filterLabel {
font-size: 0.75rem;
font-weight: 500;
color: #64748b;
}

.filterSelect,
.filterInput {
padding: 0.5rem 0.75rem;
border: 2px solid #e2e8f0;
border-radius: 8px;
font-size: 0.875rem;
background: white;
color: #374151;
transition: border-color 0.2s ease, box-shadow 0.2s ease;
min-width: 120px;
}

.filterSelect:hover,
.filterInput:hover {
border-color: #cbd5e1;
}

.filterSelect:focus,
.filterInput:focus {
outline: none;
border-color: #3b82f6;
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.ratingGroup {
display: flex;
align-items: center;
gap: 0.5rem;
}

.ratingInput {
width: 70px;
}

.ratingDivider {
color: #94a3b8;
font-size: 0.875rem;
}

.applyButton {
background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
color: white;
border: none;
padding: 0.5rem 1rem;
border-radius: 8px;
font-size: 0.875rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
white-space: nowrap;
}

.applyButton:hover {
background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.applyButton:disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none;
}

.activeFilters {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-top: 1rem;
padding-top: 1rem;
border-top: 1px solid #e2e8f0;
}

.filterChip {
display: inline-flex;
align-items: center;
gap: 0.375rem;
background: #eff6ff;
color: #2563eb;
padding: 0.25rem 0.625rem;
border-radius: 9999px;
font-size: 0.75rem;
font-weight: 500;
}

.chipRemove {
background: none;
border: none;
color: #2563eb;
cursor: pointer;
padding: 0;
font-size: 1rem;
line-height: 1;
opacity: 0.7;
}

.chipRemove:hover {
opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
.filterBar {
padding: 1rem;
}

.filterControls {
flex-direction: column;
align-items: stretch;
}

.filterGroup {
min-width: 100%;
}

.ratingGroup {
flex-wrap: wrap;
}

.ratingInput {
flex: 1;
min-width: 80px;
}

.applyButton {
width: 100%;
padding: 0.75rem 1rem;
}
}

@media (max-width: 480px) {
.filterHeader {
flex-direction: column;
align-items: flex-start;
gap: 0.75rem;
}

.clearFiltersButton {
width: 100%;
}
}
Loading