/* Dark theme overrides for Tufte CSS */

/* Main background and text colors */
body[data-theme="dark"] {
    background-color: #1a1a1a !important;
    color: #e4e4e4 !important;
}

/* Headers */
body[data-theme="dark"] h1, body[data-theme="dark"] h2, body[data-theme="dark"] h3, body[data-theme="dark"] h4, body[data-theme="dark"] h5, body[data-theme="dark"] h6 {
    color: #f0f0f0 !important;
}

/* Links */
body[data-theme="dark"] a:link, body[data-theme="dark"] a:visited {
    color: #8bb6ff !important;
}

body[data-theme="dark"] a:hover {
    color: #b3d1ff !important;
}

/* Sidenotes and margin notes */
body[data-theme="dark"] .sidenote, body[data-theme="dark"] .marginnote {
    color: #ccc !important;
}

body[data-theme="dark"] .sidenote-number {
    color: #aaa !important;
}

body[data-theme="dark"] .sidenote-number:after, body[data-theme="dark"] .sidenote:before {
    color: #aaa !important;
}

/* Code blocks */
body[data-theme="dark"] code, body[data-theme="dark"] pre {
    background-color: #2a2a2a !important;
    color: #f0f0f0 !important;
}

body[data-theme="dark"] pre > code {
    background-color: transparent !important;
}

/* Blockquotes */
body[data-theme="dark"] blockquote {
    color: #ccc !important;
    border-left: 4px solid #555 !important;
}

/* Table styling for dark theme */
body[data-theme="dark"] table {
    color: #e4e4e4 !important;
}

body[data-theme="dark"] th {
    background-color: #333 !important;
    color: #f0f0f0 !important;
}

body[data-theme="dark"] td {
    border-bottom: 1px solid #555 !important;
}

/* Figure captions */
body[data-theme="dark"] .marginnote, body[data-theme="dark"] .sidenote, body[data-theme="dark"] figcaption {
    color: #aaa !important;
}

/* Full width elements */
body[data-theme="dark"] .fullwidth {
    background-color: transparent !important;
}

/* Epigraphs */
body[data-theme="dark"] div.epigraph {
    color: #ccc !important;
}

body[data-theme="dark"] div.epigraph > blockquote {
    color: #ccc !important;
    border: none !important;
}

/* Input elements if any */
body[data-theme="dark"] input, body[data-theme="dark"] textarea, body[data-theme="dark"] select {
    background-color: #2a2a2a !important;
    color: #e4e4e4 !important;
    border: 1px solid #555 !important;
}

/* Horizontal rules */
body[data-theme="dark"] hr {
    border-color: #555 !important;
}