/*
 * WOK.art.pl — visual style for Chainlit
 * Colors handled by theme.json — CSS only for fonts, layout, borders, transitions
 */

/* ── @font-face ── */

@font-face {
    font-family: 'Fira Code';
    src: url('/public/fonts/firacode-regular.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Fira Code';
    src: url('/public/fonts/firacode-bold.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
}

@font-face {
    font-family: 'wok';
    src: url('/public/fonts/r.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'wok';
    src: url('/public/fonts/i.woff2') format('woff2');
    font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
    font-family: 'wok';
    src: url('/public/fonts/m.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'wok';
    src: url('/public/fonts/b.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
}

/* ── Global ── */

body {
    font-family: 'wok', 'Inter', sans-serif !important;
    font-size: 18px !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

/* ── Links — WOK underline style ── */

a { text-decoration: none; color: inherit; transition: opacity 0.3s; }
a:hover { opacity: 0.65; }

.cl-message a, .markdown-body a {
    text-decoration: underline;
    text-underline-position: under;
    text-decoration-color: hsl(var(--border));
    text-decoration-thickness: 1px;
    transition: text-decoration-color 0.3s;
}
.cl-message a:hover, .markdown-body a:hover {
    text-decoration-color: currentColor;
    opacity: 1;
}

/* ── Header — lowercase nav, thin border ── */

header {
    border-bottom: 1px solid hsl(var(--border)) !important;
    padding-bottom: 0.75rem !important;
}
header h1, header a {
    text-transform: lowercase !important;
    font-weight: 500 !important;
}

/* ── Sidebar ── */

[data-sidebar="sidebar"] {
    font-family: 'wok', 'Inter', sans-serif !important;
    border-right: 1px solid hsl(var(--border)) !important;
}

/* ── Messages — WOK heading scale ── */

.cl-message h1, .markdown-body h1 { font-size: 48px; font-weight: normal; margin: 2rem 0 1rem; }
.cl-message h2, .markdown-body h2 { font-size: 36px; font-weight: normal; margin: 2rem 0 1rem; }
.cl-message h3, .markdown-body h3 { font-size: 28px; font-weight: normal; margin: 2rem 0 1rem; }
.cl-message h4, .markdown-body h4 { font-size: 24px; font-weight: normal; margin: 2rem 0 1rem; }

code, .cl-message code, .markdown-body code,
pre code, .hljs, code.hljs, .font-mono {
    font-family: 'Fira Code', 'SFMono-Regular', Consolas, monospace !important;
    font-size: 0.85em;
}
pre, pre code, pre code.hljs,
.cl-message pre, .cl-message pre code, .cl-message pre code.hljs,
.markdown-body pre, .markdown-body pre code, .markdown-body pre code.hljs {
    background: hsl(var(--secondary)) !important;
    color: hsl(var(--foreground)) !important;
}
/* Code block wrapper — clip scrollbar to rounded corners */
.rounded-lg.border.bg-card {
    overflow: hidden !important;
    border-radius: 16px !important;
}
.rounded-lg.border.bg-card pre {
    border: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

/* ── Composer ── */

.cl-textarea, textarea {
    font-family: 'wok', 'Inter', sans-serif !important;
}

/* ── Buttons — WOK easing ── */

button {
    font-family: 'wok', 'Inter', sans-serif !important;
    transition: all 0.25s cubic-bezier(0.5, 0, 0.2, 1) !important;
}
button:hover { opacity: 0.65; }

/* ── Scrollbar ── */

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: hsl(var(--muted-foreground)); }
::-webkit-scrollbar-thumb:hover { background: hsl(var(--foreground)); }

/* ── Markdown ── */

.markdown-body ul, .markdown-body ol { padding-left: 1.5em; margin-bottom: 0.75rem; }
.markdown-body li { margin-bottom: 0.35rem; }
.markdown-body blockquote {
    border-left: 3px solid hsl(var(--foreground)) !important;
    background: hsl(var(--secondary)) !important;
    padding: 0.75rem 1rem !important;
    border-radius: 0 16px 16px 0 !important;
    margin: 1rem 0 !important;
}
.markdown-body table, .markdown-body th, .markdown-body td {
    border: 1px solid hsl(var(--foreground)) !important;
}
.markdown-body th { background: hsl(var(--secondary)) !important; font-weight: 500 !important; }
.markdown-body hr { border: none; border-top: 1px solid hsl(var(--border)); margin: 1.5rem 0; }

/* ── Tooltip ── */

[role="tooltip"] { border-radius: 2em !important; font-size: 13px !important; }

/* ── Footer ── */

footer { border-top: 1px solid hsl(var(--border)) !important; font-size: 14px !important; }
footer a { text-transform: lowercase !important; }
