/* Custom CSS for Champa Intelligence Documentation */

/* Brand colors */
:root {
    --champa-primary: #3f51b5;
    --champa-accent: #536dfe;
    --champa-success: #4caf50;
    --champa-warning: #ff9800;
    --champa-error: #f44336;
    --champa-info: #2196f3;
}

/* Typography improvements - smaller paragraph text */
.md-typeset {
    font-size: 0.625rem;
    line-height: 1.6;
}

.md-typeset p {
    font-size: 0.625rem;
    margin-bottom: 1em;
}

.md-typeset h1 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 0;
}

.md-typeset h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 2em;
}

.md-typeset h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.25em;
}

.md-typeset h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 1.25em;
}

/* Custom admonition styles */
.md-typeset .admonition.tip {
    border-left-color: var(--champa-success);
}

.md-typeset .admonition.warning {
    border-left-color: var(--champa-warning);
}

.md-typeset .admonition.danger {
    border-left-color: var(--champa-error);
}

.md-typeset .admonition {
    font-size: 0.625rem;
}

/* Code block enhancements */
.md-typeset pre {
    border-radius: 6px;
    font-size: 0.5rem;
}

.md-typeset pre > code {
    border-radius: 6px;
}

.md-typeset code {
    font-size: 0.5rem;
    padding: 0.1em 0.4em;
    border-radius: 3px;
}

/* Highlighted text for important notes */
.highlight-important {
    background-color: #fff3cd;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
}

/* API endpoint styling */
.api-endpoint {
    background-color: #f5f5f5;
    border-left: 4px solid var(--champa-accent);
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 4px;
    font-size: 0.625rem;
}

.api-endpoint .method {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-weight: 600;
    font-size: 0.625rem;
    margin-right: 8px;
}

.api-endpoint .method.get {
    background-color: #61affe;
    color: white;
}

.api-endpoint .method.post {
    background-color: #49cc90;
    color: white;
}

.api-endpoint .method.put {
    background-color: #fca130;
    color: white;
}

.api-endpoint .method.delete {
    background-color: #f93e3e;
    color: white;
}

.api-endpoint .path {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.625rem;
}

/* Response examples */
.response-example {
    background-color: #263238;
    color: #fff;
    padding: 16px;
    border-radius: 6px;
    margin: 16px 0;
    overflow-x: auto;
    font-size: 0.625rem;
}

.response-example pre {
    margin: 0;
    background: transparent;
}

/* Permission badges */
.permission-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.625rem;
    font-weight: 600;
    margin-right: 8px;
    text-transform: uppercase;
}

.permission-badge.required {
    background-color: #ffebee;
    color: #c62828;
}

.permission-badge.optional {
    background-color: #e8f5e9;
    color: #2e7d32;
}

/* Grid cards enhancement */
.md-typeset .grid.cards > ol > li,
.md-typeset .grid.cards > ul > li {
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.md-typeset .grid.cards > ol > li:hover,
.md-typeset .grid.cards > ul > li:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Table enhancements */
.md-typeset table:not([class]) {
    border-radius: 4px;
    overflow: hidden;
    font-size: 0.625rem;
}

.md-typeset table:not([class]) th {
    background-color: var(--champa-primary);
    color: white;
    font-weight: 600;
    padding: 12px;
}

.md-typeset table:not([class]) td {
    padding: 10px 12px;
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-indicator.success {
    background-color: var(--champa-success);
}

.status-indicator.warning {
    background-color: var(--champa-warning);
}

.status-indicator.error {
    background-color: var(--champa-error);
}

/* Copy button styling */
.copy-button {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 12px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.5rem;
    transition: all 0.2s;
    z-index: 10;
}

.copy-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.md-typeset pre {
    position: relative;
}

/* Responsive improvements */
@media screen and (max-width: 768px) {
    .md-typeset {
        font-size: 0.5rem;
    }

    .api-endpoint {
        padding: 8px 12px;
    }

    .api-endpoint .method {
        display: block;
        margin-bottom: 4px;
    }
}

/* Mermaid diagram styling */
.mermaid {
    text-align: center;
    margin: 24px 0;
    background-color: transparent;
}

/* Custom scrollbar for code blocks */
.md-typeset pre::-webkit-scrollbar {
    height: 8px;
}

.md-typeset pre::-webkit-scrollbar-track {
    background: #37474f;
}

.md-typeset pre::-webkit-scrollbar-thumb {
    background: #546e7a;
    border-radius: 4px;
}

.md-typeset pre::-webkit-scrollbar-thumb:hover {
    background: #607d8b;
}

/* Lists styling */
.md-typeset ul,
.md-typeset ol {
    font-size: 0.625rem;
}

.md-typeset li {
    margin-bottom: 0.625em;
}

/* Navigation improvements */
.md-nav__link {
    font-size: 0.625rem;
}

/* Search improvements */
.md-search__input {
    font-size: 0.625rem;
}