/* Notion-style custom CSS for Taleva Docs */

:root {
    --md-primary-fg-color: #37352f;
    --md-primary-bg-color: #ffffff;
    --md-accent-fg-color: #2383e2;
}

/* Clean typography */
body {
    -webkit-font-smoothing: antialiased;
}

/* Header - minimal and clean */
.md-header {
    background-color: #ffffff;
    box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}

.md-header__title {
    color: #37352f;
    font-weight: 600;
}

/* Sidebar navigation */
.md-nav {
    font-size: 0.85rem;
}

.md-nav__item .md-nav__link {
    color: #6b6b6b;
}

.md-nav__item .md-nav__link:hover {
    color: #37352f;
}

.md-nav__item .md-nav__link--active {
    color: #37352f;
    font-weight: 500;
}

.md-nav__title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9b9b9b;
}

/* Content area */
.md-content {
    max-width: 800px;
}

.md-typeset h1 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #37352f;
}

.md-typeset h2 {
    font-weight: 600;
    margin-top: 2.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e8e8e8;
}

.md-typeset h3 {
    font-weight: 600;
}

/* Callouts / Admonitions - Notion style */
.md-typeset .admonition,
.md-typeset details {
    border: none;
    border-left: 4px solid;
    border-radius: 0 8px 8px 0;
    box-shadow: none;
    font-size: 0.9rem;
}

.md-typeset .admonition.note,
.md-typeset details.note {
    background-color: #e7f3ff;
    border-left-color: #2383e2;
}

.md-typeset .admonition.tip,
.md-typeset details.tip {
    background-color: #e6f6f4;
    border-left-color: #0f7b6c;
}

.md-typeset .admonition.warning,
.md-typeset details.warning {
    background-color: #fdf6e3;
    border-left-color: #cb912f;
}

.md-typeset .admonition.info,
.md-typeset details.info {
    background-color: #e7f3ff;
    border-left-color: #2383e2;
}

.md-typeset .admonition-title {
    background-color: transparent !important;
    border: none;
    font-weight: 600;
    padding-left: 2.5rem;
}

.md-typeset .admonition-title::before {
    left: 0.8rem;
}

/* Tables - clean style */
.md-typeset table:not([class]) {
    font-size: 0.85rem;
    border: none;
}

.md-typeset table:not([class]) th {
    background-color: #fbfbfa;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
}

.md-typeset table:not([class]) td,
.md-typeset table:not([class]) th {
    border-bottom: 1px solid #e8e8e8;
    padding: 0.75rem 1rem;
}

.md-typeset table:not([class]) tr:hover td {
    background-color: #fbfbfa;
}

/* Code blocks */
.md-typeset code {
    background-color: #f5f5f4;
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    font-size: 0.85em;
}

/* Images */
.md-typeset img {
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Links */
.md-typeset a {
    color: #2383e2;
}

.md-typeset a:hover {
    color: #1a6bc2;
}

/* Search */
.md-search__input {
    background-color: #f5f5f4;
    border-radius: 8px;
}

/* Hide default Material language selector */
.md-header__option,
.md-select[data-md-component="language"] {
    display: none !important;
}

/* Custom language dropdown */
#lang-dropdown {
    position: relative;
    margin-right: 8px;
    z-index: 10;
}

.lang-dropdown__trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #ffffff;
    color: #37352f;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 500;
    font-family: inherit;
    transition: border-color 0.15s, background-color 0.15s;
}

.lang-dropdown__trigger:hover {
    border-color: #c0c0c0;
    background-color: #fafafa;
}

.lang-dropdown__flag {
    font-size: 1rem;
    line-height: 1;
}

.lang-dropdown__current {
    line-height: 1;
}

.lang-dropdown__chevron {
    flex-shrink: 0;
    transition: transform 0.2s;
}

.lang-dropdown--open .lang-dropdown__chevron {
    transform: rotate(180deg);
}

.lang-dropdown__menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 120px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
}

.lang-dropdown--open .lang-dropdown__menu {
    display: block;
}

.lang-dropdown__item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    color: #6b6b6b;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    transition: background-color 0.12s, color 0.12s;
}

.lang-dropdown__item:hover {
    background-color: #f5f5f4;
    color: #37352f;
}

.lang-dropdown__item--active {
    color: #37352f;
    font-weight: 600;
    background-color: #f0f0f0;
}

/* Quick links grid on welcome page */
.quick-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 2rem;
}

.quick-links__card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    text-decoration: none !important;
    color: inherit !important;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.quick-links__card:hover {
    border-color: #d0d0d0;
    box-shadow: 0 3px 12px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}

.quick-links__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background-color: #f0f4ff;
    color: #2383e2;
}

.quick-links__icon svg {
    border: none !important;
    box-shadow: none !important;
}

.quick-links__title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #37352f;
}

.quick-links__desc {
    font-size: 0.82rem;
    color: #6b6b6b;
    line-height: 1.4;
}

@media screen and (max-width: 600px) {
    .quick-links {
        grid-template-columns: 1fr;
    }
}

/* Video embeds */
.md-typeset iframe.video-embed {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 1rem;
}

/* Footer - hide */
.md-footer {
    display: none;
}

/* Mobile adjustments */
@media screen and (max-width: 76.1875em) {
    .md-nav--primary .md-nav__title {
        background-color: #ffffff;
    }
}

/* Always show page title in header instead of site name */
.md-header__topic:first-child {
    display: none !important;
}

.md-header__topic + .md-header__topic {
    display: flex !important;
    opacity: 1 !important;
    transform: translateX(0) !important;
    transition: none !important;
    position: static !important;
    pointer-events: auto !important;
    visibility: visible !important;
}

/* Override any scroll-based hiding */
.md-header[data-md-state="shadow"] .md-header__topic + .md-header__topic {
    display: flex !important;
    opacity: 1 !important;
}
