blob: bae0612d1152b7ab80afc4868cbf6be5eb4dacc4 [file] [log] [blame]
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Apache Ignite 3 Documentation Custom Styles
*
* Replicates the Jekyll site design with accuracy.
* Reference: docs-jekyll/_sass/ directory
* Analysis: IGNITE-26681/jekyll-style-analysis.md
*/
/* ============================================
Color Variables and Theme Configuration
============================================ */
:root {
/* Apache Ignite Brand Colors */
--ignite-red: #ec1c24;
--ignite-red-dark: #bc440b;
--ignite-dark-gray: #333333;
--ignite-active-indicator-thickness: 3px;
/* Background Colors - Jekyll uses gray sidebar, white content */
--ifm-background-color: #ececec; /* Page background - light gray */
--ifm-navbar-background-color: #ffffff; /* Navbar - pure white */
/* Content Links - Jekyll uses RED, not blue! */
--ifm-link-color: var(--ignite-red);
--ifm-link-hover-color: var(--ignite-red-dark);
/* Docusaurus Primary Color (for buttons, badges, etc.) */
--ifm-color-primary: #ec1c24;
--ifm-color-primary-dark: #d41920;
--ifm-color-primary-darker: #c8171e;
--ifm-color-primary-darkest: #a51319;
--ifm-color-primary-light: #ef3138;
--ifm-color-primary-lighter: #f03d43;
--ifm-color-primary-lightest: #f35b60;
/* Text Colors */
--ifm-color-content: #545454; /* Body text */
--ifm-color-content-secondary: #757575; /* Secondary text, sidebar links */
--ifm-heading-color: #000000; /* Headings */
--ifm-navbar-link-color: var(--ignite-dark-gray); /* Navbar text - DARK */
/* Code Block Colors */
--block-code-background: rgba(241, 241, 241, 0.2);
--inline-code-background: rgba(241, 241, 241, 0.9);
--ifm-code-background: var(--inline-code-background);
--code-border-color: #e5e5e5;
/* Font Configuration */
--ifm-font-family-base: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI',
Roboto, 'Helvetica Neue', Arial, sans-serif;
--ifm-heading-font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI',
Roboto, 'Helvetica Neue', Arial, sans-serif;
--ifm-font-size-base: 16px;
--ifm-line-height-base: 1.6;
--ifm-code-font-size: 90%;
/* Sidebar Colors */
--ifm-menu-color: #757575; /* Sidebar link text - gray */
--ifm-menu-color-active: #393939; /* Active link text - darker gray, NOT red */
--ifm-menu-color-background-active: transparent;
--ifm-menu-color-background-hover: transparent;
/* Table Colors */
--ifm-table-stripe-background: #f8f8f7;
--ifm-table-head-background: #f7f8f7;
--ifm-table-head-color: #757575;
/* Border Colors */
--ifm-toc-border-color: #dddddd;
--ifm-hr-border-color: #dddddd;
/* Navbar Shadow - subtle, like Jekyll */
--ifm-navbar-shadow: 0 4px 10px 0 #eeeeee, 0 0 4px 0 #d5d5d5;
/* Syntax Highlighting */
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
}
/* Dark Mode Color Palette - OneDark-inspired, softer than default */
[data-theme='dark'] {
--ifm-background-color: #252528;
--ifm-navbar-background-color: #252528;
/* Softer red for dark mode - easier on eyes while still Ignite-branded */
--ifm-color-primary: #f07178;
--ifm-color-primary-dark: #ee5960;
--ifm-color-primary-darker: #ec4a52;
--ifm-color-primary-darkest: #e62d36;
--ifm-color-primary-light: #f28990;
--ifm-color-primary-lighter: #f4989e;
--ifm-color-primary-lightest: #f9c0c3;
/* Dark mode links - softer coral-red */
--ifm-link-color: #f07178;
--ifm-link-hover-color: #f9a8a8;
/* Dark mode text - brighter for better readability */
--ifm-color-content: #ebebeb;
--ifm-color-content-secondary: #b0b0b0;
--ifm-heading-color: #ffffff;
--ifm-navbar-link-color: #ebebeb;
/* Dark mode code blocks */
--block-code-background: rgba(0, 0, 0, 0.4);
--inline-code-background: rgba(255, 255, 255, 0.1);
--ifm-code-background: var(--inline-code-background);
--code-border-color: #404040;
/* Dark mode sidebar colors */
--ifm-menu-color: #a0a0a0;
--ifm-menu-color-active: #e3e3e3;
/* Dark mode table colors */
--ifm-table-stripe-background: rgba(255, 255, 255, 0.05);
--ifm-table-head-background: rgba(255, 255, 255, 0.1);
--ifm-table-head-color: #a0a0a0;
/* Dark mode borders */
--ifm-toc-border-color: #404040;
--ifm-hr-border-color: #404040;
/* Dark mode navbar shadow */
--ifm-navbar-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.3), 0 0 4px 0 rgba(0, 0, 0, 0.2);
--docusaurus-highlighted-code-line-bg: rgba(255, 255, 255, 0.1);
}
/* ============================================
Typography
============================================ */
body {
font-family: var(--ifm-font-family-base);
color: var(--ifm-color-content);
line-height: var(--ifm-line-height-base);
}
h1, h2, h3, h4, h5, h6 {
font-family: var(--ifm-heading-font-family);
font-weight: normal;
color: var(--ifm-heading-color);
}
h1 {
font-size: 36px;
line-height: 40px;
}
/* ============================================
Navbar Styling
============================================ */
/*
* Navbar colors: White background with dark text (Jekyll style)
* Note: Some !important needed due to Docusaurus inline styles
*/
/* Navbar background - must override Docusaurus theme inline styles */
.navbar {
background-color: #ffffff !important; /* Required: overrides inline style */
box-shadow: var(--ifm-navbar-shadow);
}
.navbar__logo {
margin-left: 1em;
}
/* Navbar text colors */
.navbar__title {
font-weight: normal;
color: var(--ignite-dark-gray);
}
.navbar__link {
color: var(--ignite-dark-gray);
font-weight: normal;
}
.navbar__item {
font-weight: normal;
color: var(--ignite-dark-gray);
}
/* Dark mode navbar */
[data-theme='dark'] .navbar {
background-color: #252528 !important; /* Required: overrides inline style */
}
[data-theme='dark'] .navbar__title,
[data-theme='dark'] .navbar__link,
[data-theme='dark'] .navbar__item {
color: #e3e3e3;
}
/* Color mode toggle button visibility */
.navbar button[class*='colorModeToggle'],
.navbar button[class*='toggleButton'] {
color: var(--ignite-dark-gray);
}
[data-theme='dark'] .navbar button[class*='colorModeToggle'],
[data-theme='dark'] .navbar button[class*='toggleButton'] {
color: #e3e3e3;
}
/* ============================================
Search Bar Styling
============================================ */
/* Light theme search styling */
:root {
/* Search input styling for white navbar */
--ifm-navbar-search-input-background-color: #f5f5f5; /* Light gray background */
--ifm-navbar-search-input-color: #333333; /* Dark text */
--ifm-navbar-search-input-placeholder-color: #757575; /* Gray placeholder */
--search-local-input-active-border-color: var(--ignite-red); /* Red focus border */
/* Search modal/dropdown styling */
--search-local-modal-background: #ffffff;
--search-local-modal-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
--search-local-hit-background: #ffffff;
--search-local-hit-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
--search-local-hit-color: #333333;
--search-local-highlight-color: var(--ignite-red);
--search-local-muted-color: #757575;
}
/* Dark mode search styling */
[data-theme='dark'] {
--ifm-navbar-search-input-background-color: #2a2a2a; /* Dark gray background */
--ifm-navbar-search-input-color: #e3e3e3; /* Light text */
--ifm-navbar-search-input-placeholder-color: #a0a0a0; /* Gray placeholder */
--search-local-input-active-border-color: var(--ignite-red); /* Red focus border */
/* Search modal/dropdown styling */
--search-local-modal-background: #242526;
--search-local-modal-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
--search-local-hit-background: rgba(255, 255, 255, 0.05);
--search-local-hit-shadow: none;
--search-local-hit-color: #e3e3e3;
--search-local-highlight-color: #f35b60;
--search-local-muted-color: #a0a0a0;
}
/*
* Search input customization
* Note: !important required to override @easyops-cn/docusaurus-search-local inline styles
*/
.navbar__search-input {
background-color: var(--ifm-navbar-search-input-background-color) !important; /* Required */
color: #000000 !important; /* Required */
border: 1px solid #d0d0d0 !important; /* Required */
border-radius: 4px;
padding: 0.375rem 2.5rem 0.375rem 0.75rem !important; /* Required */
font-size: 14px;
background-image: none !important; /* Required - removes default icon */
}
[data-theme='dark'] .navbar__search-input {
border-color: #404040 !important; /* Required */
color: #e3e3e3 !important; /* Required */
}
.navbar__search-input::placeholder {
color: var(--ifm-navbar-search-input-placeholder-color) !important; /* Required */
opacity: 1;
}
/* Hide loading ring icon from search plugin */
.navbar__search div[class*='searchBarLoadingRing'],
.navbar__search span[class*='searchBarLoadingRing'] {
display: none !important; /* Required - plugin applies inline display */
}
/* Search bar layout */
.navbar__search {
margin-right: 1rem;
}
/* Search button and icon colors */
.navbar__search button {
color: #757575 !important; /* Required - overrides plugin inline color */
}
.navbar__search button svg {
color: #757575 !important; /* Required - overrides plugin inline color */
}
.navbar__search kbd,
.navbar__search span[class*='searchHint'] {
color: #757575 !important; /* Required */
background-color: #ffffff !important; /* Required */
border-color: #d0d0d0 !important; /* Required */
}
/* Dark mode search colors */
[data-theme='dark'] .navbar__search button {
color: #a0a0a0 !important; /* Required */
}
[data-theme='dark'] .navbar__search button svg {
color: #a0a0a0 !important; /* Required */
}
[data-theme='dark'] .navbar__search kbd,
[data-theme='dark'] .navbar__search span[class*='searchHint'] {
color: #a0a0a0 !important; /* Required */
background-color: #2a2a2a !important; /* Required */
border-color: #404040 !important; /* Required */
}
/* ============================================
Layout - Dynamic Content Width Configuration
============================================ */
/*
* Strategy: Dynamic content width that adapts to available viewport space.
* Goals:
* - Content fills available space between sidebar and TOC
* - Maximum width: 2000px (supports ultra-wide displays)
* - Minimum width: 600px (readability on smaller screens)
* - Fixed sidebar and TOC widths to prevent layout shift
* - Respect Docusaurus's responsive breakpoints
*/
:root {
/* Layout Width Variables */
--doc-sidebar-width: 300px;
--toc-width: 240px;
/* Override Docusaurus default container widths */
--ifm-container-width: 100%;
--ifm-container-width-xl: 100%;
}
/* Desktop: Dynamic content width that fills available space */
@media (min-width: 997px) {
/* Main content area wrapper */
.container {
max-width: 100% !important;
}
/* Row container - remove Docusaurus default max-width */
.row {
max-width: none !important;
justify-content: space-between;
}
/* Main wrapper - ensure no max-width */
.main-wrapper {
max-width: none !important;
}
/* Docs wrapper - ensure no max-width */
.docs-wrapper {
max-width: none !important;
}
/* Content column in 9/3 layout (article with TOC) - dynamic width */
.col--9 {
flex: 1 1 auto;
max-width: 2000px;
min-width: 600px;
}
/* TOC column width - fixed */
.col--3 {
flex: 0 0 var(--toc-width);
max-width: var(--toc-width);
}
}
/* Tablet: Reduce sidebar width */
@media (min-width: 768px) and (max-width: 996px) {
:root {
--doc-sidebar-width: 260px;
}
}
/* Mobile: Full width with padding */
@media (max-width: 767px) {
.container {
padding-left: 20px;
padding-right: 20px;
}
}
/* ============================================
Sidebar Navigation (Left)
============================================ */
/*
* Sidebar styling goals:
* - Gray background (like Jekyll)
* - "Apache Ignite 3 Documentation" always bold
* - Active items red, inactive items gray
* - No background color changes on hover/active
*/
/* Sidebar container background */
.theme-doc-sidebar-container {
background-color: var(--ifm-background-color);
border-right: none;
}
/* Menu base styles */
.menu {
font-family: var(--ifm-font-family-base);
padding: 10px 20px;
}
/* All menu links */
.menu__link {
color: var(--ifm-menu-color);
font-size: 16px;
font-weight: normal;
padding: 0.25rem 0.375rem;
white-space: normal;
word-wrap: break-word;
}
/* First item (Apache Ignite 3 Documentation) - always bold */
.menu > .theme-doc-sidebar-item-link:first-child .menu__link {
font-weight: bold;
line-height: 1.4;
}
/* Active menu link styling */
.menu__link--active {
color: var(--ignite-red);
background-color: transparent;
border-left: none;
}
/* Hover states */
.menu__link:hover {
color: var(--ignite-red);
background-color: transparent;
}
.menu__list-item-collapsible:hover {
background-color: transparent;
}
/* ============================================
Content Area
============================================ */
.theme-doc-markdown {
background-color: #ffffff;
border-left: 1px solid #eeeeee;
padding: 30px 50px;
margin-top: 10px; /* Space above content for version badge */
}
[data-theme='dark'] .theme-doc-markdown {
background-color: #2d2d30;
border: 1px solid #404040;
}
article.markdown {
font-size: 16px;
line-height: 1.6em;
color: var(--ifm-color-content);
}
article.markdown > h1,
article.markdown > h2,
article.markdown > h3,
article.markdown > h4 {
margin-top: 1.2em;
margin-bottom: 0.6em;
}
article.markdown li {
margin-bottom: 0.5em;
}
article.markdown strong {
color: #757575;
}
[data-theme='dark'] article.markdown strong {
color: #a0a0a0;
}
/* ============================================
Table of Contents (Right Sidebar)
============================================ */
.theme-doc-toc-desktop {
background-color: #ffffff;
}
[data-theme='dark'] .theme-doc-toc-desktop {
background-color: #2d2d30;
}
.table-of-contents {
border-left: 2px solid var(--ifm-toc-border-color);
font-family: var(--ifm-font-family-base);
padding-left: 8px;
}
.table-of-contents__link {
color: var(--ifm-menu-color);
font-size: 14px;
font-weight: normal;
}
/* Active TOC item - dark gray text with red left border (like Jekyll) */
.table-of-contents__link--active {
color: #393939 !important; /* Darker gray, NOT red */
border-left: var(--ignite-active-indicator-thickness) solid var(--ignite-red);
padding-left: calc(8px - var(--ignite-active-indicator-thickness));
font-weight: normal;
}
[data-theme='dark'] .table-of-contents__link--active {
color: #e3e3e3 !important;
}
.table-of-contents__link:hover {
color: var(--ignite-red);
}
/* ============================================
Code Blocks and Inline Code
============================================ */
code {
color: var(--ifm-color-content);
background-color: var(--inline-code-background);
padding: 0.1em 0.5em;
border-radius: 3px;
font-size: var(--ifm-code-font-size);
}
pre {
background-color: var(--block-code-background) !important;
border: 1px solid var(--code-border-color);
border-radius: 5px;
padding: 8px 15px;
line-height: 18px;
}
pre code {
background-color: transparent;
padding: 0;
}
/* ============================================
Tabs Styling (Multi-language code examples)
============================================ */
.tabs {
border-bottom: 1px solid #e0e0e0;
}
.tabs__item {
border-bottom: var(--ignite-active-indicator-thickness) solid transparent;
transition: border-color 0.2s;
font-weight: normal;
}
.tabs__item--active {
border-bottom-color: var(--ignite-red) !important;
color: inherit;
font-weight: normal;
}
.tabs__item:hover {
opacity: 0.85;
}
/* ============================================
Tables
============================================ */
table {
border-collapse: collapse;
margin: 16px 0;
}
table thead,
table tfoot {
background-color: var(--ifm-table-head-background);
color: var(--ifm-table-head-color);
}
table th,
table td {
text-align: left;
padding: 5px 10px;
border-top: 1px solid hsl(0, 0%, 85%);
border-bottom: 1px solid hsl(0, 0%, 85%);
}
table tbody tr:nth-of-type(even) {
background-color: var(--ifm-table-stripe-background);
}
/* ============================================
Admonitions (Note, Tip, Caution, Warning)
============================================ */
/*
* Admonition styling
* Note: CSS variable overrides use !important for proper cascade
* border-left-color uses !important to override Docusaurus default
*/
.admonition {
border-left-width: 6px;
margin-bottom: 16px;
}
/* Note admonitions - Blue */
.theme-admonition.theme-admonition-note.alert.alert--secondary {
--ifm-alert-background-color: rgba(0, 136, 204, 0.1) !important; /* Required - CSS var */
--ifm-alert-background-color-highlight: rgba(0, 136, 204, 0.15) !important; /* Required - CSS var */
--ifm-alert-foreground-color: #004085 !important; /* Required - CSS var */
--ifm-alert-border-color: #0088cc !important; /* Required - CSS var */
border-left-color: #0088cc !important; /* Required - overrides default */
}
/* Tip admonitions - Green */
.theme-admonition.theme-admonition-tip.alert.alert--success {
--ifm-alert-background-color: rgba(0, 168, 84, 0.1) !important; /* Required - CSS var */
--ifm-alert-background-color-highlight: rgba(0, 168, 84, 0.15) !important; /* Required - CSS var */
--ifm-alert-foreground-color: #155724 !important; /* Required - CSS var */
--ifm-alert-border-color: #00a854 !important; /* Required - CSS var */
border-left-color: #00a854 !important; /* Required - overrides default */
}
/* Caution/Important admonitions - Yellow */
.theme-admonition.theme-admonition-caution.alert.alert--warning,
.theme-admonition.theme-admonition-important.alert.alert--info {
--ifm-alert-background-color: rgba(250, 173, 20, 0.1) !important; /* Required - CSS var */
--ifm-alert-background-color-highlight: rgba(250, 173, 20, 0.15) !important; /* Required - CSS var */
--ifm-alert-foreground-color: #856404 !important; /* Required - CSS var */
--ifm-alert-border-color: #faad14 !important; /* Required - CSS var */
border-left-color: #faad14 !important; /* Required - overrides default */
}
/* Warning/Danger admonitions - Red */
.theme-admonition.theme-admonition-warning.alert.alert--danger,
.theme-admonition.theme-admonition-danger.alert.alert--danger,
.theme-admonition.theme-admonition-warning.alert.alert--warning {
--ifm-alert-background-color: rgba(245, 34, 45, 0.1) !important; /* Required - CSS var */
--ifm-alert-background-color-highlight: rgba(245, 34, 45, 0.15) !important; /* Required - CSS var */
--ifm-alert-foreground-color: #721c24 !important; /* Required - CSS var */
--ifm-alert-border-color: #f5222d !important; /* Required - CSS var */
border-left-color: #f5222d !important; /* Required - overrides default */
}
/* Dark mode admonitions - vibrant colors for visibility */
[data-theme='dark'] .theme-admonition.theme-admonition-note.alert.alert--secondary {
--ifm-alert-background-color: rgba(0, 136, 204, 0.28) !important;
--ifm-alert-foreground-color: #90caf9 !important; /* Blue 200 - brighter */
}
[data-theme='dark'] .theme-admonition.theme-admonition-tip.alert.alert--success {
--ifm-alert-background-color: rgba(0, 168, 84, 0.28) !important;
--ifm-alert-foreground-color: #81c784 !important; /* Green 300 - brighter */
}
[data-theme='dark'] .theme-admonition.theme-admonition-caution.alert.alert--warning,
[data-theme='dark'] .theme-admonition.theme-admonition-important.alert.alert--info {
--ifm-alert-background-color: rgba(250, 173, 20, 0.28) !important;
--ifm-alert-foreground-color: #ffcc80 !important; /* Orange 200 - brighter */
}
[data-theme='dark'] .theme-admonition.theme-admonition-warning.alert.alert--danger,
[data-theme='dark'] .theme-admonition.theme-admonition-danger.alert.alert--danger,
[data-theme='dark'] .theme-admonition.theme-admonition-warning.alert.alert--warning {
--ifm-alert-background-color: rgba(245, 34, 45, 0.28) !important;
--ifm-alert-foreground-color: #ef9a9a !important; /* Red 200 - brighter */
}
/* ============================================
Images
============================================ */
article.markdown img {
max-width: 100%;
height: auto;
}
/* ============================================
Footer
============================================ */
.footer {
font-size: 16px;
padding: 1rem 0;
min-height: 104px;
}
.footer__title {
font-size: 14px;
font-weight: 600;
color: #ffffff;
}
.footer__item {
font-size: 14px;
}
/* Footer styling - dark background for contrast in both themes */
.footer--dark {
background-color: #242526 !important;
border-top: none;
}
.footer--dark .footer__link-item {
color: rgba(255, 255, 255, 0.8);
}
.footer--dark .footer__link-item:hover {
color: #ffffff;
}
.footer--dark .footer__copyright {
color: rgba(255, 255, 255, 0.6);
}
/* Dark mode footer - slightly darker than canvas */
[data-theme='dark'] .footer--dark {
background-color: #1e1e20 !important;
}
[data-theme='dark'] .footer--dark .footer__link-item {
color: rgba(255, 255, 255, 0.7);
}
[data-theme='dark'] .footer--dark .footer__link-item:hover {
color: #ffffff;
}
/* ============================================
Responsive Design (Legacy - kept for compatibility)
============================================ */
@media (max-width: 996px) {
.theme-doc-markdown {
padding-left: 20px;
padding-right: 20px;
}
}
/* Content area padding adjustment for optimal readability */
.theme-doc-markdown {
padding-left: 40px;
padding-right: 40px;
}
/* ============================================
Railroad Diagram Styling
============================================ */
/*
* Railroad diagram styling - matches Mermaid neutral color scheme
* Features:
* - Container matching code blocks (border + padding)
* - Neutral gray color scheme for light mode
* - Dark mode with appropriate contrast
* - Monospace font for technical content
* - Clickable links with hover effects
*/
/* Container */
.railroad-diagram-container {
margin: 2rem 0;
padding: 1.5rem;
background-color: var(--block-code-background);
border: 1px solid var(--code-border-color);
border-radius: 5px;
overflow-x: auto;
text-align: center;
}
[data-theme='dark'] .railroad-diagram-container {
background-color: rgba(0, 0, 0, 0.3);
border-color: var(--code-border-color);
}
.railroad-diagram-container svg {
max-width: 100%;
height: auto;
display: inline-block;
margin: 0 auto;
}
/* Light Mode: Neutral gray fills and borders */
.railroad-diagram-container svg text {
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
font-size: 14px;
fill: #333333;
}
/* Shapes: neutral gray fills with dark borders */
.railroad-diagram-container svg.railroad-diagram rect,
.railroad-diagram-container svg.railroad-diagram circle {
fill: #e8e8e8 !important;
stroke: #666666 !important;
stroke-width: 2px !important;
}
/* Paths/lines: neutral gray */
.railroad-diagram-container svg.railroad-diagram path {
stroke: #666666 !important;
stroke-width: 2px !important;
fill: none !important;
}
/* Make links clickable and visible */
.railroad-diagram-container svg.railroad-diagram a {
cursor: pointer;
}
/* Link hover effects - lighter fill */
.railroad-diagram-container svg.railroad-diagram a:hover rect {
fill: #d0d0d0 !important;
}
/* Link text styling - Ignite red */
.railroad-diagram-container svg.railroad-diagram a text {
fill: var(--ignite-red) !important;
text-decoration: none;
}
.railroad-diagram-container svg.railroad-diagram a:hover text {
text-decoration: underline;
}
/* Dark Mode: Dark fills matching page background */
[data-theme='dark'] .railroad-diagram-container svg.railroad-diagram {
background-color: rgba(0, 0, 0, 0.3) !important;
}
[data-theme='dark'] .railroad-diagram-container svg text {
fill: #f0f0f0 !important;
}
[data-theme='dark'] .railroad-diagram-container svg.railroad-diagram rect,
[data-theme='dark'] .railroad-diagram-container svg.railroad-diagram circle {
fill: var(--ifm-background-color) !important;
stroke: #f0f0f0 !important;
stroke-width: 2px !important;
}
[data-theme='dark'] .railroad-diagram-container svg.railroad-diagram path {
stroke: #f0f0f0 !important;
stroke-width: 2px !important;
}
[data-theme='dark'] .railroad-diagram-container svg.railroad-diagram a:hover rect {
fill: #2a2a2c !important;
}
[data-theme='dark'] .railroad-diagram-container svg.railroad-diagram a text {
fill: #f07178 !important;
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
font-size: 14px;
}
/* Responsive sizing */
@media (max-width: 767px) {
.railroad-diagram-container {
padding: 1rem;
}
.railroad-diagram-container svg text {
font-size: 12px;
}
}
/* Railroad diagram wrapper and expand button */
.railroad-diagram-wrapper {
position: relative;
}
.railroad-expand-button {
position: absolute;
top: 0.5rem;
right: 0.5rem;
background-color: var(--ifm-color-emphasis-200);
border: 1px solid var(--ifm-color-emphasis-400);
border-radius: 4px;
padding: 0.5rem;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background-color 0.2s, transform 0.1s;
z-index: 1;
color: var(--ifm-color-content);
}
.railroad-expand-button:hover {
background-color: var(--ifm-color-emphasis-300);
transform: scale(1.05);
}
.railroad-expand-button:active {
transform: scale(0.95);
}
[data-theme='dark'] .railroad-expand-button {
background-color: rgba(255, 255, 255, 0.1);
border-color: rgba(255, 255, 255, 0.2);
color: var(--ifm-color-content);
}
[data-theme='dark'] .railroad-expand-button:hover {
background-color: rgba(255, 255, 255, 0.15);
}
/* Modal overlay */
.railroad-modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.75);
display: flex;
align-items: center;
justify-content: center;
z-index: 9999;
padding: 2rem;
overflow: auto;
}
/* Modal content */
.railroad-modal-content {
position: relative;
max-width: 95vw;
max-height: 95vh;
background-color: var(--ifm-background-color);
border-radius: 8px;
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
overflow: auto;
}
[data-theme='dark'] .railroad-modal-content {
background-color: #252528;
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}
/* Close button */
.railroad-modal-close {
position: absolute;
top: 0.5rem;
right: 0.5rem;
background-color: var(--ifm-color-emphasis-200);
border: 1px solid var(--ifm-color-emphasis-400);
border-radius: 4px;
width: 2rem;
height: 2rem;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5rem;
line-height: 1;
font-weight: bold;
color: var(--ifm-color-content);
transition: background-color 0.2s, transform 0.1s;
z-index: 10000;
}
.railroad-modal-close:hover {
background-color: var(--ifm-color-emphasis-400);
transform: scale(1.1);
}
.railroad-modal-close:active {
transform: scale(0.9);
}
[data-theme='dark'] .railroad-modal-close {
background-color: rgba(255, 255, 255, 0.1);
border-color: rgba(255, 255, 255, 0.2);
}
[data-theme='dark'] .railroad-modal-close:hover {
background-color: rgba(255, 255, 255, 0.2);
}
/* Modal diagram - remove margin to fit better */
.railroad-diagram-modal {
margin: 0;
min-width: fit-content;
}
/* Mobile responsive modal */
@media (max-width: 767px) {
.railroad-modal-overlay {
padding: 1rem;
}
.railroad-modal-content {
max-width: 100vw;
max-height: 100vh;
}
}
/* ============================================
Card Component System for Index Pages
============================================ */
/*
* Single-row flex layout with wrapping cards
* Card dimensions: 230px min, 300px max
* Content column adjusts for 1, 2, or 3 cards at breakpoints
*/
/* Card container - single row with flex wrap */
.card-container {
display: flex;
flex-wrap: wrap;
gap: 1.5rem;
margin: 2rem 0;
}
/* Individual card styling */
.card {
flex: 1 1 230px;
min-width: 230px;
max-width: 300px;
border: 1px solid var(--ifm-color-emphasis-300);
border-radius: 8px;
padding: 1.5rem;
display: flex;
flex-direction: column;
transition: box-shadow 0.2s, transform 0.2s;
background-color: #ffffff;
}
.card:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
transform: translateY(-2px);
}
/* Card header with icon and title */
.card__header {
margin-bottom: 1rem;
}
.card__header h3 {
margin: 0;
font-size: 1.25rem;
font-weight: 600;
display: flex;
align-items: center;
gap: 0.5rem;
color: var(--ifm-heading-color);
}
/* Icon styling in card headers */
.card__header .iconify {
flex-shrink: 0;
color: var(--ifm-link-color);
vertical-align: middle;
}
/* Card body with description */
.card__body {
flex: 1;
color: var(--ifm-color-content);
font-size: 0.95rem;
line-height: 1.5;
margin-bottom: 1rem;
}
.card__body p {
margin: 0;
}
/* Card footer with link */
.card__footer {
margin-top: auto;
padding-top: 1rem;
border-top: 1px solid var(--ifm-color-emphasis-200);
}
.card__footer a {
color: var(--ifm-link-color);
text-decoration: none;
font-weight: 500;
font-size: 0.95rem;
}
.card__footer a:hover {
text-decoration: underline;
color: var(--ifm-link-hover-color);
}
/* Dark mode card styling */
[data-theme='dark'] .card {
background-color: #2d2d30;
border-color: var(--ifm-color-emphasis-200);
}
[data-theme='dark'] .card:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
[data-theme='dark'] .card__footer {
border-top-color: var(--ifm-color-emphasis-200);
}
/* Card layout - fully dynamic, reflows based on available space */
/* Mobile: Full width cards */
@media (max-width: 767px) {
.card-container {
gap: 1rem;
}
.card {
min-width: 100%;
max-width: 100%;
}
}
/* Desktop: Optimized for 3-column layout */
@media (min-width: 997px) {
.card-container {
gap: 2rem;
}
.card {
/* Allow cards to grow and maintain 3-column layout */
flex: 1 1 calc(33.333% - 1.5rem);
min-width: 280px;
max-width: 450px;
}
}
/* Large Desktop: Even better spacing */
@media (min-width: 1441px) {
.card-container {
gap: 2.5rem;
}
}