/* content.css */

:root {
    --app-font-body: "Space Grotesk", "Segoe UI", sans-serif;
    --app-font-heading: "Unbounded", "Space Grotesk", sans-serif;
    --app-font-mono: "JetBrains Mono", "SFMono-Regular", "Menlo", "Consolas", monospace;
    --app-font-emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

body {
    background: var(--app-bg);
    background-image: var(--app-bg-grad);
    background-attachment: fixed;
    color: var(--app-text);
    font-family: var(--app-font-body), var(--app-font-emoji);
}

.app-content {
    min-width: 0;
}

.app-title {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 10px 0;
    font-family: var(--app-font-heading), var(--app-font-emoji);
    letter-spacing: 0.2px;
}

.app-emoji {
    font-family: var(--app-font-emoji) !important;
    font-style: normal;
    font-weight: 400;
}

.app-emoji-img {
    display: inline-block;
    width: 1em;
    height: 1em;
    min-width: 1em;
    min-height: 1em;
    vertical-align: -0.12em;
    object-fit: contain;
}

.app-muted {
    color: var(--app-text-muted);
}

.app-help {
    margin-top: 6px;
    font-size: 12px;
    color: var(--app-text-muted);
}

/* IMPORTANT: Bootstrap's .text-muted is too dark in our dark theme */
.text-muted {
    color: var(--app-text-muted) !important;
}

/* -----------------------------
   LINKS (dark theme friendly)
   ----------------------------- */

/* default: no ugly default blue in dark theme */
a {
    text-underline-offset: 2px;
}

/* dark: links should not be bootstrap-blue */
body.app-theme-dark a {
    color: var(--app-primary);
    text-decoration-color: var(--app-link-underline);
}

body.app-theme-dark a:hover,
body.app-theme-dark a:focus {
    color: var(--app-primary-2);
    text-decoration-color: var(--app-link-underline-hover);
}

/* keep buttons/controls intact */
body.app-theme-dark .app-btn,
body.app-theme-dark .app-btn:hover,
body.app-theme-dark .app-iconbtn,
body.app-theme-dark .app-iconbtn:hover {
    text-decoration: none !important;
}

/* light: keep classic link feel */
body.app-theme-light a {
    color: var(--app-link-text);
}

body.app-theme-light a:hover,
body.app-theme-light a:focus {
    color: var(--app-link-text-hover);
}

/* -----------------------------
   NAV TABS (bootstrap override)
   ----------------------------- */

.nav-tabs {
    border-bottom-color: var(--app-border) !important;
}

.nav-tabs .nav-link {
    border: 1px solid transparent;
    color: var(--app-text-muted);
    font-weight: 800;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.nav-tabs .nav-link:hover {
    border-color: var(--app-border) var(--app-border) transparent;
    color: var(--app-text);
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
    color: var(--app-text) !important;
    background-color: var(--app-surface) !important;
    border-color: var(--app-border) var(--app-border) transparent !important;
}

/* dark: make tabs sit on surface cleanly */
body.app-theme-dark .nav-tabs .nav-link {
    background: transparent;
}

body.app-theme-dark .tab-content {
    background: transparent;
}

/* Bootstrap table theming */
.table {
    --bs-table-color: var(--app-text);
    --bs-table-bg: var(--app-surface);

    --bs-table-striped-color: var(--app-text);
    --bs-table-striped-bg: var(--app-surface-2);

    --bs-table-hover-color: var(--app-text);
    --bs-table-hover-bg: var(--app-surface-2);

    --bs-table-border-color: var(--app-border);

    color: var(--app-text) !important;
    border-color: var(--app-border);
}

.table thead th,
.table thead td,
.table tbody td,
.table tbody th {
    color: var(--app-text) !important;
    border-color: var(--app-border) !important;
}
.table > :not(caption) > * > *:first-child {
    padding-left: 12px;
}

/* force muted inside tables to our muted variable */
.table .text-muted {
    color: var(--app-text-muted) !important;
}

/* Bootstrap inputs sometimes inherit default colors */
.form-control,
.form-select,
input,
select,
textarea {
    color: var(--app-text);
}

/* Code styling */
code {
    color: var(--app-primary);
    background: var(--app-surface-2);
    border: 1px solid var(--app-border);
    padding: 2px 6px;
    border-radius: 8px;
}

/* ---------------------------------
   Table helpers (logs)
   --------------------------------- */

.app-td-ellipsis {
    max-width: 460px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-td-ellipsis code {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

@media (max-width: 991.98px) {
    .app-td-ellipsis { max-width: 280px; }
}

@media (max-width: 575.98px) {
    .app-td-ellipsis { max-width: 180px; }
}
