/* PyRevealed Documentation Styles */

/* Clean spacing */
.bd-content {
    line-height: 1.7;
}

/* Math blocks - just spacing */
div.math {
    margin: 24px 0;
    padding: 8px 0;
}

/* Tables - minimal */
.bd-content table.docutils {
    border-collapse: collapse;
    width: 100%;
}

.bd-content table.docutils th,
.bd-content table.docutils td {
    padding: 8px 12px;
    text-align: left;
}

/* Horizontal rules - barely visible */
.bd-content hr {
    border: none;
    height: 1px;
    background: var(--pst-color-border);
    margin: 48px 0;
    opacity: 0.3;
}

/* Section spacing */
.bd-content h2 {
    margin-top: 48px;
}

.bd-content h3 {
    margin-top: 32px;
}

/* ============================================
   HOMEPAGE STYLES
   ============================================ */

/* Speed badge - prominent with glow */
.speed-badge {
    display: inline-block;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    padding: 10px 24px;
    border-radius: 24px;
    font-weight: 700;
    font-size: 1.1em;
    margin-bottom: 16px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35); }
    50% { box-shadow: 0 6px 24px rgba(37, 99, 235, 0.5); }
}

/* Hero tagline */
.hero-tagline {
    font-size: 1.3em;
    color: var(--pst-color-text-muted);
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 700px;
}

/* Feature grid - 3 columns */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 40px 0 56px 0;
}

@media (max-width: 900px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }
}

/* Feature cards with depth */
.feature-card {
    padding: 28px;
    border: 1px solid var(--pst-color-border);
    border-radius: 16px;
    background: var(--pst-color-background);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}

.feature-card:hover {
    border-color: #3b82f6;
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.12);
}

/* Feature icon */
.feature-icon {
    font-size: 2em;
    margin-bottom: 14px;
    display: block;
}

.feature-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.15em;
    font-weight: 600;
    color: var(--pst-color-text-base);
}

.feature-card p {
    margin: 0;
    font-size: 0.95em;
    color: var(--pst-color-text-muted);
    line-height: 1.55;
}

/* ============================================
   INTERNAL PAGE STYLES - Clean & Minimal
   ============================================ */

/* --- Admonitions --- */
.bd-content .admonition {
    padding: 16px 20px;
    border-radius: 8px;
    border: none;
    border-left: 4px solid;
    margin: 24px 0;
    background: #f8f9fa;
}

.bd-content .admonition-title {
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 8px;
    padding: 0;
    background: none;
}

.bd-content .admonition p:last-child {
    margin-bottom: 0;
}

/* Note - soft blue */
.bd-content .admonition.note {
    background: #f0f7ff;
    border-left-color: #3b82f6;
}

.bd-content .admonition.note > .admonition-title {
    color: #1d4ed8;
}

/* Warning - soft amber */
.bd-content .admonition.warning {
    background: #fffbeb;
    border-left-color: #f59e0b;
}

.bd-content .admonition.warning > .admonition-title {
    color: #b45309;
}

/* Important - soft red */
.bd-content .admonition.important {
    background: #fef2f2;
    border-left-color: #ef4444;
}

.bd-content .admonition.important > .admonition-title {
    color: #dc2626;
}

/* Tip / Hint - soft green */
.bd-content .admonition.tip,
.bd-content .admonition.hint {
    background: #f0fdf4;
    border-left-color: #22c55e;
}

.bd-content .admonition.tip > .admonition-title,
.bd-content .admonition.hint > .admonition-title {
    color: #16a34a;
}

/* --- Tables --- */
.bd-content table.docutils {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    margin: 24px 0;
}

.bd-content table.docutils th {
    background: #f1f5f9;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #475569;
    padding: 12px 16px;
    border-bottom: 2px solid #e2e8f0;
}

.bd-content table.docutils td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.bd-content table.docutils tr:nth-child(even) td {
    background: #fafafa;
}

.bd-content table.docutils tr:last-child td {
    border-bottom: none;
}

/* --- Code Blocks --- */
.bd-content div.highlight {
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin: 20px 0;
}

.bd-content div.highlight pre {
    padding: 16px;
    margin: 0;
    background: transparent;
    font-size: 0.9em;
    line-height: 1.6;
}

/* --- Inline Code --- */
.bd-content code.literal {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88em;
    color: #334155;
}

