/* ==========================================================================
   TypeDoc Custom Styles
   Overrides and admonition styling for RUM JavaScript SDK API docs.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   Table fixes
   --------------------------------------------------------------------------- */

/* Remove table zebra-striping to avoid unintended grey highlights on table rows */
.tsd-typography tr:nth-child(even) {
    background-color: inherit;
}

/* ---------------------------------------------------------------------------
   Admonition base styles
   --------------------------------------------------------------------------- */

.admonition {
    padding: 1em;
    margin: 1em 0;
    border-radius: 4px;
    border-left: 4px solid;
    color: #1a1a1a;
}

/* Admonition title (icon + label) */
.admonition-title {
    margin: 0 0 0.5em 0;
    font-weight: bold;
}

/* Admonition body text */
.admonition-content {
    color: #1a1a1a;
}

/* Inline code within admonitions — subtle contrast on light backgrounds */
.admonition code {
    background: rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
    padding: 0.2em 0.4em;
    border-radius: 3px;
}

/* ---------------------------------------------------------------------------
   Admonition type variants — light mode
   --------------------------------------------------------------------------- */

.admonition-note {
    border-left-color: #448aff;
    background: #e8f4fd;
}
.admonition-note > .admonition-title {
    color: #448aff;
}

.admonition-warning {
    border-left-color: #ff9800;
    background: #fff8e1;
}
.admonition-warning > .admonition-title {
    color: #ff9800;
}

.admonition-tip {
    border-left-color: #4caf50;
    background: #e8f5e9;
}
.admonition-tip > .admonition-title {
    color: #4caf50;
}

.admonition-caution {
    border-left-color: #f44336;
    background: #ffebee;
}
.admonition-caution > .admonition-title {
    color: #f44336;
}

.admonition-info {
    border-left-color: #2196f3;
    background: #e3f2fd;
}
.admonition-info > .admonition-title {
    color: #2196f3;
}

/* ---------------------------------------------------------------------------
   Admonition dark mode overrides
   Matches TypeDoc's own selectors: explicit dark theme + OS dark preference.
   --------------------------------------------------------------------------- */

:root[data-theme="dark"] .admonition {
    color: #e0e0e0;
}

:root[data-theme="dark"] .admonition-content {
    color: #e0e0e0;
}

:root[data-theme="dark"] .admonition code {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

:root[data-theme="dark"] .admonition-note    { background: #0d2a4a; }
:root[data-theme="dark"] .admonition-warning { background: #2e1f00; }
:root[data-theme="dark"] .admonition-tip     { background: #0d2a12; }
:root[data-theme="dark"] .admonition-caution { background: #2d0d0d; }
:root[data-theme="dark"] .admonition-info    { background: #0d1f3c; }

@media (prefers-color-scheme: dark) {
    :root[data-theme="os"] .admonition          { color: #e0e0e0; }
    :root[data-theme="os"] .admonition-content  { color: #e0e0e0; }
    :root[data-theme="os"] .admonition code     { background: rgba(255, 255, 255, 0.1); color: #e0e0e0; }
    :root[data-theme="os"] .admonition-note     { background: #0d2a4a; }
    :root[data-theme="os"] .admonition-warning  { background: #2e1f00; }
    :root[data-theme="os"] .admonition-tip      { background: #0d2a12; }
    :root[data-theme="os"] .admonition-caution  { background: #2d0d0d; }
    :root[data-theme="os"] .admonition-info     { background: #0d1f3c; }
}
