grocery-app/frontend/src/styles/components/HouseholdSwitcher.css
2026-01-27 00:03:58 -08:00

126 lines
2.2 KiB
CSS

.household-switcher {
position: relative;
display: inline-block;
}
.household-switcher-toggle {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.5rem;
padding: 0.5rem 1rem;
background: var(--card-bg);
border: 1px solid var(--border);
border-radius: 6px;
color: var(--text-primary);
font-size: 1rem;
cursor: pointer;
transition: all 0.2s ease;
width: 100%;
}
.household-switcher-toggle:hover {
background: var(--card-hover);
border-color: var(--primary);
}
.household-switcher-toggle:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.household-name {
font-weight: 500;
flex: 1;
text-align: left;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.dropdown-icon {
font-size: 0.75rem;
transition: transform 0.2s ease;
flex-shrink: 0;
margin-left: auto;
}
.dropdown-icon.open {
transform: rotate(180deg);
}
.household-switcher-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 999;
}
.household-switcher-dropdown {
position: absolute;
top: calc(100% + 0.5rem);
left: 0;
right: 0;
width: 100%;
background: var(--card-bg);
border: 2px solid var(--border);
border-radius: 8px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
z-index: 1000;
overflow: hidden;
}
.household-option {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
padding: 0.875rem 1rem;
background: var(--card-bg);
border: none;
border-bottom: 1px solid var(--border);
color: var(--text-primary);
font-size: 1rem;
text-align: left;
cursor: pointer;
transition: all 0.2s ease;
}
.household-option:last-child {
border-bottom: none;
}
.household-option:hover {
background: var(--card-hover);
border-color: var(--primary);
}
.household-option.active {
background: rgba(30, 144, 255, 0.15);
color: var(--primary);
font-weight: 600;
}
.check-mark {
color: var(--primary);
font-weight: bold;
font-size: 1.1rem;
}
.household-divider {);
margin: 0.25rem 0;
}
.create-household-btn {
color: var(--primary);
font-weight: 600;
}
.create-household-btn:hover {
background: rgba(30, 144, 255, 0.15
.create-household-btn:hover {
background: var(--primary-color-light);
}