Files
smartguide/webapp/src/styles.scss
T

698 lines
16 KiB
SCSS

// Custom Theming for Angular Material
// For more information: https://material.angular.io/guide/theming
@use '@angular/material' as mat;
@use 'm3-theme' as m3;
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,200..700,0..1,-50..200');
@include mat.elevation-classes();
@include mat.app-background();
@font-face {
font-display: swap;
font-family: 'Montserrat';
font-style: normal;
font-weight: 400;
src: url('assets/fonts/montserrat-v26-latin-regular.woff2') format('woff2');
}
@font-face {
font-display: swap;
font-family: 'Montserrat';
font-style: italic;
font-weight: 400;
src: url('assets/fonts/montserrat-v26-latin-italic.woff2') format('woff2');
}
@font-face {
font-display: swap;
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: url('assets/fonts/open-sans-v40-latin-regular.woff2') format('woff2');
}
@font-face {
font-display: swap;
font-family: 'Open Sans';
font-style: italic;
font-weight: 400;
src: url('assets/fonts/open-sans-v40-latin-italic.woff2') format('woff2');
}
@font-face {
font-display: swap;
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: url('assets/fonts/material-icons-v142-latin-regular.woff2')
format('woff2');
}
.material-icons {
font-family: 'Material Icons';
font-weight: normal;
font-style: normal;
font-size: 24px;
line-height: 1;
letter-spacing: normal;
text-transform: none;
display: inline-block;
white-space: nowrap;
word-wrap: normal;
direction: ltr;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
}
.material-symbols-outlined {
font-family: 'Material Symbols Outlined';
font-weight: normal;
font-style: normal;
font-size: 24px;
line-height: 1;
letter-spacing: normal;
text-transform: none;
display: inline-block;
white-space: nowrap;
word-wrap: normal;
direction: ltr;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
}
/* Angular Material M3 Base Themes */
html {
padding: env(safe-area-inset-top) env(safe-area-inset-right)
env(safe-area-inset-bottom) env(safe-area-inset-left);
height: 100%;
background: var(--sg-background);
@include mat.all-component-themes(m3.$light-theme);
@include mat.system-level-colors(m3.$light-theme);
@include mat.typography-hierarchy(m3.$light-theme);
}
html.dark-theme {
@include mat.all-component-colors(m3.$dark-theme);
@include mat.system-level-colors(m3.$dark-theme);
}
body {
height: 100%;
margin: 0;
background: var(--sg-background);
color: var(--sg-text);
font-family: 'Open Sans', Arial, sans-serif;
font-size: 14px;
line-height: 1.45;
}
/* Centralized Design Tokens (Semantic CSS Custom Properties) */
:root {
/* Light Theme Palette */
--sg-background: #ffffff;
--sg-surface: #ffffff;
--sg-surface-muted: #f7f9ff;
--sg-surface-soft: #f3f6fd;
--sg-border: #dde5f2;
--sg-border-strong: #c7d3e8;
--sg-text: #101a3d;
--sg-text-muted: #64708f;
--sg-text-soft: #8a95b3;
--sg-primary: #0b1020;
--sg-primary-strong: #030712;
--sg-primary-soft: #f1f3f7;
--sg-success: #12864e;
--sg-success-soft: #e9f9f0;
--sg-warning-soft: #f4ecff;
--sg-warning: #6c3bd2;
--sg-shadow-sm:
0 1px 2px rgba(16, 26, 61, 0.04), 0 1px 8px rgba(16, 26, 61, 0.04);
--sg-shadow-md: 0 12px 32px rgba(16, 26, 61, 0.08);
--sg-sidebar-width: 280px;
--sg-radius-sm: 8px;
--sg-radius-md: 12px;
--sg-radius-lg: 18px;
--sg-blue-highlight: #3d7cff;
/* Backdrop for a keyword match that resolved to no topic. Topic-bound matches carry
their topic's colour instead. */
--sg-highlight-mark-bg: rgba(255, 214, 0, 0.35);
--sg-default-bold-weight: 900;
/* Additional Design Tokens for Dark Mode Support */
--sg-color-mix-base: #ffffff;
--sg-card-bg: #ffffff;
--sg-card-hover-border: #93c5fd;
--sg-chart-text: #334155;
--sg-chart-text-muted: #64748b;
--sg-chart-grid: #e2e8f0;
--sg-chart-bg: #ffffff;
--sg-error: #ba1a1a;
--sg-error-soft: #ffdad6;
--sg-banner-warning-bg: #fff7ed;
--sg-banner-warning-border: #fed7aa;
--sg-banner-warning-text: #9a3412;
--sg-option-hover: rgba(0, 0, 0, 0.04);
--sg-avatar-gradient: linear-gradient(135deg, #dce8ff, #ffffff);
/* Skeleton loading */
--sg-skeleton-base: #e5ebf5;
--sg-skeleton-highlight: #f7f9ff;
@include mat.button-toggle-overrides(
(
shape: var(--sg-radius-sm),
divider-color: var(--sg-border),
)
);
@include mat.form-field-overrides(
(
outlined-container-shape: var(--sg-radius-sm),
outlined-outline-color: var(--sg-border),
)
);
@include mat.card-overrides(
(
outlined-container-color: var(--sg-background),
outlined-outline-color: var(--sg-border),
)
);
@include mat.divider-overrides(
(
color: var(--sg-border),
)
);
@include mat.select-overrides(
(
panel-background-color: var(--sg-surface),
)
);
@include mat.button-overrides(
(
outlined-container-shape: var(--sg-radius-sm),
outlined-outline-color: var(--sg-border),
)
);
@include mat.tabs-overrides(
(
active-label-text-color: var(--sg-blue-highlight),
inactive-label-text-color: var(--sg-text-muted),
active-hover-label-text-color: var(--sg-blue-highlight),
inactive-hover-label-text-color: var(--sg-text),
active-focus-label-text-color: var(--sg-blue-highlight),
inactive-focus-label-text-color: var(--sg-text),
active-indicator-color: var(--sg-blue-highlight),
active-hover-indicator-color: var(--sg-blue-highlight),
active-ripple-color: transparent,
inactive-ripple-color: transparent,
divider-color: var(--sg-border),
background-color: transparent,
pagination-icon-color: var(--sg-text-muted),
)
);
@include mat.menu-overrides(
(
container-color: var(--sg-surface),
item-label-text-color: var(--sg-text),
)
);
@include mat.dialog-overrides(
(
container-color: var(--sg-card-bg),
subhead-color: var(--sg-text-muted),
)
);
@include mat.tooltip-overrides(
(
container-color: var(--sg-surface-muted),
supporting-text-color: var(--sg-text),
)
);
}
/* Dark Theme Overrides */
html.dark-theme {
--sg-background: #0b0f19;
--sg-surface: #131b2e;
--sg-surface-muted: #1a2340;
--sg-surface-soft: #17203a;
--sg-border: #283654;
--sg-border-strong: #374a6e;
--sg-text: #e8edf8;
--sg-text-muted: #9aa8c7;
--sg-text-soft: #6b7a9e;
--sg-primary: #a4c4ff;
--sg-primary-strong: #d3e3ff;
--sg-primary-soft: #1c2a4a;
--sg-success: #4ade80;
--sg-success-soft: #0f2a1c;
--sg-warning-soft: #2a1f3d;
--sg-warning: #b69df7;
--sg-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 8px rgba(0, 0, 0, 0.2);
--sg-shadow-md: 0 12px 32px rgba(0, 0, 0, 0.4);
--sg-blue-highlight: #7ba7fb;
--sg-color-mix-base: #1a2340;
--sg-card-bg: #131b2e;
--sg-card-hover-border: #3b6fd4;
--sg-chart-text: #c8d5e8;
--sg-chart-text-muted: #8a95b3;
--sg-chart-grid: #283654;
--sg-chart-bg: #131b2e;
--sg-error: #ffb4ab;
--sg-error-soft: #410002;
--sg-banner-warning-bg: #3d2200;
--sg-banner-warning-border: #6b3a00;
--sg-banner-warning-text: #ffb74d;
--sg-option-hover: rgba(255, 255, 255, 0.06);
--sg-avatar-gradient: linear-gradient(135deg, #1c2a4a, #131b2e);
/* Skeleton loading */
--sg-skeleton-base: #202d49;
--sg-skeleton-highlight: #2b3b5d;
}
/* Theme-Based Scrollbars (W3C Standard & WebKit Engine) */
* {
box-sizing: border-box;
scrollbar-width: thin;
scrollbar-color: var(--sg-border-strong) transparent;
}
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: var(--sg-border-strong);
border-radius: 999px;
border: 2px solid transparent;
background-clip: content-box;
&:hover {
background: var(--sg-text-soft);
background-clip: content-box;
}
}
::-webkit-scrollbar-corner {
background: transparent;
}
/* Browser Primitive Enhancements */
input,
textarea,
.mat-mdc-input-element {
color: var(--sg-text) !important;
caret-color: var(--sg-blue-highlight) !important;
}
input:-webkit-autofill,
textarea:-webkit-autofill {
-webkit-text-fill-color: var(--sg-text) !important;
-webkit-box-shadow: 0 0 0px 1000px var(--sg-surface) inset !important;
transition: background-color 5000s ease-in-out 0s;
}
::placeholder {
color: var(--sg-text-muted);
opacity: 0.8;
}
::selection {
background: var(--sg-primary-soft);
color: var(--sg-text);
}
:focus-visible {
outline: 2px solid var(--sg-blue-highlight);
outline-offset: 2px;
}
/* Unified Navigation Tabs Component System (.sg-tab-nav) */
.sg-tab-nav,
.mat-mdc-tab-nav-bar,
.mat-mdc-tab-group {
--mdc-tab-hover-state-layer-color: transparent;
--mdc-tab-focus-state-layer-color: transparent;
background: transparent;
border-bottom: 1px solid var(--sg-border);
.mat-mdc-tab-link,
.mat-mdc-tab {
min-width: 120px;
height: 48px;
padding: 0 16px;
font-size: 14px;
font-weight: 600;
color: var(--sg-text-muted);
transition:
color 0.15s ease,
background-color 0.15s ease;
.mdc-tab__ripple::before {
background: transparent !important;
}
.mdc-tab__text-label,
mat-icon {
color: var(--sg-text-muted);
transition: color 0.15s ease;
}
&:hover {
background: var(--sg-option-hover);
.mdc-tab__text-label,
mat-icon {
color: var(--sg-text) !important;
}
}
&.mdc-tab--active,
&.mat-mdc-tab-link-active {
.mdc-tab__text-label,
mat-icon {
color: var(--sg-blue-highlight) !important;
}
.mdc-tab-indicator__content--underline {
border-color: var(--sg-blue-highlight) !important;
border-top-width: 3px !important;
}
}
}
}
a {
color: var(--sg-primary);
}
button,
input {
font: inherit;
}
.mat-mdc-table,
.mat-mdc-paginator,
.mat-mdc-tab-link,
.mat-mdc-list-item,
.mat-mdc-button,
.mat-mdc-raised-button,
.mat-mdc-outlined-button,
.mat-mdc-unelevated-button {
font-family: 'Open Sans', Arial, sans-serif;
}
.mat-mdc-list-item,
.mat-mdc-tab-link,
.mat-mdc-button,
.mat-mdc-outlined-button,
.mat-mdc-icon-button {
font-size: 14px;
}
.data-table-container {
.mat-mdc-header-cell {
color: var(--sg-text-muted);
font-size: 12px;
font-weight: 700;
}
.mat-mdc-row {
height: 86px;
}
.mat-mdc-cell {
color: var(--sg-text);
border-bottom-color: var(--sg-border);
font-size: 13px;
}
.mat-column-institutions,
.mat-column-topics {
overflow: visible;
}
}
h1,
h2,
h3 {
color: var(--sg-text);
font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
letter-spacing: 0;
}
.primary-button {
@include mat.button-color(m3.$light-theme, $color-variant: primary);
}
.secondary-button {
@include mat.button-color(m3.$light-theme, $color-variant: secondary);
}
.tertiary-button {
@include mat.button-color(m3.$light-theme, $color-variant: tertiary);
}
.primary-icon {
@include mat.icon-color(m3.$light-theme, $color-variant: primary);
}
.secondary-icon {
@include mat.icon-color(m3.$light-theme, $color-variant: secondary);
}
.tertiary-icon {
@include mat.icon-color(m3.$light-theme, $color-variant: tertiary);
}
html.dark-theme {
.primary-button {
@include mat.button-color(m3.$dark-theme, $color-variant: primary);
}
.secondary-button {
@include mat.button-color(m3.$dark-theme, $color-variant: secondary);
}
.tertiary-button {
@include mat.button-color(m3.$dark-theme, $color-variant: tertiary);
}
.primary-icon {
@include mat.icon-color(m3.$dark-theme, $color-variant: primary);
}
.secondary-icon {
@include mat.icon-color(m3.$dark-theme, $color-variant: secondary);
}
.tertiary-icon {
@include mat.icon-color(m3.$dark-theme, $color-variant: tertiary);
}
}
.menu button {
--mat-icon-button-disabled-icon-color: rgba(255, 255, 255, 0.35);
--mat-icon-button-icon-color: #ffffff;
}
.popup {
animation: popup 250ms ease-out;
}
@keyframes popup {
from {
opacity: 0;
transform: scale(0.8);
}
to {
opacity: 1;
transform: scale(1);
}
}
/* highlighted text */
.app-highlight-mark {
background-color: var(--sg-highlight-mark-bg);
border-radius: 2px;
padding: 0 1px;
}
.app-highlight-mark--topic {
background: transparent;
color: var(--t);
text-decoration: underline;
text-decoration-color: var(--t);
text-decoration-thickness: 2px;
text-underline-offset: 2px;
font-weight: inherit;
border-radius: 2px;
padding: 0 1px;
transition: background 0.15s;
&:hover {
background: color-mix(in srgb, var(--t) 15%, var(--sg-color-mix-base));
}
}
@keyframes kw-flash {
0%,
40% {
background: color-mix(in srgb, var(--t) 45%, var(--sg-color-mix-base));
}
100% {
background: transparent;
}
}
.kw-flash {
animation: kw-flash 2.4s ease-out forwards;
}
/* Theme-aware text skeleton */
.sk-text-loading {
display: inline-block;
overflow: hidden;
min-height: 1em;
color: transparent !important;
pointer-events: none;
user-select: none;
border-radius: 4px;
vertical-align: middle;
background: linear-gradient(
90deg,
var(--sg-skeleton-base) 25%,
var(--sg-skeleton-highlight) 50%,
var(--sg-skeleton-base) 75%
);
background-size: 600px 100%;
animation: sk-shimmer 1.6s infinite linear;
}
.sk-text-loading > * {
visibility: hidden;
}
@keyframes sk-shimmer {
from {
background-position: -600px 0;
}
to {
background-position: 600px 0;
}
}
/* Do not animate for users who request reduced motion */
@media (prefers-reduced-motion: reduce) {
.sk-text-loading {
animation: none;
background: var(--sg-skeleton-base);
}
}
.topic-chip-tooltip,
.topic-chip-tooltip .mdc-tooltip__surface,
.topic-chip-tooltip .mat-mdc-tooltip-surface,
.institution-origin-tooltip,
.institution-origin-tooltip .mdc-tooltip__surface,
.institution-origin-tooltip .mat-mdc-tooltip-surface {
max-width: 320px;
white-space: pre-line;
}
.mat-mdc-tooltip .mdc-tooltip__surface,
.mdc-tooltip__surface {
background-color: var(--sg-surface-muted) !important;
color: var(--sg-text) !important;
border: 1px solid var(--sg-border);
box-shadow: var(--sg-shadow-sm);
font-size: 12px;
line-height: 1.4;
}
.cdk-overlay-pane.app-tooltip-panel {
max-height: 70vh;
overflow: auto;
}
.cdk-overlay-pane .mat-mdc-option {
padding: 0 18px;
font-size: 13px;
background: var(--sg-surface-muted);
border-bottom: 1px solid var(--sg-border);
}
.cdk-overlay-pane .mat-mdc-option:last-child {
border-bottom: none;
}
.cdk-overlay-pane .mat-mdc-option mat-icon {
margin-right: 12px;
color: var(--sg-text-soft);
}
.cdk-overlay-pane .mat-mdc-option:hover,
.cdk-overlay-pane .mat-mdc-option.mdc-list-item--focused {
background: var(--sg-option-hover);
}
.career-stage-tooltip,
.career-stage-tooltip .mdc-tooltip__surface {
max-width: 360px;
white-space: pre-line;
}
.cdk-overlay-pane .mat-mdc-option small {
display: block;
color: var(--sg-text-muted);
font-size: 11px;
line-height: 1.2;
}
.cdk-overlay-pane .select-search {
position: sticky;
top: 0;
z-index: 1;
display: flex;
align-items: center;
gap: 6px;
min-width: 200px;
padding: 8px 12px;
background: var(--sg-surface, #fff);
border-bottom: 1px solid var(--sg-border);
}
.cdk-overlay-pane .select-search__icon {
flex-shrink: 0;
width: 16px;
height: 16px;
font-size: 16px;
color: var(--sg-text-soft);
}
.cdk-overlay-pane .select-search__input {
flex: 1;
min-width: 0;
border: none;
outline: none;
background: transparent;
color: var(--sg-text);
font-family: inherit;
font-size: 13px;
}
.cdk-overlay-pane .select-search__empty {
padding: 10px 14px;
color: var(--sg-text-muted);
font-size: 13px;
}
/* Scalable Relative Inline Icon Utility */
.pie-icon-indicator {
font-size: 1.1em !important;
width: 1.1em !important;
height: 1.1em !important;
line-height: 1.1em !important;
vertical-align: middle;
flex-shrink: 0;
transition: transform 0.3s ease;
}