@import url('https://cdn.jsdelivr.net/npm/latin-modern-web@1.0.0/css/latin-modern.min.css');
@import url("modus-operandi-tinted.css");

/* * Modus operandi colors*/
/**/
/* --- MODUS OPERANDI TINTED THEME --- */

:root {
    margin-left: 4rem;
}

body, post-content {
    background-color: var(--bg-main);
    color: var(--fg-main);
    font-family:  'Latin Modern Mono', 'Computer Modern',serif !important;
    line-height: 2.0;
    font-size: 18px;
    text-align: left;
    margin: 0;
    padding-bottom: 2rem;
}
p {

    margin-left: 1rem;
}
h1, h2, h3, h4, h5, h6 {
    font-weight: bold;
    margin-top: 1.0em;
    margin-bottom: 0.5em;
    line-height: 1.2;
}
h1::before, h2::before, h3::before {
    content: "▾";
    margin-right: 10px;
}
#tableSearch {
    background-color: var(--bg-main) !important;
    color: var(--fg-main) !important;
    border: 2px solid var(--fg-dim) !important;
    font-family: 'Latin Modern Roman', serif !important;
    border-radius: 4px;
}

#tableSearch::placeholder {
    color: var(--fg-dim) !important;
    font-family: 'Latin Modern Roman', serif;
    font-style: italic;
    opacity: 1;
}

#tableSearch:focus {
    outline: none;
    border-color: var(--blue) !important;
    box-shadow: 0 0 0 3px rgba(0, 49, 169, 0.1);
}
single-header::h1::before {
    content: "";
}
h1 { color: var(--fg-heading-1); font-size: 2.2em; border-bottom: 2px solid var(--h1-color); }
h2 { color: var(--fg-heading-2); font-size: 1.8em; }
h3 { color: var(--fg-heading-3); font-size: 1.5em; }
h4 { color: var(--fg-heading-4); font-size: 1.3em; }

a {
    color: var(--magenta-faint) !important;
    text-decoration: underline;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-bottom 0.2s ease;
}
 a:hover {
    text-decoration: underline;
    background-color: var(--bg-hover);
}
a:visited {
    color: var(--fg-dim);
}

a > .katex,
a > .katex * {
    color: #007bff !important;
    border-bottom: 1px solid #007bff;
}

a:hover > .katex {
    border-bottom: 1px solid #007bff;
}
table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.5em 0;
    font-size: 0.95em;
}

th {
    background-color: var(--bg-inactive);
    font-weight: bold;
    text-align: left;
    border-bottom: 2px solid var(--fg-main);
    padding: 8px 12px;
}

td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-mode-line-active);
    border-right: 1px solid var(--border-mode-line-active);
    border-left: 1px solid var(--border-mode-line-active);
}

table td a .katex,
table td a .katex * {
    color: inherit !important;
}

tr {
    background-color: var(--bg-dim);
}


.katex {
    font-size: 1em;
    color:var(--fg-main) !important;
}

#fusion-tooltip-box {
    background-color: var(--bg-dim) !important;
    color: var(--fg-dim) !important;
    border: 1px solid var(--border);
    /* box-shadow: 4px 4px 0px rgba(0,0,0,0.2); */
}


.home-button {
    display: inline-block;
    padding: 5px 12px;
    margin-right: 15px;
    border: 1px solid var(--fg-main);
    border-radius: 4px;
    text-decoration: none;
    color: #ffffff;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.home-button:hover {
    background-color: var(--bg-hover);
    border-color: #ffffff;
    color: #000;
}


.katex-display {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  will-change: transform;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.katex-display > .katex {
  white-space: nowrap;
}


.katex-display::-webkit-scrollbar {
    height: 6px;
}

.katex-display::-webkit-scrollbar-track {
    background: transparent;
}

.katex-display::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.katex-display::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.4);
}

.fusion-table {

    table-layout: fixed;
    width: 100%;


    content-visibility: auto;
    contain-intrinsic-size: 50px;
}

.fusion-ring-container {
    position: relative;
    z-index: 0;
}


.katex [data-title] {
    position: relative;
    cursor: help;
    display: inline-block;
    padding: 6px 4px;
    margin: -6px -4px;
    z-index: 10;
}

.katex [data-title]:hover::after {
    content: attr(data-title);

    position: fixed;

    left: 80%;
    top: 100%;
    bottom: 10px;
    left: 10px;

    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    white-space: nowrap;
    z-index: 9999;
    pointer-events: none;
}

.matrix-controls {
    margin: 1rem 0;
    justify-content: flex-end;
    display: flex;
    width: 100%;
}

.copy-tex-btn {
    background-color: var(--bg-active);
    color: var(--fg-main);
    border: 1px solid ;
    border-radius: 4px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 8px; /* Space between icon and text */
}

/* Hover effects */
.copy-tex-btn:hover {
    background-color: var(--bg-hover);
    border-color: var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Active/Click effect */
.copy-tex-btn:active {
    background-color: var(--bg-green-nuanced);
    transform: translateY(1px);
}

/* The Icon */
.copy-tex-btn .icon {
    font-size: 1rem;
    filter: grayscale(100%); /* Keeps the emoji from being too distracting */
}