/* --- Math Blocks --- */
.bd-content div.math {
    background: #fafafa;
    border-radius: 8px;
    padding: 20px 24px;
    margin: 28px 0;
    overflow-x: auto;
}

/* --- API Documentation --- */
.bd-content dl.py {
    margin: 24px 0;
    padding: 0;
}

.bd-content dl.py dt {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 8px 8px 0 0;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9em;
}

.bd-content dl.py dd {
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    margin: 0 0 16px 0;
}

.bd-content dl.py dd p:last-child {
    margin-bottom: 0;
}

/* Parameter lists */
.bd-content dl.field-list {
    margin: 16px 0;
}

.bd-content dl.field-list dt {
    font-weight: 600;
    color: #475569;
    font-size: 0.9em;
}

.bd-content dl.field-list dd {
    margin-left: 0;
    padding-left: 16px;
    margin-bottom: 12px;
}

/* --- Definition Lists --- */
.bd-content dl:not(.py):not(.field-list) dt {
    font-weight: 600;
    color: var(--pst-color-text-base);
    margin-top: 16px;
}

.bd-content dl:not(.py):not(.field-list) dd {
    margin-left: 0;
    padding-left: 20px;
    color: var(--pst-color-text-muted);
}

/* --- Blockquotes --- */
.bd-content blockquote {
    border-left: 3px solid #e2e8f0;
    padding-left: 20px;
    margin: 20px 0;
    color: var(--pst-color-text-muted);
    font-style: italic;
}

/* --- Links --- */
.bd-content a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.15s ease;
}

.bd-content a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* --- Lists --- */
.bd-content ul,
.bd-content ol {
    padding-left: 24px;
    margin: 16px 0;
}

.bd-content li {
    margin: 8px 0;
    line-height: 1.6;
}

/* --- Section Dividers --- */
.bd-content .section > hr {
    margin: 48px 0;
}

/* ============================================
   DARK MODE OVERRIDES
   ============================================ */

html[data-theme="dark"] .bd-content .admonition {
    background: #1e293b;
}

html[data-theme="dark"] .bd-content .admonition.note {
    background: #1e3a5f;
}

html[data-theme="dark"] .bd-content .admonition.note > .admonition-title {
    color: #60a5fa;
}

html[data-theme="dark"] .bd-content .admonition.warning {
    background: #422006;
}

html[data-theme="dark"] .bd-content .admonition.warning > .admonition-title {
    color: #fbbf24;
}

html[data-theme="dark"] .bd-content .admonition.important {
    background: #450a0a;
}

html[data-theme="dark"] .bd-content .admonition.important > .admonition-title {
    color: #f87171;
}

html[data-theme="dark"] .bd-content .admonition.tip,
html[data-theme="dark"] .bd-content .admonition.hint {
    background: #052e16;
}

html[data-theme="dark"] .bd-content .admonition.tip > .admonition-title,
html[data-theme="dark"] .bd-content .admonition.hint > .admonition-title {
    color: #4ade80;
}

html[data-theme="dark"] .bd-content table.docutils {
    border-color: #334155;
}

html[data-theme="dark"] .bd-content table.docutils th {
    background: #1e293b;
    color: #94a3b8;
    border-bottom-color: #334155;
}

html[data-theme="dark"] .bd-content table.docutils td {
    border-bottom-color: #1e293b;
}

html[data-theme="dark"] .bd-content table.docutils tr:nth-child(even) td {
    background: #0f172a;
}

html[data-theme="dark"] .bd-content div.highlight {
    background: #1e293b;
    border-color: #334155;
}

html[data-theme="dark"] .bd-content code.literal {
    background: #334155;
    color: #e2e8f0;
}

html[data-theme="dark"] .bd-content div.math {
    background: #1e293b;
}

html[data-theme="dark"] .bd-content dl.py dt {
    background: #1e293b;
    border-color: #334155;
}

html[data-theme="dark"] .bd-content dl.py dd {
    border-color: #334155;
}

html[data-theme="dark"] .bd-content dl.field-list dt {
    color: #94a3b8;
}

html[data-theme="dark"] .bd-content blockquote {
    border-left-color: #475569;
}

html[data-theme="dark"] .bd-content a {
    color: #60a5fa;
}

html[data-theme="dark"] .bd-content a:hover {
    color: #93c5fd;
}
