/* Bassode API Documentation Styles */
/* Uses global theme system from themes.css */

:root {
    --font-mono: 'Consolas', 'Monaco', 'Courier New', monospace;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --bs-font-sans-serif: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --bs-body-font-family: var(--bs-font-sans-serif);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background: var(--bg-primary);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Header & Navigation */
header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.logo-img {
    height: 55px;
    width: auto;
    display: block;
}

.logo-subtitle {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
}

.logo:hover {
    color: var(--primary-hover);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a:not(.btn-primary) {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:not(.btn-primary):hover {
    color: var(--primary-color);
}

.nav-links a:not(.btn-primary):focus,
.nav-links a:not(.btn-primary):focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 3px;
}

/* Theme toggle in navigation */
.nav-links .theme-toggle {
    margin: 0 0.5rem;
}

.theme-toggle svg {
    display: block;
}

.btn-primary {
    background: var(--primary-color);
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: white !important;
}

.btn-primary:focus,
.btn-primary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Main Content */
main {
    padding: 3rem 0;
    min-height: calc(100vh - 200px);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-top: 3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

h5, h6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

p {
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

.hero h1 {
    margin-bottom: 1rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
    cursor: pointer;
    background: var(--secondary-button-bg);
    color: var(--text-primary);
}

.btn:hover {
    background: var(--secondary-button-hover);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn:focus,
.btn:focus-visible {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.btn-secondary {
    background: var(--secondary-button-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--secondary-button-hover);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn-secondary:focus,
.btn-secondary:focus-visible {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Feature Cards */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-card {
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.2s;
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card h3 {
    margin-top: 0;
    font-size: 1.25rem;
}

.feature-card a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.feature-card a:hover {
    text-decoration: underline;
    color: var(--primary-hover);
}

/* Code Examples */
.code-example {
    margin: 1.5rem 0;
}

.code-example h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

pre {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
    margin: 0;
}

code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-primary);
}

p code, li code, td code {
    background: var(--bg-tertiary);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

/* Lists */
ul, ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

table thead {
    background: var(--bg-secondary);
}

table th {
    text-align: left;
    padding: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

table td {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
}

table tbody tr:hover {
    background: var(--bg-secondary);
}

/* Alerts & Info Boxes */
.info, .warning {
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.info {
    background: var(--info-bg);
    border-color: var(--info-color);
    color: var(--text-primary);
}

.warning {
    background: var(--error-bg);
    border-color: var(--warning-color);
    color: var(--text-primary);
}

/* Endpoints */
.endpoint {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
}

.endpoint-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.method {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.method.get {
    background: var(--success-color);
    color: white;
}

.method.post {
    background: var(--primary-color);
    color: white;
}

.method.put {
    background: var(--warning-color);
    color: white;
}

.method.delete {
    background: var(--danger-color);
    color: white;
}

.endpoint-header code {
    font-size: 1.125rem;
    background: none;
    border: none;
    padding: 0;
}

/* Scopes */
.scope-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 6px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.scope-card.special {
    border-left-color: var(--warning-color);
    background: var(--bg-tertiary);
}

.scope-card h3 {
    margin-top: 0;
}

.scope-card h4 {
    font-size: 0.95rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.scope-combination {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.scope-combination h3 {
    margin-top: 0;
    font-size: 1.125rem;
}

.scope-combination code {
    display: block;
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

/* Quick Start */
.quick-start {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
}

.quick-start h2 {
    margin-top: 0;
    border: none;
    padding-bottom: 0;
}

/* Resources */
.resources {
    margin: 3rem 0;
}

.resources ul {
    list-style: none;
    padding: 0;
}

.resources li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.resources li:last-child {
    border-bottom: none;
}

.resources a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.resources a:hover {
    text-decoration: underline;
}

/* Next Steps */
.next-steps {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 4rem;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer p {
    margin: 0;
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-links a:focus,
.footer-links a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 3px;
}

/* Global Focus Styles */
a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 3px;
}

button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

/* Remove default outline for mouse users, keep for keyboard */
:focus:not(:focus-visible) {
    outline: none;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        gap: 0.75rem;
        font-size: 0.875rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    footer .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .next-steps {
        flex-direction: column;
    }
    
    pre {
        font-size: 0.8rem;
    }
}
