9291bde531
Resolves #79 This Pull Request completes the visual implementation of the premium **"Warm Paper / Soft Sepia"** light theme across all user dashboard sub-modules and components. ### 🎨 Styling Refactoring & Light Sepia Layout We refactored isolated component styles (`.razor.css`) to ensure proper contrast, remove hardcoded dark tokens, and fix text visibility under the `.theme-light` environment: 1. **Dashboard & Sidebar Layouts:** * **MainHubLayout.razor.css** & **Dashboard.razor.css**: Replaced hardcoded dark backgrounds with `var(--bg-surface)` and `var(--bg-base)`. Overrode user name brackets, progress bar elements, active quiz cards, graph nodes, and buttons. 2. **Catalog & Library Pages:** * **Catalog.razor.css** & **MyBooks.razor.css**: Adjusted cover hover actions, overlay transparency, and progress tracks. Fixed course tile background gradients to use a warm, elegant `#e4e1d9` layer and `var(--text-main)` code text. 3. **Profile & Settings Views:** * **Profile.razor.css** & **Settings.razor.css**: Overrode token usage progress tracks, page title gradient transparency, section descriptions, and diagnostic button styling. 4. **Concepts Dashboard & Interactive Widgets:** * **ConceptsDashboard.razor.css** & **ConceptsMap.razor.css**: Transitioned node headers, unlocked/locked badges, warning blocks, and term pills to semantic colors. Removed neon glow animations for locked nodes. 5. **Intelligence Workspace & AI Responses:** * **Intelligence.razor.css** & **AiResponseRenderer.razor.css**: Refactored empty state welcome messages, placeholder styles, input fields, and robot avatar borders. Refined the linear-gradient mask fade effect to blend correctly into the light sepia surface environment rather than dropping into dark transparent channels. 6. **Dashboard Sidebar Widgets:** * **CurrentReadingWidget.razor.css** & **ContextualRecommendationsWidget.razor.css**: Replaced hardcoded `#1a1a1e` card containers and light text colors with semantic variables (`var(--bg-surface)`, `var(--border)`, `var(--text-main)`, and `var(--text-muted)`). ### 🛠️ Blazor CSS Isolation Compiler Compliance * Avoided the use of `:global(.theme-light)` selector overrides within isolated CSS rules because they are unsupported by Blazor's CSS isolation compiler and cause the compiled stylesheet to ignore them. * Replaced them with the correct standard selector format `.theme-light .some-class` which properly compiles to `.theme-light .some-class[b-xxxx]`, applying correct theme styles recursively to child scoped markup. ### 🧪 Verification * Checked that the solution builds cleanly with 0 compiler errors: `dotnet build NexusReader.slnx --no-restore` * Ran all unit tests successfully: `dotnet test NexusReader.slnx --no-restore` --------- Co-authored-by: Marek Jasiński <jasins.marek@gmail.com> Reviewed-on: #78 Co-authored-by: Antigravity <antigravity@google.com> Co-committed-by: Antigravity <antigravity@google.com>
331 lines
7.1 KiB
CSS
331 lines
7.1 KiB
CSS
/* ContextualRecommendationsWidget.razor.css
|
|
Uses Nexus Design System tokens (--nexus-*) for consistency.
|
|
*/
|
|
|
|
.recommendations-panel {
|
|
width: 100%;
|
|
padding: 1.75rem;
|
|
background: var(--nexus-surface, #1a1a1e);
|
|
border: 1px solid var(--nexus-border, rgba(255, 255, 255, 0.05));
|
|
border-radius: 12px;
|
|
transition: border-color 0.3s ease, box-shadow 0.3s ease;
|
|
}
|
|
|
|
.recommendations-panel:hover {
|
|
border-color: rgba(16, 185, 129, 0.2);
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
|
|
}
|
|
|
|
/* ── Panel Header ── */
|
|
.panel-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.header-left {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
color: var(--nexus-accent, #10b981);
|
|
}
|
|
|
|
.header-left h4 {
|
|
margin: 0;
|
|
font-size: 0.95rem;
|
|
font-weight: 600;
|
|
color: var(--nexus-text-primary, #ffffff);
|
|
letter-spacing: 0.02em;
|
|
}
|
|
|
|
.panel-badge {
|
|
font-size: 0.7rem;
|
|
font-weight: 700;
|
|
letter-spacing: 0.08em;
|
|
padding: 0.2rem 0.55rem;
|
|
border-radius: 100px;
|
|
background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(59, 130, 246, 0.1));
|
|
border: 1px solid rgba(16, 185, 129, 0.3);
|
|
color: var(--nexus-accent, #10b981);
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
/* ── Loading State ── */
|
|
.loading-state {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 1rem;
|
|
padding: 2rem 1rem;
|
|
}
|
|
|
|
.spinner-ring {
|
|
position: relative;
|
|
width: 40px;
|
|
height: 40px;
|
|
}
|
|
|
|
.spinner-track {
|
|
position: absolute;
|
|
inset: 0;
|
|
border-radius: 50%;
|
|
border: 3px solid rgba(255, 255, 255, 0.05);
|
|
}
|
|
|
|
.spinner-head {
|
|
position: absolute;
|
|
inset: 0;
|
|
border-radius: 50%;
|
|
border: 3px solid transparent;
|
|
border-top-color: var(--nexus-accent, #10b981);
|
|
animation: nexus-spin 0.8s linear infinite;
|
|
box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
|
|
}
|
|
|
|
@keyframes nexus-spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
.loading-label {
|
|
font-size: 0.82rem;
|
|
color: var(--nexus-text-secondary, #a1a1aa);
|
|
font-style: italic;
|
|
}
|
|
|
|
/* ── Empty / Error State ── */
|
|
.empty-state {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 0.75rem;
|
|
padding: 1.5rem;
|
|
text-align: center;
|
|
color: var(--nexus-text-secondary, #a1a1aa);
|
|
opacity: 0.65;
|
|
}
|
|
|
|
.empty-state p {
|
|
margin: 0;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
/* ── Recommendations List ── */
|
|
.recommendations-list {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.75rem;
|
|
}
|
|
|
|
.recommendation-item {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 0.75rem;
|
|
padding: 1rem 1.1rem;
|
|
border-radius: 10px;
|
|
background: rgba(255, 255, 255, 0.02);
|
|
border: 1px solid rgba(255, 255, 255, 0.06);
|
|
transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
|
|
cursor: default;
|
|
}
|
|
|
|
.recommendation-item:hover {
|
|
background: rgba(255, 255, 255, 0.04);
|
|
transform: translateX(2px);
|
|
}
|
|
|
|
.recommendation-item.premium {
|
|
border-color: rgba(245, 158, 11, 0.2);
|
|
}
|
|
|
|
.recommendation-item.premium:hover {
|
|
border-color: rgba(245, 158, 11, 0.4);
|
|
background: rgba(245, 158, 11, 0.04);
|
|
}
|
|
|
|
.recommendation-item.owned {
|
|
border-color: rgba(16, 185, 129, 0.1);
|
|
}
|
|
|
|
.recommendation-item.owned:hover {
|
|
border-color: rgba(16, 185, 129, 0.25);
|
|
}
|
|
|
|
/* ── Rec Content ── */
|
|
.rec-content {
|
|
flex: 1;
|
|
min-width: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.25rem;
|
|
}
|
|
|
|
.rec-meta {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
margin-bottom: 0.15rem;
|
|
}
|
|
|
|
.match-badge {
|
|
font-size: 0.8rem;
|
|
font-weight: 700;
|
|
color: var(--nexus-accent, #10b981);
|
|
background: rgba(16, 185, 129, 0.1);
|
|
border-radius: 4px;
|
|
padding: 0.1rem 0.45rem;
|
|
}
|
|
|
|
.match-unit {
|
|
font-size: 0.65rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.upsell-tag {
|
|
font-size: 0.7rem;
|
|
font-weight: 600;
|
|
letter-spacing: 0.05em;
|
|
color: #f59e0b;
|
|
background: rgba(245, 158, 11, 0.1);
|
|
border: 1px solid rgba(245, 158, 11, 0.2);
|
|
border-radius: 4px;
|
|
padding: 0.1rem 0.45rem;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.rec-book-title {
|
|
margin: 0;
|
|
font-size: 0.9rem;
|
|
font-weight: 600;
|
|
color: var(--nexus-text-primary, #ffffff);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.rec-chapter-title {
|
|
margin: 0;
|
|
font-size: 0.78rem;
|
|
color: var(--nexus-text-secondary, #a1a1aa);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
/* ── Action Button ── */
|
|
.rec-action-btn {
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: 8px;
|
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
background: transparent;
|
|
color: var(--nexus-text-secondary, #a1a1aa);
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.rec-action-btn:hover {
|
|
background: rgba(16, 185, 129, 0.1);
|
|
border-color: rgba(16, 185, 129, 0.3);
|
|
color: var(--nexus-accent, #10b981);
|
|
transform: scale(1.1);
|
|
}
|
|
|
|
.premium .rec-action-btn:hover {
|
|
background: rgba(245, 158, 11, 0.1);
|
|
border-color: rgba(245, 158, 11, 0.3);
|
|
color: #f59e0b;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.recommendations-panel {
|
|
padding: 1.25rem;
|
|
}
|
|
}
|
|
|
|
/* ============================================================
|
|
LIGHT THEME OVERRIDES — "Warm Paper / Soft Sepia"
|
|
============================================================ */
|
|
|
|
.theme-light .recommendations-panel {
|
|
background: var(--bg-surface);
|
|
border: 1px solid var(--border);
|
|
}
|
|
|
|
.theme-light .recommendations-panel:hover {
|
|
box-shadow: 0 8px 24px rgba(139, 130, 115, 0.12);
|
|
}
|
|
|
|
.theme-light .header-left h4 {
|
|
color: var(--text-main);
|
|
}
|
|
|
|
.theme-light .spinner-track {
|
|
border: 3px solid rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
.theme-light .loading-label,
|
|
.theme-light .empty-state {
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.theme-light .recommendation-item {
|
|
background: rgba(0, 0, 0, 0.02);
|
|
border: 1px solid rgba(0, 0, 0, 0.06);
|
|
}
|
|
|
|
.theme-light .recommendation-item:hover {
|
|
background: rgba(0, 0, 0, 0.04);
|
|
}
|
|
|
|
.theme-light .recommendation-item.premium {
|
|
border-color: rgba(245, 158, 11, 0.2);
|
|
}
|
|
|
|
.theme-light .recommendation-item.premium:hover {
|
|
border-color: rgba(245, 158, 11, 0.4);
|
|
background: rgba(245, 158, 11, 0.04);
|
|
}
|
|
|
|
.theme-light .recommendation-item.owned {
|
|
border-color: rgba(16, 185, 129, 0.1);
|
|
}
|
|
|
|
.theme-light .recommendation-item.owned:hover {
|
|
border-color: rgba(16, 185, 129, 0.25);
|
|
}
|
|
|
|
.theme-light .rec-book-title {
|
|
color: var(--text-main);
|
|
}
|
|
|
|
.theme-light .rec-chapter-title {
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.theme-light .rec-action-btn {
|
|
border: 1px solid rgba(0, 0, 0, 0.08);
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.theme-light .rec-action-btn:hover {
|
|
background: rgba(16, 185, 129, 0.1);
|
|
border-color: rgba(16, 185, 129, 0.3);
|
|
color: var(--accent);
|
|
}
|
|
|
|
.theme-light .premium .rec-action-btn:hover {
|
|
background: rgba(245, 158, 11, 0.1);
|
|
border-color: rgba(245, 158, 11, 0.3);
|
|
color: #f59e0b;
|
|
}
|