Special cakes UI: overlay drawer, basket integration, catalogue tag filter, form parsing, JS save/edit/remove. HTMX navigation: MainContent component, nav links with hx-get, handlers return partial on HX-Request. Dashboard: metrics grid, CakeBreakdown, OrderRow with status select, CakeCounts/OrderCounts, torty filter, tort badge, results-pane. Collapsible sidebar: toggle button, localStorage, CSS transitions. Location field: dropdown replaced with pill toggle. Inline style cleanup: moved to CSS classes (tag-grid, grow, icon.sm, header-actions, toggle-group, success-icon, etc.). Dead CSS removal: pagination, status-chip, badge-pill, login-page. Helpers: exported CakeTitle/OrderTitle, added tagNames, tagIDsComma, orderItemsDesc, specialCakeDetail, removed unused helpers.
280 lines
7.3 KiB
CSS
280 lines
7.3 KiB
CSS
/* ========== BUTTONS ========== */
|
|
.btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 0.5rem;
|
|
padding: 0 1rem;
|
|
height: 2.5rem;
|
|
border: none;
|
|
border-radius: var(--border-radius-sm);
|
|
font-size: 0.75rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all var(--transition);
|
|
text-decoration: none;
|
|
|
|
.material-symbols-outlined {
|
|
font-size: 1.25rem;
|
|
}
|
|
|
|
&.primary {
|
|
background: var(--primary);
|
|
color: var(--on-primary);
|
|
|
|
&:hover {
|
|
opacity: 0.9;
|
|
}
|
|
}
|
|
|
|
&.outline {
|
|
background: transparent;
|
|
border: 1px solid var(--outline-variant);
|
|
color: var(--on-surface);
|
|
|
|
&:hover {
|
|
background: var(--surface-container-high);
|
|
}
|
|
}
|
|
|
|
&.sm {
|
|
height: 2rem;
|
|
padding: 0 0.75rem;
|
|
}
|
|
}
|
|
|
|
/* ========== TABLE ACTIONS ========== */
|
|
.action-btn {
|
|
color: var(--on-surface-variant);
|
|
cursor: pointer;
|
|
transition: color var(--transition);
|
|
background: none;
|
|
border: none;
|
|
|
|
&:hover {
|
|
color: var(--primary);
|
|
}
|
|
|
|
.material-symbols-outlined {
|
|
font-size: 1.25rem;
|
|
}
|
|
}
|
|
|
|
/* ========== TAG CHIPS ========== */
|
|
.tag-chip {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
padding: 0.25rem 0.5rem;
|
|
border-radius: var(--border-radius-full);
|
|
font-size: 0.75rem;
|
|
font-weight: 600;
|
|
color: var(--on-surface-variant);
|
|
background: var(--surface-container-high);
|
|
border: 1px solid var(--outline-variant);
|
|
cursor: pointer;
|
|
user-select: none;
|
|
transition: all var(--transition);
|
|
|
|
&.sm {
|
|
font-size: 0.625rem;
|
|
padding: 0.125rem 0.375rem;
|
|
}
|
|
|
|
&:hover,
|
|
&.active {
|
|
color: var(--primary);
|
|
border-color: var(--primary);
|
|
background: var(--primary-container);
|
|
}
|
|
}
|
|
|
|
/* ========== PRESET BUTTONS ========== */
|
|
.preset-group {
|
|
display: flex;
|
|
}
|
|
|
|
.preset-btn {
|
|
padding: 0.375rem 0.625rem;
|
|
font-size: 0.8125rem;
|
|
font-weight: 600;
|
|
color: var(--on-surface-variant);
|
|
text-decoration: none;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
|
|
&:hover,
|
|
&.active {
|
|
color: var(--primary);
|
|
}
|
|
}
|
|
|
|
/* ========== OVERLAY / DRAWER ========== */
|
|
.overlay {
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: 1000;
|
|
display: none;
|
|
}
|
|
.overlay.open {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
}
|
|
.overlay-backdrop {
|
|
position: absolute;
|
|
inset: 0;
|
|
background: rgba(0, 0, 0, 0.3);
|
|
}
|
|
.overlay-panel {
|
|
position: relative;
|
|
width: 22rem;
|
|
max-width: 100vw;
|
|
height: 100%;
|
|
background: var(--surface);
|
|
display: flex;
|
|
flex-direction: column;
|
|
box-shadow: -0.25rem 0 1.5rem rgba(0, 0, 0, 0.15);
|
|
animation: slideIn 0.2s ease;
|
|
}
|
|
@keyframes slideIn {
|
|
from { transform: translateX(100%); }
|
|
to { transform: translateX(0); }
|
|
}
|
|
.overlay-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 1rem 1.25rem;
|
|
border-bottom: 1px solid var(--outline-variant);
|
|
}
|
|
.overlay-header h2 {
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
.overlay-header .close-btn {
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
color: var(--on-surface-variant);
|
|
padding: 0.25rem;
|
|
border-radius: var(--border-radius-sm);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
.overlay-header .close-btn:hover {
|
|
background: var(--surface-container-high);
|
|
color: var(--on-surface);
|
|
}
|
|
.overlay-body {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 1.25rem;
|
|
}
|
|
.overlay-footer {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
justify-content: flex-end;
|
|
padding: 1rem 1.25rem;
|
|
border-top: 1px solid var(--outline-variant);
|
|
}
|
|
|
|
/* ========== CARD HEADER ACTIONS ========== */
|
|
.header-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
/* ========== TORT BADGE ========== */
|
|
.tort-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 1.25rem;
|
|
height: 1.25rem;
|
|
border-radius: var(--border-radius-full);
|
|
background: var(--primary-container);
|
|
color: var(--primary);
|
|
flex-shrink: 0;
|
|
vertical-align: middle;
|
|
margin-right: 0.25rem;
|
|
}
|
|
.tort-badge .material-symbols-outlined {
|
|
font-size: 0.75rem;
|
|
}
|
|
|
|
/* ========== SEARCH INPUT UTILITY ========== */
|
|
.search-wrapper { position: relative; width: 11.25rem; }
|
|
.search-icon { position: absolute; left: 0.5rem; top: 50%; transform: translateY(-50%); font-size: 1rem; color: var(--on-surface-variant); pointer-events: none; }
|
|
.search-input { height: 1.75rem; padding-left: 1.75rem; padding-right: 0.5rem; font-size: 0.75rem; border: 1px solid var(--outline-variant); border-radius: var(--border-radius-sm); background: var(--surface-container-lowest); color: var(--on-surface); outline: none; width: 100%; }
|
|
|
|
/* ========== STATUS SELECT ========== */
|
|
.status-select { font-size: 0.75rem; font-weight: 600; padding: 0.25rem 0.375rem; border: 1px solid var(--outline-variant); border-radius: var(--border-radius-sm); background: var(--surface); color: var(--on-surface); cursor: pointer; }
|
|
|
|
/* ========== FONT UTILITIES ========== */
|
|
.font-bold { font-weight: 700; }
|
|
|
|
/* ========== CAKE BREAKDOWN LIST ========== */
|
|
.breakdown-list { list-style: none; padding: 0; margin: 0; }
|
|
.breakdown-item { display: flex; justify-content: space-between; padding: 0.375rem 0; border-bottom: 1px solid var(--outline-variant); }
|
|
.breakdown-amount { font-weight: 600; }
|
|
.breakdown-empty { color: var(--on-surface-variant); font-size: 0.75rem; }
|
|
|
|
/* ========== FILTER BAR (catalogue/cakes page) ========== */
|
|
.filter-bar { padding: 0.5rem 1rem; border-bottom: 1px solid var(--outline-variant); display: flex; flex-wrap: wrap; gap: 0.25rem; align-items: center; }
|
|
.filter-bar .filter-label { font-size: 0.75rem; font-weight: 600; color: var(--on-surface-variant); align-self: center; margin-right: 0.25rem; }
|
|
|
|
/* ========== CATALOGUE TAG ROW ========== */
|
|
.tag-row { padding: 0.5rem 1rem 0; display: flex; flex-wrap: wrap; gap: 0.25rem; }
|
|
|
|
/* ========== CATALOGUE SCROLL ========== */
|
|
.catalogue-scroll { overflow-y: auto; padding: 1rem; }
|
|
|
|
/* ========== BASKET ACTIONS ========== */
|
|
.basket-actions { display: flex; flex-direction: column; gap: 0.125rem; }
|
|
|
|
/* ========== TAG GROUP ========== */
|
|
.tag-group { margin-top: 0.25rem; display: flex; flex-wrap: wrap; gap: 0.125rem; }
|
|
|
|
/* ========== OVERLAY FORM ========== */
|
|
.overlay-form { display: flex; flex-direction: column; gap: 0.75rem; }
|
|
|
|
/* ========== TAG CONTAINER ========== */
|
|
.tag-grid { display: flex; flex-wrap: wrap; gap: 0.25rem; }
|
|
|
|
/* ========== FONT UTILITIES ========== */
|
|
.font-medium { font-weight: 500; }
|
|
|
|
/* ========== FLEX UTILITIES ========== */
|
|
.grow { flex: 1; }
|
|
|
|
.icon.sm { width: 1.75rem; height: 1.75rem; }
|
|
.icon.sm .material-symbols-outlined { font-size: 1rem; }
|
|
|
|
/* ========== RESULTS PANE ========== */
|
|
#results-pane { display: flex; flex-direction: column; gap: 1rem; }
|
|
|
|
/* ========== CONFIRMATION ========== */
|
|
section.confirmation {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex: 1;
|
|
gap: 0.5rem;
|
|
text-align: center;
|
|
|
|
.success-icon {
|
|
font-size: 3rem;
|
|
color: var(--success-text);
|
|
}
|
|
|
|
h2 {
|
|
font-size: 1.25rem;
|
|
font-weight: 600;
|
|
color: var(--on-surface);
|
|
}
|
|
}
|