ObsiViewer/src/styles.css

516 lines
12 KiB
CSS

@import './styles-test.css';
@import './styles/_overlay-scrollbar.css';
@import './styles/codemirror.css';
/* Excalidraw CSS variables (thème sombre) */
/* .excalidraw {
--color-primary: #ffffff;
--color-secondary: #333333;
--color-background: #121212;
--color-border: #444444;
--color-text: #ffffff;
--color-ui-element: #2d2d2d;
--color-selected: #007bff;
--color-hover: #333333;
--color-error: #ff4d4f;
--color-success: #52c41a;
} */
/* .excalidraw {
--color-background: #1e1e1e !important;
--color-text: white !important;
--color-ui-element: #2d2d2d !important;
} */
.md-attachment-figure {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.25rem;
}
/* Excalidraw host sizing to ensure canvas renders full size */
excalidraw-editor {
display: block;
width: 100%;
height: 100%;
min-height: 480px;
position: relative; /* anchor absolutely-positioned children if any */
}
/* Scoped minimal layout for Excalidraw internals */
excalidraw-editor .excalidraw {
width: 100%;
height: 100%;
position: relative;
overflow: hidden;
}
excalidraw-editor .excalidraw .excalidraw__canvas-container,
excalidraw-editor .excalidraw .layer-ui__wrapper {
position: absolute;
inset: 0;
}
/* Removed global .excalidraw override to avoid conflicting with Excalidraw internal styles */
.md-attachment-figure img {
margin-bottom: 0;
}
.md-task-list {
list-style: none;
margin: 0 0 1rem 0;
padding: 0;
}
.md-task-item {
list-style: none;
margin-bottom: 0.5rem;
}
.md-task {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.95rem;
}
.md-task-checkbox {
appearance: none;
width: 1.1rem;
height: 1.1rem;
border-radius: 0.35rem;
border: 2px solid var(--task-checkbox-border, #64748b);
background-color: transparent;
position: relative;
}
.md-task-item--done .md-task-checkbox {
border-color: var(--task-checkbox-checked-border, #22c55e);
background-color: var(--task-checkbox-checked-bg, #22c55e);
}
.md-task-item--done .md-task-label-text {
text-decoration: line-through;
color: var(--task-checkbox-done-text, #94a3b8);
}
.md-task-checkbox::after {
content: '';
position: absolute;
top: 0.05rem;
left: 0.25rem;
width: 0.35rem;
height: 0.65rem;
border-right: 2px solid white;
border-bottom: 2px solid white;
transform: rotate(45deg);
opacity: 0;
}
.md-task-item--done .md-task-checkbox::after {
opacity: 1;
}
.md-external-link {
color: var(--external-link, #6366f1);
text-decoration: underline;
text-decoration-thickness: 2px;
text-underline-offset: 3px;
transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.md-external-link:hover,
.md-external-link:focus-visible {
color: var(--external-link-hover, #4338ca);
text-decoration-color: currentColor;
}
.md-external-link:focus-visible {
outline: 2px solid currentColor;
outline-offset: 2px;
}
.md-footnotes {
border-top: 1px solid color-mix(in srgb, var(--brand) 35%, rgba(148, 163, 184, 0.25));
padding-top: 1.5rem;
}
.md-footnotes header {
font-size: 0.75rem;
letter-spacing: 0.08em;
color: var(--footnotes-heading, #475569);
}
.md-footnotes ol {
counter-reset: footnote-counter;
margin: 0;
padding-left: 1.5rem;
}
.md-footnote-item {
position: relative;
color: var(--footnotes-text, color-mix(in srgb, var(--brand-800) 35%, #475569));
}
.md-footnote-item p {
margin: 0;
}
.md-footnote-ref {
font-size: 0.75rem;
margin-left: 0.15rem;
}
.md-footnote-ref a {
text-decoration: none;
}
.md-footnote-ref a:hover,
.md-footnote-ref a:focus-visible {
text-decoration: underline;
}
.md-wiki-link {
color: var(--wiki-link, #4f46e5);
text-decoration: underline;
text-decoration-thickness: 1px;
text-underline-offset: 3px;
cursor: pointer;
}
.md-wiki-link:hover,
.md-wiki-link:focus-visible {
color: var(--wiki-link-hover, #4338ca);
text-decoration-thickness: 2px;
}
.md-wiki-link.wikilink-orphan {
color: var(--wiki-link-orphan, #94a3b8);
text-decoration-style: dashed;
}
.md-wiki-link.wikilink-orphan:hover,
.md-wiki-link.wikilink-orphan:focus-visible {
color: var(--wiki-link-orphan-hover, #64748b);
}
/* Note preview overlay styles */
.note-preview-overlay {
z-index: 1000;
}
.cdk-overlay-backdrop {
background: rgba(0, 0, 0, 0.32);
}
.cdk-overlay-backdrop.cdk-overlay-backdrop-showing {
opacity: 1;
}
.md-math-inline {
font-family: "Cambria", "Times New Roman", serif;
background-color: rgba(148, 163, 184, 0.2);
padding: 0 0.25rem;
border-radius: 0.25rem;
}
.md-math-block {
font-family: "Cambria", "Times New Roman", serif;
background-color: rgba(148, 163, 184, 0.15);
padding: 1rem;
margin: 1.5rem 0;
border-radius: 0.5rem;
text-align: center;
}
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
html, body {
height: auto;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
&:root {
--external-link: #6366f1;
--external-link-hover: #4338ca;
--task-checkbox-border: #94a3b8;
--task-checkbox-checked-border: #22c55e;
--task-checkbox-checked-bg: #22c55e;
--task-checkbox-done-text: #94a3b8;
--btn-border-color: color-mix(in srgb, var(--border) 65%, transparent);
--btn-border-strong: var(--border);
--btn-hover-background: color-mix(in srgb, var(--bg-muted) 42%, transparent);
--btn-focus-ring: color-mix(in srgb, var(--border) 45%, transparent);
--btn-muted-text: var(--text-muted);
--scrollbar-thumb-color: rgba(148, 163, 184, 0.45);
--scrollbar-thumb-color-active: rgba(148, 163, 184, 0.75);
}
.dark {
--external-link: #22d3ee;
--external-link-hover: #0ea5e9;
--task-checkbox-border: #64748b;
--task-checkbox-checked-border: #22c55e;
--task-checkbox-checked-bg: #15803d;
--task-checkbox-done-text: #64748b;
--btn-border-color: color-mix(in srgb, var(--border) 70%, transparent);
--btn-border-strong: color-mix(in srgb, var(--border) 88%, transparent);
--btn-hover-background: color-mix(in srgb, var(--bg-muted) 36%, transparent);
--btn-focus-ring: color-mix(in srgb, var(--border) 55%, transparent);
--btn-muted-text: var(--text-muted);
--scrollbar-thumb-color: rgba(148, 163, 184, 0.35);
--scrollbar-thumb-color-active: rgba(226, 232, 240, 0.72);
}
@media (min-width: 1024px) {
body {
height: 100vh;
overflow: hidden;
}
}
}
@layer components {
/* Adaptive scrollbar states */
.adaptive-scrollbar {
position: relative;
scrollbar-width: thin;
scrollbar-gutter: stable both-edges;
--scrollbar-thumb-transition: 240ms ease;
}
.adaptive-scrollbar[data-scroll-state="idle"] {
scrollbar-width: none;
scrollbar-color: transparent transparent;
}
.adaptive-scrollbar[data-scroll-state="mini"] {
scrollbar-color: color-mix(in srgb, var(--scrollbar-thumb-color) 80%, transparent) transparent;
}
.adaptive-scrollbar[data-scroll-state="active"] {
scrollbar-color: color-mix(in srgb, var(--scrollbar-thumb-color-active) 100%, transparent) transparent;
}
.adaptive-scrollbar::-webkit-scrollbar {
width: 10px;
height: 10px;
background-color: transparent;
}
.adaptive-scrollbar::-webkit-scrollbar-thumb {
border-radius: 9999px;
background-color: transparent;
box-shadow: inset 0 0 0 1px transparent;
transition: background-color var(--scrollbar-thumb-transition), box-shadow var(--scrollbar-thumb-transition), opacity var(--scrollbar-thumb-transition);
opacity: 0;
}
.adaptive-scrollbar[data-scroll-state="mini"]::-webkit-scrollbar-thumb {
background-color: var(--scrollbar-thumb-color);
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
opacity: 0.8;
}
.adaptive-scrollbar[data-scroll-state="active"]::-webkit-scrollbar-thumb {
background-color: var(--scrollbar-thumb-color-active);
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
opacity: 1;
}
.adaptive-scrollbar::-webkit-scrollbar-track {
background: transparent;
}
.calendar-compact {
/* @apply flex min-h-[180px] max-h-[200px] flex-col; */
display: flex;
flex-direction: column;
min-height: 180px;
max-height: 200px;
border: 1px solid #1C2740;
border-radius: 0.25rem;
background-color: #1C2740;
}
.calendar-compact .cal-month-view {
flex: 1 1 auto;
/* border: 1px solid #1C2740; */
/* border-radius: 0.25rem; */
/* background-color: #1C2740; */
}
.calendar-compact .cal-header {
/* @apply px-2 py-1; */
padding: 0.5rem;
}
.calendar-compact .cal-header .cal-header-title {
/* @apply text-sm; */
font-size: 0.875rem;
}
.calendar-compact .cal-cell {
min-height: 36px;
padding: 0.35rem;
border: 1px solid #1C2740;
border-radius: 0.25rem;
}
.calendar-compact .cal-day-number {
/* @apply text-xs; */
font-size: 0.75rem;
}
.calendar-compact .cal-event {
/* @apply h-0.5 rounded-full mt-[2px]; */
height: 0.5rem;
border-radius: 0.5rem;
margin-top: 2px;
}
.cal-event-created {
background-color: #22c55e;
}
.cal-event-updated {
background-color: #f97316;
}
.calendar-compact .cal-open-day-events {
/* @apply hidden; */
display: none;
}
/* Standardized Button Styles - Based on "Collapse all" design */
.btn-standard,
.btn-standard-sm,
.btn-standard-xs,
.btn-standard-icon {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
border: 1px solid var(--btn-border-color);
background-color: transparent;
color: var(--text-main);
font-weight: 500;
line-height: 1.2;
text-decoration: none;
cursor: pointer;
transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
outline: none;
}
.btn-standard,
.btn-standard-primary,
.btn-standard-danger {
padding: 0.75rem 1.5rem;
border-radius: 0.75rem;
}
.btn-standard-sm {
padding: 0.5rem 1rem;
border-radius: 0.75rem;
font-size: 0.85rem;
}
.btn-standard-xs {
padding: 0.375rem 0.875rem;
border-radius: 0.625rem;
font-size: 0.75rem;
}
.btn-standard-icon {
padding: 0.5rem;
border-radius: 0.625rem;
color: var(--btn-muted-text);
gap: 0.25rem;
min-width: auto;
}
.btn-standard:hover,
.btn-standard-sm:hover,
.btn-standard-xs:hover,
.btn-standard-icon:hover {
background-color: var(--btn-hover-background);
border-color: var(--btn-border-strong);
color: var(--text-main);
}
.btn-standard:focus-visible,
.btn-standard-sm:focus-visible,
.btn-standard-xs:focus-visible,
.btn-standard-icon:focus-visible {
box-shadow: 0 0 0 2px var(--btn-focus-ring);
}
.btn-standard-primary {
border: 1px solid color-mix(in srgb, var(--brand) 60%, transparent);
background-color: color-mix(in srgb, var(--brand) 15%, transparent);
color: color-mix(in srgb, var(--brand) 90%, #ffffff);
}
.btn-standard-primary:hover {
background-color: color-mix(in srgb, var(--brand) 25%, transparent);
border-color: var(--brand);
}
.btn-standard-primary:focus-visible {
box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 45%, transparent);
}
.btn-standard-danger {
border: 1px solid color-mix(in srgb, var(--danger) 60%, transparent);
background-color: color-mix(in srgb, var(--danger) 12%, transparent);
color: color-mix(in srgb, var(--danger) 92%, #ffffff);
}
.btn-standard-danger:hover {
background-color: color-mix(in srgb, var(--danger) 22%, transparent);
border-color: var(--danger);
}
.btn-standard-danger:focus-visible {
box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 38%, transparent);
}
.btn-standard-icon:hover {
color: var(--text-main);
}
}
@layer utilities {
/* Mobile animations */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.animate-fadeIn {
animation: fadeIn 0.3s ease-out forwards;
}
}