.guides-layout {
    position: relative;
    z-index: 0;
}

.guides-layout .type-header {
    z-index: 9999;
}

.guides-layout main {
    position: relative;
    z-index: 1; /* ensure below header but above background */
    margin: 0; /* override global main margin to avoid overlap with fixed header */
}
/* Response code examples (left column) */
.openapi-response-left { border: 1px solid #E5E7EB; border-radius: 8px; margin-top: 16px; background: #FFFFFF; }
.openapi-response-left-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid #F3F4F6; }
.openapi-response-left-header span { font-family: Mazzard, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; font-size: 14px; font-weight: 600; color: #111827; }
.openapi-response-left-list { display: flex; flex-direction: column; }
.openapi-response-left-item { cursor: pointer; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid #F9FAFB; }
.openapi-response-left-item:hover { background: #F9FAFB; }
.openapi-response-left-row { display: flex; align-items: center; width: 100%; }
.openapi-response-left-code { font-weight: 600; font-size: 12px; color: #111827; background: #EEF2FF; border-radius: 9999px; padding: 4px 10px; }
.openapi-response-left-ctype { font-size: 12px; color: #6B7280; }
.openapi-response-left-spacer { flex: 1; }

/* Anchor highlight when jumped from response item */
.schema-tree-highlight { box-shadow: 0 0 0 3px rgba(67,89,243,0.25) inset; transition: box-shadow 0.2s ease-in-out; }

/* Response Schemas (left column) – match api-preview dark response card */
.openapi-response-schemas { border: 1px solid #334155; border-radius: 8px; margin-top: 16px; background: #0f172a; }
.openapi-response-schemas-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid #334155; }
.openapi-response-schemas-title { margin: 0; font-family: Mazzard, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; font-size: 14px; font-weight: 600; color: #e5e7eb; }
.openapi-response-schemas-body { padding: 8px 12px; color: #e5e7eb; }
.openapi-response-schema-item { padding: 2px 0; }
.openapi-response-schema-header { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.openapi-response-schema-header:hover { background: #111827; }
.openapi-response-schema-arrow { transition: transform 0.18s ease-in-out; transform: rotate(90deg); color: #9ca3af; font-weight: 700; }
.openapi-response-schema-header[aria-expanded="true"] .openapi-response-schema-arrow { transform: rotate(270deg); }
.openapi-response-schema-code { font-weight: 700; font-size: 12px; color: #e5e7eb; background: #1f2937; border-radius: 9999px; padding: 3px 10px; min-width: 42px; text-align: center; }
.openapi-response-schema-ctype { font-size: 12px; color: #9ca3af; }
.openapi-response-schema-content { padding: 4px 10px 10px 28px; display: none; border-left: 1px dashed #334155; }
.openapi-response-schema-content.expanded { display: block; }

/* Status badge colors similar to GitBook */
.openapi-response-schema-code.status-2xx { background: #ECFDF5; color: #065F46; }
.openapi-response-schema-code.status-3xx { background: #EFF6FF; color: #1E40AF; }
.openapi-response-schema-code.status-4xx { background: #FEF2F2; color: #991B1B; }
.openapi-response-schema-code.status-5xx { background: #FFFBEB; color: #92400E; }

/* Remove separate dark overrides: base matches api-preview dark card */
/* ModernDocs Theme - Component Styles */

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    padding: var(--space-2) var(--space-4);
    border: 1px solid transparent;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

.btn-primary {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--btn-primary-bg);
    border: 1px solid var(--btn-primary-border);
    border-radius: 8px;
    color: var(--btn-primary-color);
    font-weight: 500;
    font-size: 14px;
    line-height: 1.25;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    height: 36px !important;
    min-width: 60px;
    cursor: pointer;
    box-sizing: border-box;
    text-decoration: none !important;
    border-bottom: 1px solid var(--btn-primary-border) !important;
    outline: none !important;
}

.btn-primary:hover {
    background: var(--btn-primary-hover-bg);
    border-color: var(--btn-primary-hover-border);
    color: var(--btn-primary-hover-color);
    transform: translateY(-1px);
    text-decoration: none !important;
    border-bottom: 1px solid var(--btn-primary-hover-border) !important;
    box-shadow: none !important;
}

.btn-secondary {
    color: var(--gray-700);
    background: var(--app-card-bg);
    border-color: var(--gray-300);
}

.btn-secondary:hover {
    background-color: var(--gray-50);
    color: var(--app-card-title-color);
    text-decoration: none;
}

.btn-ghost {
    color: var(--app-card-subtitle-color);
    background-color: transparent;
    border-color: transparent;
}

.btn-ghost:hover {
    color: var(--gray-700);
    background-color: var(--gray-100);
    text-decoration: none;
}

.btn-sm {
    padding: var(--space-1) var(--space-3);
    font-size: 0.75rem;
}

.btn-lg {
    padding: var(--space-3) var(--space-6);
    font-size: 1rem;
}


/* CTA button specific styles */
.cta-section .btn {
    position: relative;
    z-index: 10;
    display: inline-flex;
    width: auto;
    min-width: auto;
    max-width: none;
}

.cta-section .btn-primary {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    backdrop-filter: blur(8px);
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-section .btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.2);
}


/* RTL button adjustments */
[dir="rtl"] .btn {
    flex-direction: row-reverse;
}

[dir="rtl"] .btn svg {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* ==========================================================================
   CARDS
   ========================================================================== */

.card {
    background: var(--app-card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--app-card-border);
    overflow: hidden;
}

.card-hover {
    transition: var(--transition);
}

.card-hover:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-0.25rem);
}

.card-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--gray-200);
}

.card-body {
    padding: var(--space-6);
}

.card-footer {
    padding: var(--space-6);
    border-top: 1px solid var(--gray-200);
    background-color: var(--gray-50);
}

/* ==========================================================================
   APP CARDS - Mintlify inspired
   ========================================================================== */

.app-card {
    position: relative;
    background: var(--app-card-bg);
    border-radius: 1rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid var(--app-card-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 4px; /* Više uvučeno sa leve strane */
    right: 4px; /* Više uvučeno sa desne strane */
    height: 4px;
    background: linear-gradient(90deg, var(--primary-500), var(--accent-500));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 1rem 1rem 0 0; /* Zaobljeni uglovi samo na vrhu */
}

.app-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-0.5rem);
    border-color: var(--primary-200);
}

.app-card:hover::before {
    opacity: 1;
}

.app-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(135deg, var(--primary-100), var(--accent-100));
    border-radius: 0.75rem;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.app-card-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-200), var(--accent-200));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.app-card:hover .app-card-icon::before {
    opacity: 1;
}

.app-card-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--app-card-title-color);
    letter-spacing: -0.025em;
}

.app-card-description {
    color: var(--app-card-description-color);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-top: var(--space-2);
}

.app-card-arrow {
    display: flex;
    align-items: center;
    color: var(--primary-600);
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: var(--space-4);
    transition: all 0.3s ease;
}

.app-card-arrow svg {
    margin-left: var(--space-2);
    width: 1rem;
    height: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-card:hover .app-card-arrow {
    color: var(--primary-700);
}

.app-card:hover .app-card-arrow svg {
    transform: translateX(0.5rem);
}

/* Modern App Cards - Mintlify inspired */
.app-card-modern {
    background: var(--app-card-bg);
    border: 1px solid var(--app-card-border);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
    box-shadow: none;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 380px;
}


.app-card-modern:hover {
    transform: translateY(-0.5rem);
    box-shadow: none;
    border-color: var(--primary-200);
}

.app-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.app-card-icon-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    background: linear-gradient(135deg, var(--primary-100), var(--accent-100));
    border-radius: 1rem;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}


.app-card-icon-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-200), var(--accent-200));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.app-card-modern:hover .app-card-icon-modern::before {
    opacity: 1;
}

.app-card-modern:hover .app-card-icon-modern img {
    transform: scale(1.1);
    z-index: 10;
    position: relative;
}

.app-card-title-section {
    flex: 1;
}

.app-card-title-modern {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--app-card-title-color);
    margin-bottom: 0.375rem;
    letter-spacing: -0.025em;
    line-height: 1.3;
}


.app-card-subtitle {
    font-size: 0.875rem;
    color: var(--app-card-subtitle-color);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}


.app-card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.app-card-description-modern {
    color: var(--app-card-description-color);
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}


.app-card-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-top: auto;
    padding-top: 1.25rem;
    width: 100%;
    box-sizing: border-box;
    align-items: stretch;
    justify-content: flex-start;
}

.app-card-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
    color: var(--gray-700);
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--app-card-border);
    justify-content: center;
    box-sizing: border-box;
    white-space: nowrap; /* Sprečava prelom teksta unutar linka */
    flex: 0 0 auto; /* Ne raste, ne skuplja se, prirodna širina */
    width: auto; /* Automatska širina na osnovu sadržaja */
}

.app-card-link:hover {
    background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
    color: var(--primary-700);
    border-color: var(--primary-200);
    transform: translateY(-1px);
    box-shadow: none;
}

.app-card-link svg {
    width: 0.875rem;
    height: 0.875rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.app-card-link:hover svg {
    transform: scale(1.1);
}

/* Icon colors for app card links */
.app-card-link svg {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Documentation link - blue */
.app-card-link[href*="/guides/"] svg,
.app-card-link[href*="/documentation"] svg {
    color: var(--icon-blue);
}

.app-card-link[href*="/guides/"]:hover svg,
.app-card-link[href*="/documentation"]:hover svg {
    color: var(--icon-blue-hover);
}

/* API Reference link - green */
.app-card-link[href*="/api/"] svg {
    color: var(--icon-green);
}

.app-card-link[href*="/api/"]:hover svg {
    color: var(--icon-green-hover);
}

/* Changelog link - purple */
.app-card-link[href*="/changelog"] svg {
    color: var(--icon-purple);
}

.app-card-link[href*="/changelog"]:hover svg {
    color: var(--icon-purple-hover);
}

/* Responsive button adjustments */
@media (min-width: 1024px) {
    .app-card-links {
        gap: 0.5rem;
        justify-content: flex-start; /* Linkovi se poravnavaju levo */
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .app-card-links {
        gap: 0.375rem;
    }
    
    .app-card-link {
        font-size: 0.7rem;
        padding: 0.375rem 0.5rem;
    }
}

@media (max-width: 767px) {
    .app-card-links {
        gap: 0.375rem;
    }
    
    .app-card-link {
        font-size: 0.7rem;
        padding: 0.375rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .app-card-links {
        gap: 0.375rem;
        justify-content: center; /* Na mobilnom centriramo linkove */
    }
    
    .app-card-link {
        font-size: 0.7rem;
        padding: 0.375rem 0.5rem;
        flex: 0 1 auto; /* Omogućava skupljanje na vrlo malim ekranima */
        max-width: calc(50% - 0.1875rem); /* Maksimalno 2 po redu na mobilnom */
    }
}

@media (max-width: 360px) {
    .app-card-link {
        flex: 1 1 100%; /* Na vrlo malim ekranima 1 po redu */
        max-width: 100%;
        justify-content: center;
    }
}

/* App cards background for list layouts - transparent to show gradient */
.header-list .app-card-modern {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(10px) !important;
}

/* RTL adjustments for app cards */
[dir="rtl"] .app-card-modern {
    text-align: right;
}

[dir="rtl"] .app-card-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .app-card-icon-modern {
    margin-left: 1rem;
    margin-right: 0;
}

[dir="rtl"] .app-card-links {
    justify-content: flex-start;
}

[dir="rtl"] .app-card-link {
    flex-direction: row-reverse;
}

[dir="rtl"] .app-card-link svg {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* ==========================================================================
   LANGUAGE DROPDOWN
   ========================================================================== */

.language-dropdown {
    position: relative;
    display: inline-block;
    z-index: 99999;
}

.language-dropdown-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--theme-toggle-bg);
    border: 1px solid var(--theme-toggle-border);
    border-radius: 8px;
    color: var(--theme-toggle-color);
    font-weight: 500;
    font-size: 14px;
    line-height: 1.25;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    height: 36px !important;
    min-width: 60px;
    max-width: 80px;
    cursor: pointer;
    box-sizing: border-box;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    outline: none !important;
}

.language-dropdown-button:hover {
    background: var(--theme-toggle-hover-bg);
    border-color: var(--theme-toggle-hover-border);
    color: var(--theme-toggle-hover-color);
    transform: translateY(-1px);
    text-decoration: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: none !important;
}

.language-dropdown-button:focus {
    outline: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

.language-dropdown-button:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.5) !important;
    outline-offset: 2px !important;
}

/* Dodatni override za sve elemente u dropdown dugmetu */
.language-dropdown-button span,
.language-dropdown-button .flag,
.language-dropdown-button .language-text,
.language-dropdown-button svg {
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.language-dropdown-button:hover span,
.language-dropdown-button:hover .flag,
.language-dropdown-button:hover .language-text,
.language-dropdown-button:hover svg {
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.language-dropdown-button:active {
    transform: translateY(0);
}

.dropdown-arrow {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.language-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.language-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 140px;
    background: var(--language-dropdown-menu-bg);
    border: 1px solid var(--language-dropdown-menu-border);
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.95);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100000;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.language-dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.language-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: var(--language-dropdown-item-color);
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.25;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid var(--language-dropdown-item-border);
}

.language-dropdown-item:last-child {
    border-bottom: none;
}

.language-dropdown-item:hover {
    background: var(--language-dropdown-item-hover-bg);
    color: var(--language-dropdown-item-hover-color);
    text-decoration: none !important;
    border-bottom: 1px solid var(--language-dropdown-item-border);
}

.language-dropdown-item:active {
    background: var(--language-dropdown-item-hover-bg);
}

/* Dodatni override za sve elemente u dropdown itemima */
.language-dropdown-item,
.language-dropdown-item *,
.language-dropdown-item span,
.language-dropdown-item .flag,
.language-dropdown-item .language-text {
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.language-dropdown-item:hover,
.language-dropdown-item:hover *,
.language-dropdown-item:hover span,
.language-dropdown-item:hover .flag,
.language-dropdown-item:hover .language-text {
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.language-dropdown-item:active,
.language-dropdown-item:active *,
.language-dropdown-item:active span,
.language-dropdown-item:active .flag,
.language-dropdown-item:active .language-text {
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}


.flag {
    font-size: 16px;
    line-height: 1;
    display: inline-block;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.language-text {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.25;
}

/* ==========================================================================
   THEME SWITCHER
   ========================================================================== */

.theme-switcher {
    position: relative;
    display: inline-block;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--theme-toggle-bg);
    border: 1px solid var(--theme-toggle-border);
    border-radius: 8px;
    color: var(--theme-toggle-color);
    font-weight: 500;
    font-size: 14px;
    line-height: 1.25;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    height: 36px !important;
    min-width: 36px;
    cursor: pointer;
    box-sizing: border-box;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    outline: none !important;
}

.theme-toggle:hover {
    background: var(--theme-toggle-hover-bg);
    border-color: var(--theme-toggle-hover-border);
    color: var(--theme-toggle-hover-color);
    transform: translateY(-1px);
    text-decoration: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: none !important;
}

.theme-toggle:focus {
    outline: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

.theme-toggle:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.5) !important;
    outline-offset: 2px !important;
}

.theme-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}


/* ==========================================================================
   ALERTS
   ========================================================================== */

.alert {
    padding: var(--space-4);
    border-radius: var(--radius-md);
    border: 1px solid;
}

.alert-info {
    background-color: var(--primary-100);
    border-color: var(--primary-200);
    color: var(--primary-800);
}

.alert-success {
    background-color: #dcfce7;
    border-color: #bbf7d0;
    color: #166534;
}

.alert-warning {
    background-color: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
}

.alert-error {
    background-color: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

/* ==========================================================================
   CODE BLOCKS
   ========================================================================== */

.code-block {
    background-color: var(--gray-900);
    color: var(--gray-100);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    overflow-x: auto;
}

.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    background-color: var(--gray-800);
    color: var(--gray-300);
    font-size: 0.875rem;
    border-bottom: 1px solid var(--gray-700);
}

.code-block-content {
    padding: var(--space-4);
}

/* ==========================================================================
   TABLES
   ========================================================================== */

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background-color: var(--gray-50);
}

.table th {
    padding: var(--space-3) var(--space-6);
    text-align: left;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--app-card-subtitle-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table td {
    padding: var(--space-4) var(--space-6);
    white-space: nowrap;
    font-size: 0.875rem;
    color: var(--app-card-title-color);
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background-color: var(--gray-50);
}

/* ==========================================================================
   FORMS
   ========================================================================== */

.form-input {
    display: block;
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    font-size: 0.875rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: var(--gray-400);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: var(--space-1);
}

.form-error {
    font-size: 0.875rem;
    color: #dc2626;
    margin-top: var(--space-1);
}

/* ==========================================================================
   BADGES
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-2);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-primary {
    background-color: var(--primary-100);
    color: var(--primary-800);
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-error {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-gray {
    background-color: var(--gray-100);
    color: var(--gray-800);
}

/* ==========================================================================
   LOADING STATES
   ========================================================================== */

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.loading-spinner {
    animation: spin 1s linear infinite;
    border-radius: 50%;
    width: 1rem;
    height: 1rem;
    border: 2px solid transparent;
    border-bottom-color: var(--primary-600);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   TOOLTIPS
   ========================================================================== */

.tooltip {
    position: absolute;
    z-index: 50;
    padding: var(--space-2) var(--space-1);
    font-size: 0.75rem;
    color: var(--white);
    background-color: var(--gray-900);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   MODALS
   ========================================================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background: var(--app-card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 28rem;
    width: 100%;
    margin: var(--space-4);
}

/* ==========================================================================
   MOBILE MENU
   ========================================================================== */

.mobile-menu-btn {
    padding: var(--space-2);
    border-radius: var(--radius-md);
    color: var(--gray-400);
    background-color: transparent;
    border: none;
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    color: var(--app-card-subtitle-color);
    background-color: var(--gray-100);
}

/* Mobile menu button */
.lg\:hidden {
    display: block;
}

@media (min-width: 1024px) {
    .lg\:hidden {
        display: none;
    }
}

/* ==========================================================================
   SIDEBAR - Mintlify inspired
   ========================================================================== */

.sidebar {
    display: none;
    flex-direction: column;
    width: 18rem;
    position: fixed;
    top: 0;
    bottom: 0;
    padding-top: 4rem;
    padding-bottom: 0;
    background: linear-gradient(180deg, var(--white) 0%, var(--gray-50) 100%);
    border-right: none; /* Removed vertical border */
    backdrop-filter: blur(10px);
    box-shadow: none; /* Removed shadow */
}

.sidebar-mobile {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
}

/* Content area */
.content-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Mintlify-inspired Sidebar Styles */
/* Sticky type header tabs (Mintlify-like) */
.type-header {
    position: fixed;
    top: 0;
    left: 0; /* Start from left edge so logo area is above sidebar */
    right: 0;
    width: 100vw;
    z-index: 9999; /* ensure above main and toc */
    background: var(--body-bg); /* match page background */
    background-attachment: fixed;
    background-size: cover;
    isolation: isolate; /* ensure independent stacking for paint */
    border-bottom: 1px solid var(--gray-200);
    padding-inline-start: 0;
    padding-inline-end: 0;
}

.type-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: var(--main-bg, var(--white));
    pointer-events: none;
    z-index: -1; /* Behind content */
}

.type-tabs { display: flex; align-items: center; width: 100%; }
.type-tabs-left { display: flex; gap: 1rem; align-items: center; }
.type-tabs-right { margin-inline-start: auto; display: flex; align-items: center; gap: 1rem; }

/* RTL support */
:dir(rtl) .type-header { left: 0; right: 0; }
:dir(rtl) .type-tabs-right { margin-inline-start: 0; margin-inline-end: auto; }

.type-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.25rem 0.5rem; /* do vrha i minimalan unutrašnji padding */
    text-decoration: none;
    color: var(--app-card-title-color);
    position: relative;
    outline: none; /* Remove blue focus box */
}
.type-tab:hover { text-decoration: none; }

.type-tab .type-tab-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
}

.type-tab:hover::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(-0.5rem - 1px); /* Align with header border (account for padding + border) */
    height: 2px;
    background: var(--gray-300);
}

/* Ne menjaj boju teksta na hover */
.type-tab:hover { color: var(--app-card-title-color); }

.type-tab.active {
    color: var(--app-card-title-color);
}

.type-tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(-0.5rem - 1px); /* Align with header border (account for padding + border) */
    height: 2px;
    background: var(--primary-600);
}

[data-theme="dark"] .type-header { border-bottom-color: var(--gray-700); }
[data-theme="dark"] .type-tab:hover::after { background: var(--gray-600); }
[data-theme="dark"] .type-tab.active::after { background: var(--primary-400); }

.sidebar-mintlify,
.sidebar-user,
.sidebar-developer {
    position: fixed;
    top: 0;
    left: 0;
    width: 18.625rem; /* 298px - documentation sidebar width */
    height: 100vh;
    background: transparent;
    border-right: none; /* Removed vertical border */
    z-index: 40;
    transition: transform 0.3s ease;
}

.sidebar-mintlify-content,
.sidebar-user-content,
.sidebar-developer-content {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Logo */
.sidebar-logo {
    padding: 0 1.5rem 1rem;
    margin-bottom: 1rem;
}

.sidebar-logo-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar-logo-link:hover .sidebar-logo-img {
    transform: scale(1.1);
}

.sidebar-logo-link:hover .sidebar-logo-text {
    color: var(--primary-600);
}

.sidebar-logo-img {
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.sidebar-logo-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--app-card-title-color);
    transition: color 0.3s ease;
}

.sidebar-logo a {
    text-decoration: none;
}

.sidebar-logo img {
    flex-shrink: 0;
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    object-fit: contain;
}

/* Theme switcher in sidebar */
.sidebar-logo .theme-switcher {
    position: relative;
    z-index: 10;
}

.sidebar-logo .theme-toggle {
    position: relative;
    z-index: 10;
    pointer-events: auto;
    cursor: pointer;
}

.sidebar-logo .theme-toggle:hover {
    pointer-events: auto;
}

.sidebar-logo .theme-toggle:active {
    pointer-events: auto;
}

.sidebar-logo .theme-toggle:focus {
    pointer-events: auto;
}

/* Search */
.sidebar-search {
    padding: 0 1.5rem 1rem;
    margin-bottom: 1rem;
}

.search-container {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: var(--gray-400);
    pointer-events: none;
}

.search-input-mintlify,
.search-input-user,
.search-input-developer {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: var(--white);
    transition: all 0.2s ease;
}

.search-input-mintlify:focus,
.search-input-user:focus,
.search-input-developer:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.search-input-mintlify::placeholder,
.search-input-user::placeholder,
.search-input-developer::placeholder {
    color: var(--gray-400);
}

/* Type Selector - Mintlify Style */
.sidebar-type-selector {
    padding: 0 1.5rem 1rem;
    margin-bottom: 1rem;
}

.type-selector-dropdown {
    position: relative;
    width: 100%;
}

.type-selector-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    color: var(--app-card-title-color);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    min-height: 2.5rem;
}

.type-selector-button-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.type-selector-button:hover {
    border-color: var(--gray-400);
    background: var(--gray-50);
}

.type-selector-button:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.type-selector-text {
    flex: 1;
    text-align: left;
}

.type-selector-arrow {
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.type-selector-dropdown.open .type-selector-arrow {
    transform: rotate(180deg);
}

.type-selector-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    margin-top: 0.25rem;
}

.type-selector-dropdown.open .type-selector-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.type-selector-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--gray-100);
    min-height: 2.5rem;
    display: flex;
    align-items: center;
}

.type-selector-item:last-child {
    border-bottom: none;
}

.type-selector-item:hover {
    background: var(--gray-50);
}

.type-selector-item:hover .documentation-icon {
    background: var(--primary-200);
    color: var(--primary-700);
}

.type-selector-item:hover .api-icon {
    background: var(--accent-200);
    color: var(--accent-700);
}

.type-selector-item:hover .changelog-icon {
    background: var(--icon-green-hover);
    color: var(--white);
}

.type-selector-item.selected {
    background: var(--primary-50);
    color: var(--primary-700);
}

.type-selector-item span {
    font-size: 0.875rem;
    color: inherit;
}

/* Type selector item content */
.type-selector-item-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.type-selector-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.375rem;
    flex-shrink: 0;
}

.type-selector-text-content {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    flex: 1;
}

.type-selector-title {
    font-size: 0.8125rem;
    font-weight: 500;
    color: inherit;
    line-height: 1.25;
}

.type-selector-description {
    font-size: 0.6875rem;
    color: var(--app-card-subtitle-color);
    line-height: 1.25;
}

/* Icon colors */
.documentation-icon {
    background: var(--primary-100);
    color: var(--primary-600);
}

.api-icon {
    background: var(--accent-100);
    color: var(--accent-600);
}

.changelog-icon {
    background: var(--icon-green);
    color: var(--white);
}

/* Icon colors - now using variables */
.documentation-icon {
    background: var(--primary-100);
    color: var(--primary-600);
}

.api-icon {
    background: var(--accent-100);
    color: var(--accent-600);
}

.changelog-icon {
    background: var(--icon-green);
    color: var(--white);
}

.type-selector-description {
    color: var(--app-card-subtitle-color);
}

.type-selector-item:hover .documentation-icon {
    background: var(--primary-200);
    color: var(--primary-700);
}

.type-selector-item:hover .api-icon {
    background: var(--accent-200);
    color: var(--accent-700);
}

.type-selector-item:hover .changelog-icon {
    background: var(--icon-green-hover);
    color: var(--white);
}

/* Navigation - now using variables */
.nav-section-header {
    color: var(--sidebar-nav-section-title-color);
}

.nav-section-header:hover {
    background: var(--sidebar-nav-section-header-hover-bg);
    color: var(--sidebar-nav-item-hover-color);
}

.nav-section-title {
    color: var(--sidebar-nav-section-title-color);
}

.nav-section-icon {
    color: var(--gray-400);
}

.nav-arrow {
    color: var(--gray-400);
}

.nav-link {
    color: var(--sidebar-nav-item-color);
}

.nav-link:hover {
    color: var(--sidebar-nav-item-hover-color);
    background: var(--sidebar-nav-item-hover-bg);
    border-left-color: var(--gray-200);
}

.nav-link.active {
    color: var(--sidebar-nav-item-active-color);
    background: var(--sidebar-nav-item-active-bg);
    border-left-color: var(--sidebar-nav-item-active-color);
}

.nav-link.main-page {
    border-bottom-color: var(--gray-200);
    background: var(--gray-50);
    color: var(--app-card-title-color);
}

/* Navigation - Mintlify Style */
.sidebar-mintlify .sidebar-navigation,
.sidebar-user .sidebar-navigation,
.sidebar-developer .sidebar-navigation {
    flex: 1;
    padding: 0;
    overflow-y: auto;
    flex-shrink: 1;
}

.nav-section {
    margin-bottom: 0;
}

.nav-section:not(:last-child) {
    margin-bottom: 0.5rem;
}

.nav-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.375rem 0.5rem 0.375rem 1rem; /* reduce right padding for more arrow space */
    cursor: pointer;
    border-radius: 0;
    transition: all 0.15s ease;
    user-select: none;
    margin: 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--app-card-subtitle-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    height: 24px;
}

.nav-section-title-container {
    display: flex;
    align-items: center;
    height: 100%;
    line-height: 1;
}

.nav-section-icon {
    width: 1rem;
    height: 1rem;
    color: var(--gray-400);
    flex-shrink: 0;
}

.nav-section-header:hover {
    background: var(--gray-50);
    color: var(--gray-700);
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 500;
    color: inherit;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-arrow {
    width: 1rem;
    height: 1rem;
    color: var(--gray-400);
    transition: transform 0.15s ease;
}

.nav-section-content {
    display: none;
    padding: 0;
    margin: 0;
    margin-left: 2.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.75rem;
}

.nav-section-content.expanded {
    display: block;
}

/* Mintlify-style nav list */
.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0;
    padding: 0;
    margin-bottom: 0.25rem;
}

.nav-link {
    display: block;
    padding: 0.25rem 2.5rem 0.25rem;
    margin: 0;
    font-size: 0.875rem;
    color: var(--app-card-description-color);
    text-decoration: none;
    border-radius: 0;
    transition: all 0.15s ease;
    position: relative;
    line-height: 1.4;
    border-left: 2px solid transparent;
    height: auto;
    min-height: 24px;
    display: flex;
    align-items: center;
}

.nav-link:hover {
    color: var(--app-card-title-color);
    background: var(--gray-50);
    text-decoration: none;
    border-left-color: var(--gray-200);
}

.nav-link.active {
    color: var(--primary-600);
    background: var(--primary-50);
    font-weight: 500;
    border-left-color: transparent; /* liniju crtamo pseudo-elementom da možemo da je poravnamo */
}

/* Aktivna vertikalna linija poravnata sa početkom ikonice roditeljske sekcije */
.nav-link.active::before {
    content: "";
    position: absolute;
    left: var(--active-line-left, 1rem);
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-600);
    border-radius: 1px;
}

.nav-link.main-page {
    font-weight: 600;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
    height: auto;
    min-height: 32px;
    font-size: 0.875rem;
    color: var(--app-card-title-color);
    text-transform: none;
    letter-spacing: normal;
    display: flex;
    align-items: center;
    border-radius: 0.375rem;
}

/* Mobile sidebar */
.mobile-sidebar-mintlify,
.mobile-sidebar-user,
.mobile-sidebar-developer {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
}

.mobile-sidebar-mintlify.hidden,
.mobile-sidebar-user.hidden,
.mobile-sidebar-developer.hidden {
    display: none;
}

.mobile-sidebar-mintlify-content,
.mobile-sidebar-user-content,
.mobile-sidebar-developer-content {
    width: 18rem;
    background: var(--white);
    display: flex;
    flex-direction: column;
}

.mobile-sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
}

.mobile-close-btn {
    padding: 0.5rem;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 0.375rem;
    color: var(--app-card-subtitle-color);
    transition: all 0.2s ease;
}

.mobile-close-btn:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.mobile-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

/* Sidebar mintlify - now using variables */
.sidebar-mintlify,
.sidebar-user,
.sidebar-developer {
    background: var(--sidebar-mintlify-bg);
    backdrop-filter: none;
    border-right: none; /* Removed vertical border */
}

.sidebar-logo span {
    color: var(--sidebar-logo-text-color);
}

.sidebar-logo a:hover span {
    color: var(--sidebar-logo-text-hover-color);
}

.sidebar-logo-text {
    color: var(--sidebar-logo-text-color);
}

.sidebar-logo-link:hover .sidebar-logo-text {
    color: var(--sidebar-logo-text-hover-color);
}

.search-input-mintlify,
.search-input-user,
.search-input-developer {
    background: var(--sidebar-search-input-bg);
    border-color: var(--sidebar-search-input-border);
    color: var(--sidebar-search-input-color);
}

.type-selector {
    background: var(--sidebar-type-selector-bg);
    border-color: var(--sidebar-type-selector-border);
    color: var(--sidebar-type-selector-color);
}

.nav-section-title {
    color: var(--sidebar-nav-section-title-color);
}

.nav-section-header:hover {
    background: var(--sidebar-nav-section-header-hover-bg);
}

.nav-item-mintlify {
    color: var(--sidebar-nav-item-color);
}

.nav-item-mintlify:hover {
    color: var(--sidebar-nav-item-hover-color);
    background: var(--sidebar-nav-item-hover-bg);
}

.nav-item-mintlify.active {
    color: var(--sidebar-nav-item-active-color);
    background: var(--sidebar-nav-item-active-bg);
}

/* Mobile sidebar - now using variables */
.mobile-sidebar-mintlify-content,
.mobile-sidebar-user-content,
.mobile-sidebar-developer-content {
    background: var(--sidebar-mobile-bg);
}

.mobile-sidebar-header {
    border-bottom-color: var(--sidebar-mobile-header-border);
}

.mobile-close-btn {
    color: var(--sidebar-mobile-close-color);
}

.mobile-close-btn:hover {
    background: var(--sidebar-mobile-close-hover-bg);
    color: var(--sidebar-mobile-close-hover-color);
}

/* Type selector - now using variables */
.type-selector-button {
    background: var(--sidebar-type-selector-bg);
    border-color: var(--sidebar-type-selector-border);
    color: var(--sidebar-type-selector-color);
}

.type-selector-button:hover {
    background: var(--sidebar-nav-item-hover-bg);
    border-color: var(--gray-400);
}

.type-selector-button:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.type-selector-menu {
    background: var(--sidebar-type-selector-bg);
    border-color: var(--sidebar-type-selector-border);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.type-selector-item {
    border-bottom-color: var(--gray-100);
    color: var(--sidebar-nav-item-color);
}

.type-selector-item:hover {
    background: var(--sidebar-nav-item-hover-bg);
}

.type-selector-item.selected {
    background: var(--primary-50);
    color: var(--primary-700);
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar-mintlify {
        transform: translateX(-100%);
    }
    
    .sidebar-mintlify.open {
        transform: translateX(0);
    }
    
    /* Hide TOC on mobile */
    .w-64 {
        display: none;
    }
    
    /* Adjust main content margin */
    .ml-72 {
        margin-left: 0;
    }
}

@media (min-width: 1025px) {
    .w-64 {
        display: block;
    }
}

/* Fixed sidebar offset for main content */
.ml-72 {
    margin-left: 18.625rem; /* align main content to the right of fixed sidebar */
}

/* Get Started Sticky Box */
.sidebar-get-started {
    position: sticky;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(229, 231, 235, 0.5);
    padding: 1rem;
    margin-top: auto;
    z-index: 10;
    flex-shrink: 0;
    box-shadow: none;
}

.get-started-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.get-started-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.get-started-text h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
    line-height: 1.25;
}

.get-started-text p {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.25;
}

.get-started-button {
    display: block;
    width: 100%;
    background: #1f2937;
    color: white;
    text-align: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.get-started-button:hover {
    background: #374151;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Get Started box - now using variables */
.sidebar-get-started {
    background: var(--get-started-bg);
    border-top-color: var(--get-started-border);
}

.get-started-text h4 {
    color: var(--get-started-title-color);
}

.get-started-text p {
    color: var(--get-started-text-color);
}

.get-started-button {
    background: var(--get-started-button-bg);
}

.get-started-button:hover {
    background: var(--get-started-button-hover-bg);
}

/* Sticky Sidebar Layout */
.sidebar-mintlify-content {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
}

.sidebar-header {
    flex-shrink: 0;
    padding-top: 1rem;
}

.sidebar-scrollable {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 0.5rem; /* was 0 1rem; give ~8px extra on right */
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--sidebar-scrollbar-thumb) var(--sidebar-scrollbar-track);
}

.sidebar-scrollable::-webkit-scrollbar {
    width: 6px;
}

.sidebar-scrollable::-webkit-scrollbar-track {
    background: var(--sidebar-scrollbar-track);
    border-radius: 3px;
}

.sidebar-scrollable::-webkit-scrollbar-thumb {
    background: var(--sidebar-scrollbar-thumb);
    border-radius: 3px;
}

.sidebar-scrollable::-webkit-scrollbar-thumb:hover {
    background: var(--sidebar-scrollbar-thumb-hover);
}

/* ========================================================================== 
   GLOBAL PAGE SCROLLBAR (thin + auto-hide on idle)
   ========================================================================== */
html, body {
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: rgba(100,116,139,0.25) transparent; /* light theme idle */
}

html.is-scrolling, body.is-scrolling {
    scrollbar-color: rgba(100,116,139,0.7) transparent; /* light theme while scrolling */
}

/* WebKit */
html::-webkit-scrollbar, body::-webkit-scrollbar {
    width: 6px; /* thicker */
    height: 6px;
}

html::-webkit-scrollbar-track, body::-webkit-scrollbar-track {
    background: transparent;
}

html::-webkit-scrollbar-thumb, body::-webkit-scrollbar-thumb {
    background-color: rgba(100,116,139,0.25); /* light theme idle */
    border-radius: 6px;
}

html.is-scrolling::-webkit-scrollbar-thumb, body.is-scrolling::-webkit-scrollbar-thumb {
    background-color: rgba(100,116,139,0.7); /* light theme while scrolling */
}

/* Dark theme scrollbar colors */
[data-theme="dark"] html, [data-theme="dark"] body {
    scrollbar-color: rgba(203,213,225,0.35) transparent; /* slate-200 idle */
}

[data-theme="dark"] html.is-scrolling, [data-theme="dark"] body.is-scrolling {
    scrollbar-color: rgba(203,213,225,0.8) transparent; /* slate-200 vivid */
}

[data-theme="dark"] html::-webkit-scrollbar-thumb, [data-theme="dark"] body::-webkit-scrollbar-thumb {
    background-color: rgba(203,213,225,0.35);
}

[data-theme="dark"] html.is-scrolling::-webkit-scrollbar-thumb, [data-theme="dark"] body.is-scrolling::-webkit-scrollbar-thumb {
    background-color: rgba(203,213,225,0.8);
}

.sidebar-get-started {
    flex-shrink: 0;
    background: var(--sidebar-bg);
    border-top: 1px solid var(--sidebar-border);
    padding: 1rem;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

/* Responsive Design for Sticky Sidebar */
@media (max-width: 768px) {
    .sidebar-mintlify {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar-mintlify.open {
        transform: translateX(0);
    }
    
    .mobile-sidebar-mintlify {
        display: block;
    }
    
    .mobile-sidebar-mintlify.hidden {
        display: none;
    }
    
    .sidebar-mintlify-content {
        height: 100vh;
    }
    
    .sidebar-header {
        padding: 0.75rem;
    }
    
    .sidebar-scrollable {
        padding: 0 0.75rem;
    }
    
    .sidebar-get-started {
        padding: 0.75rem;
    }
}

/* Sidebar border for list layouts */
.sidebar.sidebar-list {
    border-right: 1px solid var(--gray-200) !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Responsive utilities */
@media (min-width: 1024px) {
    .sidebar {
        display: flex;
    }
    
    .content-main {
        padding-left: 16rem;
    }
}

@media (max-width: 640px) {
    .app-card {
        padding: var(--space-6);
    }
    
    .feature-icon {
        width: 3rem;
        height: 3rem;
    }
}

/* ==========================================================================
   HERO SECTIONS - Mintlify inspired
   ========================================================================== */

.hero-gradient {
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--accent-50) 50%, #f8fafc 100%);
    position: relative;
    overflow: visible; /* Allow dropdown to be visible */
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, var(--primary-100) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, var(--accent-100) 0%, transparent 50%);
    opacity: 0.3;
    pointer-events: none; /* Ne utiče na interakcije */
    z-index: -1; /* Iza svih elemenata */
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--app-card-title-color);
    margin-bottom: var(--space-6);
    line-height: 1.1;
    letter-spacing: -0.025em;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: 1.375rem;
    color: var(--app-card-description-color);
    margin-bottom: var(--space-8);
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Logo styles */
.logo-img {
    opacity: 1 !important;
    filter: none !important;
    background: none !important;
    position: relative;
    z-index: 10; /* Ispred hero overlay */
}

/* Header elements - ispred hero overlay */
header {
    position: relative;
    z-index: 10;
}

header * {
    position: relative;
    z-index: 10;
}

/* ==========================================================================
   FEATURE SECTIONS - Mintlify inspired
   ========================================================================== */

.feature-icon {
    width: 5rem;
    height: 5rem;
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-6);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-icon:hover::before {
    opacity: 1;
}

.feature-icon-blue {
    background: linear-gradient(135deg, var(--primary-100), var(--primary-200));
    box-shadow: 0 4px 14px 0 rgba(14, 165, 233, 0.2);
}

.feature-icon-green {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    box-shadow: 0 4px 14px 0 rgba(34, 197, 94, 0.2);
}

.feature-icon-purple {
    background: linear-gradient(135deg, var(--accent-100), var(--accent-200));
    box-shadow: 0 4px 14px 0 rgba(217, 70, 239, 0.2);
}

/* Feature icons - now using variables */
.feature-icon-blue {
    background: var(--feature-icon-blue-bg);
    box-shadow: var(--feature-icon-blue-shadow);
}

.feature-icon-green {
    background: var(--feature-icon-green-bg);
    box-shadow: var(--feature-icon-green-shadow);
}

.feature-icon-purple {
    background: var(--feature-icon-purple-bg);
    box-shadow: var(--feature-icon-purple-shadow);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

.features-grid > div {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    text-align: left;
    padding: var(--space-4);
    background: var(--white);
    border-radius: 1rem;
    border: 1px solid var(--app-card-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.features-grid > div:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-200);
}

/* Features Grid - now using variables */
.features-grid > div {
    background: var(--feature-grid-item-bg);
    border: 1px solid var(--feature-grid-item-border);
}

.features-grid > div:hover {
    box-shadow: var(--feature-grid-item-hover-shadow);
    border-color: var(--primary-200);
}

.features-grid .feature-icon {
    width: 3rem;
    height: 3rem;
    margin: 0;
    flex-shrink: 0;
}

.features-grid h3 {
    margin: 0 0 var(--space-2) 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--feature-grid-title-color);
}

.features-grid p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--feature-grid-text-color);
}

/* RTL adjustments for features */
[dir="rtl"] .features-grid > div {
    text-align: right;
}

[dir="rtl"] .feature-icon {
    margin-left: 1rem;
    margin-right: 0;
}

/* ==========================================================================
   CTA SECTIONS - Mintlify inspired
   ========================================================================== */

.cta-section {
    padding: var(--space-20) 0;
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 50%, var(--accent-600) 100%);
    position: relative;
    overflow: hidden;
    margin-top: var(--space-16);
    margin-bottom: 0;
}

/* CTA section - now using variables */
.cta-section {
    background: var(--cta-bg);
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--cta-title-color);
    margin-bottom: var(--space-6);
    letter-spacing: -0.025em;
    position: relative;
    z-index: 1;
    text-align: center;
}

.cta-subtitle {
    font-size: 1.375rem;
    color: var(--cta-subtitle-color);
    margin-bottom: var(--space-10);
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* RTL adjustments for CTA */
[dir="rtl"] .cta-section {
    text-align: center;
}

/* ==========================================================================
   FOOTER - Modern design
   ========================================================================== */

.footer-modern {
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--accent-50) 50%, var(--gray-50) 100%);
    border-top: 1px solid var(--gray-200);
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

/* Footer - now using variables */
.footer-modern {
    background: var(--footer-bg);
    border-top: 1px solid var(--footer-border);
    min-height: 40px;
    display: flex;
    align-items: center;
}

.footer-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.footer-modern .container {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.footer-copyright {
    flex-shrink: 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem;
    flex-shrink: 0;
}

.footer-link {
    color: var(--footer-link-color);
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.footer-link:hover {
    color: var(--footer-link-hover-color);
    text-decoration: none !important;
    transform: translateY(-1px);
}

.footer-link:focus {
    outline: none;
    color: var(--footer-link-focus-color);
    text-decoration: none !important;
}

/* Reset margin for footer paragraphs */
.footer-modern p {
    margin: 0 !important;
}

/* ==========================================================================
   SEARCH STYLES - Mintlify inspired
   ========================================================================== */

.search-input {
    display: block;
    width: 100%;
    padding-left: 2.75rem;
    padding-right: var(--space-4);
    padding-top: var(--space-3);
    padding-bottom: var(--space-3);
    border: 2px solid var(--gray-200);
    border-radius: 1rem;
    font-size: 0.875rem;
    background: var(--app-card-bg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-400);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1), 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.search-input::placeholder {
    color: var(--gray-400);
    font-weight: 500;
}

.search-input-lg {
    font-size: 1.125rem;
    padding: var(--space-5);
    padding-left: 3.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 2px solid var(--gray-200);
}

.search-input-lg:focus {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04), 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.search-results {
    position: absolute;
    z-index: 50;
    width: 100%;
    margin-top: var(--space-1);
    background: var(--app-card-bg);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 24rem;
    overflow-y: auto;
}

.search-result-item {
    padding: var(--space-3) var(--space-4);
    transition: var(--transition);
    cursor: pointer;
    border-bottom: 1px solid var(--gray-200);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: var(--gray-50);
}

/* RTL Search input adjustments */
[dir="rtl"] .search-input {
    text-align: right;
}

[dir="rtl"] .search-input::placeholder {
    text-align: right;
}

/* ==========================================================================
   TOC STYLES
   ========================================================================== */

#toc {
    position: sticky;
    top: 6rem;
    background: var(--toc-bg);
    padding: 1rem;
}

#toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#toc li {
    margin: 0.5rem 0;
}

#toc a {
    color: var(--toc-link-color);
    text-decoration: none;
    display: block;
    padding: 0.25rem 0;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 400;
    transition: color 0.2s ease;
}

#toc a:hover { color: var(--toc-link-hover-color); }

#toc a.active {
    color: var(--toc-link-active-color);
    font-weight: 400;
}

/* Override default TOC styles inside On This Page container */
.toc-on-this-page #toc a { border-left-color: transparent; }
.toc-on-this-page #toc a.active { border-left-color: transparent; font-weight: 400; }

/* Main content - now using variables */
main {
    background: var(--main-bg);
    padding: 2rem;
    margin: 1rem;
}

/* Responsive design for TOC */
@media (max-width: 1024px) {
    .w-64 {
        display: none;
    }
    
    .ml-72 {
        margin-left: 0;
    }
    
    main {
        margin: 0.5rem;
        padding: 1rem;
    }
}

/* TOC Popover (GitBook-like) */
.toc-popover {
    position: fixed; /* stays in place on scroll */
    top: 88px; /* below header */
    right: 24px; /* LTR: align to right edge */
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0;
    z-index: 1000;
}

.toc-popover-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--theme-toggle-bg);
    border: 1px solid var(--theme-toggle-border);
    border-radius: 8px;
    color: var(--theme-toggle-color);
    font-weight: 500;
    font-size: 14px;
    line-height: 1.25;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    height: 36px !important;
    min-width: 36px;
    cursor: pointer;
    box-sizing: border-box;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    outline: none !important;
}

.toc-popover-button:hover {
    background: var(--theme-toggle-hover-bg);
    border-color: var(--theme-toggle-hover-border);
    color: var(--theme-toggle-hover-color);
    transform: translateY(-1px);
}

.toc-popover-button:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.5) !important;
    outline-offset: 2px !important;
}

.toc-popover-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    max-height: 60vh;
    overflow: auto;
    background: var(--language-dropdown-menu-bg);
    border: 1px solid var(--language-dropdown-menu-border);
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
    backdrop-filter: blur(8px);
}

.toc-popover-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Reset TOC styles inside popover */
.toc-popover-menu #toc {
    position: static;
    background: transparent;
    padding: 8px;
}

.toc-popover-menu #toc a {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 8px;
    border-left: none;
    border-radius: 6px;
    font-size: 14px;
    color: var(--language-dropdown-item-color);
    line-height: 1.3;
}
.toc-link .toc-method-badge {
    display: inline-flex;
    align-items: center;
    height: 18px;
    margin-bottom: 0;
    margin-top: 2px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #fff;
    flex-shrink: 0;
}

.toc-link .toc-title {
    display: inline;
    white-space: normal;
    overflow-wrap: anywhere;
}

.toc-method-badge.method-get { background: #16a34a; }
.toc-method-badge.method-post { background: #2563eb; }
.toc-method-badge.method-put { background: #7c3aed; }
.toc-method-badge.method-patch { background: #9333ea; }
.toc-method-badge.method-delete { background: #dc2626; }
.toc-method-badge.method-head { background: #0ea5e9; }
.toc-method-badge.method-options { background: #64748b; }
.toc-list, .toc-sublist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-sublist {
    padding-left: 12px;
}

.toc-item.level-2 .toc-link { font-weight: 400; }
.toc-item.level-3 .toc-link { font-weight: 400; }
.toc-item.level-4 .toc-link { font-weight: 400; }

.toc-icon {
    width: 16px;
    height: 16px;
}

.toc-popover-menu #toc a:hover {
    background: var(--language-dropdown-item-hover-bg);
    color: var(--language-dropdown-item-hover-color);
}

.toc-popover-menu #toc a.active {
    background: var(--primary-50);
    color: var(--primary-700);
    font-weight: 600;
}

.toc-popover.open .dropdown-arrow {
    transform: rotate(180deg);
}

@media (max-width: 640px) {
    .toc-popover { display: none; }
}

/* RTL support */
[dir="rtl"] .toc-popover {
    justify-content: flex-start; /* align left for RTL */
    right: auto;
    left: 24px;
}

[dir="rtl"] .toc-popover-menu {
    right: auto;
    left: 0;
}

/* On This Page (Mintlify-like) */
.toc-on-this-page {
    font-family: inherit;
}
.toc-otp-header {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gray-500);
    margin-bottom: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.toc-otp-icon { display: inline-flex; align-items: center; color: var(--gray-500); }
.toc-otp-body {
    position: relative;
    padding-left: 16px; /* space for rail */
}
.toc-on-this-page .toc-list { list-style: none; margin: 0; padding: 0; }
.toc-on-this-page .toc-sublist { list-style: none; margin: 0; padding-left: 12px; }

/* Vertical rail + moving indicator */
.toc-rail {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 2px;
    width: 2px;
    background: var(--gray-200);
}
.toc-rail-indicator {
    position: absolute;
    left: -3px; /* center the 8px dot over 2px rail */
    width: 8px;
    height: 8px;
    background: var(--primary-600);
    border-radius: 9999px;
    transition: transform 0.15s ease;
}

/* TOC links: unified sizing, indentation by level, no size change on active */
.toc-on-this-page #toc { font-size: 14px; line-height: 1.35; }
.toc-on-this-page #toc a.toc-link {
    display: block;
    padding: 4px 0;
    color: var(--app-card-description-color);
    font-size: inherit;
    line-height: inherit;
    text-decoration: none;
    border-left: none;
    border-radius: 0;
    font-weight: 400;
}
.toc-on-this-page .toc-item.level-1 > .toc-link { margin-inline-start: 0 !important; padding-left: 0 !important; }
.toc-on-this-page .toc-item.level-2 > .toc-link { margin-inline-start: 8px !important; padding-left: 0 !important; }
.toc-on-this-page .toc-item.level-3 > .toc-link { margin-inline-start: 16px !important; padding-left: 0 !important; }
.toc-on-this-page .toc-item.level-4 > .toc-link { margin-inline-start: 24px !important; padding-left: 0 !important; }
.toc-on-this-page .toc-item.level-5 > .toc-link { margin-inline-start: 32px !important; padding-left: 0 !important; }
.toc-on-this-page .toc-item.level-6 > .toc-link { margin-inline-start: 40px !important; padding-left: 0 !important; }

.toc-on-this-page #toc a.toc-link:hover { color: var(--app-card-title-color); }
.toc-on-this-page #toc a.toc-link.active { color: var(--primary-700); font-weight: 400; }

/* RTL support for On This Page */
:dir(rtl) .toc-otp-body { padding-left: 0; padding-right: 16px; }
:dir(rtl) .toc-rail { left: auto; right: 2px; }
:dir(rtl) .toc-rail-indicator { left: auto; right: -3px; }
:dir(rtl) .toc-on-this-page .toc-item.level-1 > .toc-link { margin-inline-end: 0 !important; padding-right: 0 !important; }
:dir(rtl) .toc-on-this-page .toc-item.level-2 > .toc-link { margin-inline-end: 8px !important; padding-right: 0 !important; }
:dir(rtl) .toc-on-this-page .toc-item.level-3 > .toc-link { margin-inline-end: 16px !important; padding-right: 0 !important; }
:dir(rtl) .toc-on-this-page .toc-item.level-4 > .toc-link { margin-inline-end: 24px !important; padding-right: 0 !important; }
:dir(rtl) .toc-on-this-page .toc-item.level-5 > .toc-link { margin-inline-end: 32px !important; padding-right: 0 !important; }
:dir(rtl) .toc-on-this-page .toc-item.level-6 > .toc-link { margin-inline-end: 40px !important; padding-right: 0 !important; }

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .btn, .card, .alert, .badge {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
    
    .sidebar, .sidebar-mintlify, .modal-overlay {
        display: none;
    }
    
    .content-main {
        padding-left: 0;
    }
}

/* ==========================================================================
   COLLAPSE COMPONENT
   ========================================================================== */

.collapse-panel {
    background: var(--app-card-bg);
    border: 1px solid var(--app-card-border);
    border-radius: var(--radius-lg);
    margin: var(--space-4) 0;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.collapse-panel:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-200);
}

.collapse-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    cursor: pointer;
    transition: background-color 0.2s ease;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.collapse-header:hover {
    background: var(--gray-100);
}

.collapse-title {
    flex: 1;
}

.collapse-title-link {
    font-family: 'Mazzard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--app-card-title-color);
    text-decoration: none;
    text-transform: capitalize;
    transition: color 0.2s ease;
}

.collapse-title-link:hover {
    color: var(--primary-600);
    text-decoration: none;
}

.collapse-arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.collapse-header[aria-expanded="true"] .collapse-arrow {
    transform: rotate(180deg);
}

.collapse-content {
    display: none;
    padding: 0;
    background: var(--white);
}

.collapse-content.expanded {
    display: block;
}

.collapse-divider {
    width: 100%;
    height: 1px;
    background: var(--gray-200);
    border: none;
    margin: var(--space-3) 0;
    opacity: 0.2;
}

.collapse-body {
    padding: var(--space-4);
    word-break: break-word;
    line-height: 1.6;
    color: var(--app-card-description-color);
}

/* Dark theme support for collapse */
[data-theme="dark"] .collapse-panel {
    background: var(--gray-800);
    border-color: var(--gray-700);
}

[data-theme="dark"] .collapse-header {
    background: var(--gray-700);
    border-bottom-color: var(--gray-600);
}

[data-theme="dark"] .collapse-header:hover {
    background: var(--gray-600);
}

[data-theme="dark"] .collapse-title-link {
    color: var(--gray-100);
}

[data-theme="dark"] .collapse-title-link:hover {
    color: var(--primary-400);
}

[data-theme="dark"] .collapse-content {
    background: var(--gray-800);
}

[data-theme="dark"] .collapse-divider {
    background: var(--gray-600);
}

[data-theme="dark"] .collapse-body {
    color: var(--gray-200);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .collapse-header {
        padding: var(--space-3);
    }

    .collapse-body {
        padding: var(--space-3);
    }

    .collapse-title-link {
        font-size: 14px;
    }
}

/* ==========================================================================
   OPENAPI RESPONSES COMPONENT
   ========================================================================== */

.openapi-section {
    margin: var(--space-6) 0;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    background: var(--white);
    overflow: hidden;
}

.openapi-section-header {
    padding: var(--space-4);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.openapi-section-title {
    margin: 0;
    font-family: 'Mazzard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    text-transform: capitalize;
}

.openapi-responses-list {
    padding: 0;
}

.openapi-response-item {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--gray-200);
}

.openapi-response-item:last-child {
    border-bottom: none;
}

.openapi-response-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.openapi-response-arrow {
    font-size: 16px;
    font-weight: bold;
    color: var(--gray-600);
    margin-right: var(--space-2);
}

.openapi-response-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 24px;
    padding: 0 var(--space-2);
    border-radius: var(--radius-sm);
    font-family: 'Mazzard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.openapi-response-description {
    font-family: 'Mazzard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    flex: 1;
}

.openapi-response-content-type {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 2px 8px;
    border-radius: var(--radius-xs);
    white-space: nowrap;
}

.openapi-response-content {
    display: none;
    margin-top: var(--space-2);
    padding: var(--space-4);
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}

.openapi-response-content.expanded {
    display: block;
}

.openapi-response-example {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: var(--space-3);
    overflow-x: auto;
}

.openapi-response-example pre {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: var(--gray-800);
}

.openapi-response-example code {
    background: none;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

.openapi-response-content-header {
    margin-bottom: var(--space-2);
}


.openapi-response-example {
    display: none;
    margin-top: var(--space-2);
}

.openapi-response-example.expanded {
    display: block;
}

.openapi-response-content pre {
    margin: 0;
    padding: var(--space-3);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    color: var(--gray-800);
    overflow-x: auto;
}

.openapi-response-content code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 13px;
    background: var(--gray-100);
    padding: 1px 4px;
    border-radius: var(--radius-xs);
    color: var(--gray-800);
}

/* Dark theme support for openapi responses */
[data-theme="dark"] .openapi-section {
    background: var(--gray-800);
    border-color: var(--gray-700);
}

[data-theme="dark"] .openapi-section-header {
    background: var(--gray-700);
    border-bottom-color: var(--gray-600);
}

[data-theme="dark"] .openapi-section-title {
    color: var(--gray-100);
}

[data-theme="dark"] .openapi-response-item {
    border-bottom-color: var(--gray-700);
}

[data-theme="dark"] .openapi-response-description {
    color: var(--gray-300);
}

[data-theme="dark"] .openapi-response-content-type {
    background: var(--gray-700);
    color: var(--gray-300);
}

[data-theme="dark"] .openapi-response-arrow {
    color: var(--gray-400);
}


[data-theme="dark"] .openapi-response-content pre {
    background: var(--gray-800);
    border-color: var(--gray-600);
    color: var(--gray-100);
}

[data-theme="dark"] .openapi-response-content code {
    background: var(--gray-700);
    color: var(--gray-100);
}

/* Responsive adjustments for openapi responses */
@media (max-width: 768px) {
    .openapi-response-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }

    .openapi-response-code {
        margin-right: 0;
        margin-bottom: var(--space-1);
    }

    .openapi-section-title {
        font-size: 16px;
    }
}

/* ==========================================================================
   GITBOOK API PATH COMPONENT
   ========================================================================== */

.gitbook-api-path {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    padding: 0;
    background: transparent;
}

.gitbook-method-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: #141414;
    min-width: 50px;
    text-align: center;
    flex-shrink: 0;
}

.gitbook-path-text {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-800);
    line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gitbook-api-path {
        gap: 8px;
    }
    
    .gitbook-path-text {
        font-size: 13px;
    }
    
    .gitbook-method-badge {
        font-size: 11px;
        padding: 3px 6px;
        min-width: 45px;
    }
}

/* ==========================================================================
   GITBOOK-STYLE API REQUEST COMPONENT
   ========================================================================== */

.api-request-container {
    margin: var(--space-6) 0;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    background: var(--white);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.api-request-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 400px;
}

.api-request-schema {
    border-right: 1px solid var(--gray-200);
    background: var(--gray-50);
    padding: var(--space-6);
    overflow-y: auto;
}

.api-request-schema-header {
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--gray-200);
}

.api-request-schema-title {
    margin: 0;
    font-family: 'Mazzard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    text-transform: capitalize;
}

.api-request-schema-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-700);
}

.api-request-preview {
    padding: var(--space-6);
    background: var(--white);
}

.api-request-preview-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--gray-200);
}

.api-request-method-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 24px;
    padding: 0 var(--space-2);
    border-radius: var(--radius-sm);
    font-family: 'Mazzard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.api-request-url {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-800);
    line-height: 1.4;
    flex: 1;
}

.api-request-preview-content {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.api-request-code-block {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.api-request-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
}

.api-request-code-title {
    font-family: 'Mazzard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.api-request-copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--gray-500);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.api-request-copy-btn:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

.api-request-code-content {
    padding: var(--space-4);
}

.api-request-code-content pre {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: var(--gray-800);
    overflow-x: auto;
}

.api-request-code-content code {
    background: none;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

/* Parameter Schema Styles */
.parameter-schema-item {
    margin-bottom: var(--space-4);
    padding: var(--space-4);
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.parameter-schema-item:hover {
    border-color: var(--primary-200);
    box-shadow: var(--shadow-sm);
}

.parameter-schema-header {
    margin-bottom: var(--space-2);
}

.parameter-schema-name {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.parameter-name {
    font-family: 'Mazzard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--gray-900);
}

.parameter-type {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 12px;
    font-weight: 500;
    color: #F30170;
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: var(--radius-xs);
}

.parameter-required {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: var(--radius-xs);
}

.parameter-schema-content {
    margin-top: var(--space-2);
}

.parameter-description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-700);
    margin-bottom: var(--space-2);
}

.parameter-example {
    font-size: 13px;
    color: var(--gray-600);
}

.parameter-example code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 12px;
    background: var(--gray-100);
    padding: 2px 4px;
    border-radius: var(--radius-xs);
    color: var(--gray-800);
}

/* Request Body Styles */
.request-body-container {
    margin: var(--space-4) 0;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: var(--white);
    overflow: hidden;
}

.request-body-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.request-body-title {
    margin: 0;
    font-family: 'Mazzard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
}

.request-body-content-type {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--gray-100);
    padding: 2px 8px;
    border-radius: var(--radius-xs);
}

.request-body-content {
    padding: var(--space-4);
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-700);
}

/* Response Examples Styles */
.response-examples-container {
    margin: var(--space-6) 0;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    background: var(--white);
    overflow: hidden;
}

.response-examples-header {
    padding: var(--space-4);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.response-examples-title {
    margin: 0;
    font-family: 'Mazzard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    text-transform: capitalize;
}

.response-examples-content {
    padding: 0;
}

.response-tab-item {
    border-bottom: 1px solid var(--gray-200);
}

.response-tab-item:last-child {
    border-bottom: none;
}

.response-tab-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.response-tab-header:hover {
    background: var(--gray-50);
}

.response-tab-arrow {
    font-size: 16px;
    font-weight: bold;
    color: var(--gray-600);
    transition: transform 0.2s ease;
}

.response-tab-header:hover .response-tab-arrow {
    transform: rotate(90deg);
}

.response-tab-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 24px;
    padding: 0 var(--space-2);
    border-radius: var(--radius-sm);
    font-family: 'Mazzard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.response-tab-description {
    font-family: 'Mazzard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    flex: 1;
}

.response-tab-content-type {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 2px 8px;
    border-radius: var(--radius-xs);
    white-space: nowrap;
}

.response-tab-content {
    display: none;
    padding: var(--space-4);
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

.response-tab-content.expanded {
    display: block;
}

.response-tab-example {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: var(--space-3);
    overflow-x: auto;
}

.response-tab-example pre {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: var(--gray-800);
}

.response-tab-example code {
    background: none;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .api-request-layout {
        grid-template-columns: 1fr;
    }
    
    .api-request-schema {
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
    }
}

@media (max-width: 768px) {
    .api-request-schema,
    .api-request-preview {
        padding: var(--space-4);
    }
    
    .api-request-schema-title,
    .response-examples-title {
        font-size: 16px;
    }
    
    .parameter-schema-item {
        padding: var(--space-3);
    }
    
    .parameter-name {
        font-size: 14px;
    }
    
    .response-tab-header {
        flex-wrap: wrap;
        gap: var(--space-2);
    }
    
    .response-tab-description {
        font-size: 13px;
    }
}

/* Dark theme support */
[data-theme="dark"] .api-request-container {
    background: var(--gray-800);
    border-color: var(--gray-700);
}

[data-theme="dark"] .api-request-schema {
    background: var(--gray-700);
    border-right-color: var(--gray-600);
}

[data-theme="dark"] .api-request-schema-title,
[data-theme="dark"] .response-examples-title {
    color: var(--gray-100);
}

[data-theme="dark"] .api-request-schema-content,
[data-theme="dark"] .request-body-content {
    color: var(--gray-200);
}

[data-theme="dark"] .parameter-schema-item {
    background: var(--gray-700);
    border-color: var(--gray-600);
}

[data-theme="dark"] .parameter-name {
    color: var(--gray-100);
}

[data-theme="dark"] .parameter-description {
    color: var(--gray-300);
}

[data-theme="dark"] .request-body-container {
    background: var(--gray-800);
    border-color: var(--gray-700);
}

[data-theme="dark"] .request-body-header {
    background: var(--gray-700);
    border-bottom-color: var(--gray-600);
}

[data-theme="dark"] .response-examples-container {
    background: var(--gray-800);
    border-color: var(--gray-700);
}

[data-theme="dark"] .response-examples-header {
    background: var(--gray-700);
    border-bottom-color: var(--gray-600);
}

[data-theme="dark"] .response-tab-header:hover {
    background: var(--gray-600);
}

[data-theme="dark"] .response-tab-content {
    background: var(--gray-700);
    border-top-color: var(--gray-600);
}

[data-theme="dark"] .response-tab-example {
    background: var(--gray-800);
    border-color: var(--gray-600);
}

[data-theme="dark"] .response-tab-example pre {
    color: var(--gray-100);
}

/* Query Parameters Styles */
.query-parameters-container {
    margin: var(--space-4) 0;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: var(--white);
    overflow: hidden;
}

.query-parameters-header {
    padding: var(--space-3) var(--space-4);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.query-parameters-title {
    margin: 0;
    font-family: 'Mazzard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
}

.query-parameters-content {
    padding: var(--space-4);
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-700);
}

/* Dark theme support for query parameters */
[data-theme="dark"] .query-parameters-container {
    background: var(--gray-800);
    border-color: var(--gray-700);
}

[data-theme="dark"] .query-parameters-header {
    background: var(--gray-700);
    border-bottom-color: var(--gray-600);
}

[data-theme="dark"] .query-parameters-title {
    color: var(--gray-100);
}

[data-theme="dark"] .query-parameters-content {
    color: var(--gray-200);
}

/* ==========================================================================
   SCHEMA TREE
   ========================================================================== */
.schema-tree-container {
    border: none; /* remove outer border */
    border-radius: var(--radius-lg);
    background: var(--gray-50);
    overflow: hidden;
}

/* Two-column layout with sticky preview - GitBook style */
.openapi-columns {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 0;
    align-items: flex-start;
    margin: 0 0 32px 0;
}

/* Remove gap between columns */
.openapi-column-schema {
    padding-right: 0;
}

.openapi-column-preview {
    padding-left: 0;
}

/* API Playground sidebar (global right-side examples) */
.api-playground-sidebar {
    width: 32rem; /* Wider like OneSignal (512px) */
    padding: 0;
    background: transparent;
    margin-left: 0;
    max-height: calc(100vh - 56px); /* Full viewport minus header */
    overflow: hidden; /* Prevent playground from exceeding viewport */
}

/* Make playground full-width below content on smaller screens */
@media (max-width: 1400px) {
    .api-playground-sidebar { width: 28rem; }
}
@media (max-width: 1024px) {
    .api-playground-sidebar { display: none; }
}

/* Ensure playground content fills available space */
#api-playground {
    height: 100%;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 56px); /* Full viewport minus header */
    overflow: hidden;
}

#api-playground .openapi-preview-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    max-height: 100%;
    overflow: hidden;
}

/* Global playground specific styles - Clean minimal */
#api-playground .openapi-preview-card {
    border: 1px solid #e5e7eb;
    background: white;
    box-shadow: none;
    border-radius: 8px;
    margin-bottom: 16px;
}

#api-playground .openapi-preview-header {
    background: #f8f9fa !important;
    border: none !important;
    border-radius: 8px 8px 0 0 !important;
    padding: 8px 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 12px !important;
    min-height: 40px !important;
}

#api-playground .openapi-preview-body {
    background: white !important;
    border: none;
    border-radius: 0 0 8px 8px;
    padding: 0;
    margin: 0;
    min-height: auto;
    overflow: auto !important;
    scrollbar-width: thin !important;
    scrollbar-color: #cbd5e0 #f7fafc !important;
}

#api-playground .openapi-preview-body::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#api-playground .openapi-preview-body::-webkit-scrollbar-track {
    background: #f7fafc;
}

#api-playground .openapi-preview-body::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

#api-playground .openapi-preview-body::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Force scrollbars to always be visible */
#api-playground .openapi-preview-body {
    scrollbar-width: thin !important;
    scrollbar-color: #cbd5e0 #f7fafc !important;
}

#api-playground .openapi-preview-body::-webkit-scrollbar {
    display: block !important;
    width: 8px !important;
    height: 8px !important;
}

#api-playground .openapi-response-card {
    border: 1px solid #e5e7eb;
    background: white;
    box-shadow: none;
    border-radius: 8px;
    margin-top: 0;
    margin-bottom: 0;
}

#api-playground .openapi-response-header {
    background: #f8f9fa !important;
    border: none !important;
    border-radius: 8px 8px 0 0 !important;
    padding: 8px 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 12px !important;
    min-height: 40px !important;
}

#api-playground .openapi-response-body {
    background: white !important;
    border: none;
    border-radius: 0 0 8px 8px;
    padding: 0;
    margin: 0;
    min-height: auto;
    overflow: auto !important;
    scrollbar-width: thin !important;
    scrollbar-color: #cbd5e0 #f7fafc !important;
}

#api-playground .openapi-response-body::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#api-playground .openapi-response-body::-webkit-scrollbar-track {
    background: #f7fafc;
}

#api-playground .openapi-response-body::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

#api-playground .openapi-response-body::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Force scrollbars to always be visible */
#api-playground .openapi-response-body {
    scrollbar-width: thin !important;
    scrollbar-color: #cbd5e0 #f7fafc !important;
}

#api-playground .openapi-response-body::-webkit-scrollbar {
    display: block !important;
    width: 8px !important;
    height: 8px !important;
}

#api-playground .code-examples-dropdown {
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 14px;
    padding: 6px 8px 6px 12px;
    min-width: 80px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 32px;
}

#api-playground .code-examples-dropdown:hover {
    color: #374151;
}

#api-playground .code-examples-dropdown:focus {
    outline: none;
    color: #374151;
}

#api-playground .openapi-copy-button {
    background: transparent;
    border: none;
    color: #6b7280;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 6px;
}

#api-playground .openapi-copy-button:hover {
    background: #e9ecef;
    color: #374151;
}

#api-playground .openapi-preview-body pre {
    background: white !important;
    border: none !important;
    border-radius: 0 0 8px 8px;
    margin: 0;
    padding: 16px;
}

#api-playground .openapi-response-body pre {
    background: white !important;
    border: none !important;
    border-radius: 0 0 8px 8px;
    margin: 0;
    padding: 16px;
}

/* OneSignal-style syntax highlighting for playground */
#api-playground pre {
    background: white !important;
    border: none !important;
    margin: 0;
    padding: 12px 16px;
    border-radius: 0;
}

#api-playground pre code {
    background: white !important;
    color: #333 !important;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
}

/* Ensure Prism.js works with our playground */
#api-playground pre[class*="language-"] {
    background: white !important;
    border: none !important;
    margin: 0;
    padding: 12px 16px;
    border-radius: 0;
    box-shadow: none !important;
}

#api-playground pre[class*="language-"] code {
    background: white !important;
    color: #333 !important;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
}

/* Override prism-simple.css for playground */
#api-playground pre[class*="language-"]::before {
    display: none !important;
}

#api-playground pre[class*="language-"] {
    padding-top: 12px !important;
}

/* Prism.js syntax highlighting overrides for playground - OneSignal style */
#api-playground .token.comment,
#api-playground .token.prolog,
#api-playground .token.doctype,
#api-playground .token.cdata {
    color: #6a737d;
}

#api-playground .token.punctuation {
    color: #24292e;
}

#api-playground .token.property,
#api-playground .token.tag,
#api-playground .token.boolean,
#api-playground .token.number,
#api-playground .token.constant,
#api-playground .token.symbol,
#api-playground .token.deleted {
    color: #005cc5;
}

#api-playground .token.selector,
#api-playground .token.attr-name,
#api-playground .token.string,
#api-playground .token.char,
#api-playground .token.builtin,
#api-playground .token.inserted {
    color: #032f62;
}

#api-playground .token.operator,
#api-playground .token.entity,
#api-playground .token.url,
#api-playground .language-css .token.string,
#api-playground .style .token.string {
    color: #d73a49;
}

#api-playground .token.atrule,
#api-playground .token.attr-value,
#api-playground .token.keyword {
    color: #d73a49;
}

#api-playground .token.function,
#api-playground .token.class-name {
    color: #6f42c1;
}

#api-playground .token.regex,
#api-playground .token.important,
#api-playground .token.variable {
    color: #e36209;
}

/* HTTP method highlighting */
#api-playground .token.method {
    color: #d73a49;
    font-weight: 600;
}

/* JSON key highlighting */
#api-playground .token.json-key {
    color: #005cc5;
}

/* URL highlighting */
#api-playground .token.url {
    color: #0366d6;
    text-decoration: underline;
}

/* Remove gaps between main content and playground */
.flex-1.flex main {
    margin-right: 0;
    padding-right: 0;
}

.flex-1.flex .api-playground-sidebar {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
}

/* Ensure no gaps in the grid layout */
.openapi-columns {
    gap: 0 !important;
}

.openapi-column-schema {
    margin-right: 0;
    padding-right: 0;
}

.openapi-column-preview {
    margin-left: 0;
    padding-left: 0;
}

.openapi-column-schema {
    min-width: 0;
}

/* Copy button styles */
.openapi-copy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: var(--gray-100);
    border: none;
    border-radius: 6px;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
}

.openapi-copy-button:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

.openapi-copy-button:active {
    background: var(--gray-300);
    transform: scale(0.95);
}

.openapi-response-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Response header styling */
.openapi-response-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-top: none;
    border-radius: 8px 8px 0 0;
}

.openapi-response-title {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 14px;
}

.openapi-response-body {
    background: white !important;
    border: none;
    border-radius: 0 0 8px 8px;
    overflow: auto;
    min-height: 120px;
}

/* Language switcher styling */
.code-examples-dropdown {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.code-examples-dropdown:hover {
    background: var(--gray-200);
}

.code-examples-dropdown:focus {
    outline: none;
    background: var(--gray-200);
}

.openapi-column-preview {
    position: sticky;
    top: 56px;
    align-self: start;
    max-height: calc(100vh - 56px);
    overflow: visible; /* inner card handles scrolling */
}

.openapi-column-preview.is-unstuck {
    position: static;
}

.openapi-preview-card {
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.openapi-preview-card .code-select {
    border: none;
    background: transparent;
    border-radius: 0;
}

.openapi-preview-card .code-select-header {
    background: #2a2a2a;
    border-bottom: 1px solid #3a3a3a;
    padding: 12px 16px;
}

.openapi-preview-card .code-select-label {
    color: #a1a1aa;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.openapi-preview-card .code-select-dropdown {
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    color: #f4f4f5;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px 16px;
    padding-right: 32px;
}

.openapi-preview-card .code-select-body {
    background: #1a1a1a;
}

.openapi-preview-card .code-select-panel {
    padding: 0;
}

.openapi-preview-card pre {
    background: #1a1a1a !important;
    color: #f4f4f5 !important;
    border-radius: 0;
    padding: 16px;
    margin: 0;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.openapi-preview-card .code-select-panel:not(.active) {
    display: none !important;
}

.openapi-preview-card .code-select-panel.active {
    display: block !important;
}

.openapi-preview-card code {
    background: transparent !important;
    color: inherit !important;
    padding: 0 !important;
    font-family: inherit !important;
}

/* Syntax highlighting colors (GitBook-like) */
.openapi-preview-card .language-http .token.request-line {
    color: #22c55e;
}

.openapi-preview-card .language-http .token.header-name {
    color: #3b82f6;
}

.openapi-preview-card .language-bash .token.function {
    color: #22c55e;
}

.openapi-preview-card .language-javascript .token.keyword {
    color: #a78bfa;
}

.openapi-preview-card .language-javascript .token.string {
    color: #fbbf24;
}

/* GitBook-style preview header */
.openapi-preview-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 12px 16px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-bottom: none; /* unify with body below */
    border-radius: 8px 8px 0 0;
}

.openapi-method-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 24px;
    padding: 0 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.openapi-url-text {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-800);
    line-height: 1.4;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Code examples container */
/* OpenAPI Preview Header Layout */
.openapi-preview-header-alt {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #374151;
}

.openapi-method-url {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.openapi-examples-select {
    min-width: 120px;
}

.code-examples-dropdown {
    padding: 0.375rem 0.75rem;
    border: 1px solid #4b5563;
    border-radius: 6px;
    color: #f9fafb;
    font-size: 0.875rem;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: #374151 url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23f9fafb' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") no-repeat right 0.5rem center / 1.25em 1.25em;
    padding-right: 2.25rem;
}

.code-examples-dropdown:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
}

/* OpenAPI Preview Body */
.openapi-preview-body {
    padding: 0;
    background: white !important;
    border: none;
    border-radius: 0 0 8px 8px; /* rounded bottom corners */
    overflow: auto;
    min-height: 160px;
    margin-bottom: 16px;
}

.openapi-preview-body pre {
    margin: 0;
    padding: 1rem;
    background: transparent;
    color: #f9fafb;
    border-radius: 0;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.openapi-preview-body code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    color: inherit;
    background: transparent;
}

/* Responses card */
.openapi-response-card {
    margin-top: 1rem;
    background: #0f172a; /* slate-900 */
    border: 1px solid #334155; /* slate-700 */
    border-radius: 8px;
    overflow: hidden;
    min-height: 120px; /* ensure header + bit of body visible */
    display: flex;
    flex-direction: column;
}

.openapi-response-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #334155;
}

.openapi-response-title {
    color: #e5e7eb;
    font-weight: 600;
    font-size: 0.875rem;
}

.openapi-response-select .code-examples-dropdown {
    border-color: #475569; /* slate-600 */
    background: #1f2937 url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23e5e7eb' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") no-repeat right 0.5rem center / 1.25em 1.25em;
    padding-right: 2.25rem;
}

.openapi-response-body {
    background: #0f172a;
    overflow: auto;
}

.openapi-response-body pre {
    margin: 0;
    padding: 1rem;
    color: #e5e7eb;
    background: transparent;
}

.code-example-panel pre {
    background: #1a1a1a !important;
    color: #f4f4f5 !important;
    border-radius: 0;
    padding: 16px;
    margin: 0;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.code-example-panel code {
    background: transparent !important;
    color: inherit !important;
    padding: 0 !important;
    font-family: inherit !important;
}

/* Dark theme adjustments */
[data-theme="dark"] .openapi-preview-card {
    background: transparent;
    box-shadow: none;
}
[data-theme="dark"] .openapi-preview-header {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}
[data-theme="dark"] .openapi-url-text { color: #f4f4f5; }
[data-theme="dark"] .openapi-preview-body {
    background: white !important;
    border: none;
    border-radius: 0 0 8px 8px;
}

[data-theme="dark"] .openapi-response-header {
    background: #2a2a2a;
    border-color: #3a3a3a;
}

[data-theme="dark"] .openapi-response-title {
    color: #e5e5e5;
}

[data-theme="dark"] .openapi-response-body {
    background: white !important;
    border: none;
}

[data-theme="dark"] .code-examples-dropdown {
    background: #2a2a2a;
    color: #e5e5e5;
}

[data-theme="dark"] .code-examples-dropdown:hover {
    background: #3a3a3a;
}

[data-theme="dark"] .openapi-copy-button {
    background: #2a2a2a;
    color: #e5e5e5;
}

[data-theme="dark"] .openapi-copy-button:hover {
    background: #3a3a3a;
}

/* Dark theme for global playground - Clean minimal */
[data-theme="dark"] #api-playground .openapi-preview-card {
    background: white;
    border: 1px solid #e5e7eb;
    box-shadow: none;
    border-radius: 8px;
    margin-bottom: 16px;
}

[data-theme="dark"] #api-playground .openapi-preview-header {
    background: #2d3748;
    padding: 8px 16px;
    min-height: 40px;
}

[data-theme="dark"] #api-playground .openapi-preview-body {
    background: #1a202c;
    scrollbar-color: #4a5568 #2d3748;
}

[data-theme="dark"] #api-playground .openapi-preview-body::-webkit-scrollbar-track {
    background: #2d3748;
}

[data-theme="dark"] #api-playground .openapi-preview-body::-webkit-scrollbar-thumb {
    background: #4a5568;
}

[data-theme="dark"] #api-playground .openapi-preview-body::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

[data-theme="dark"] #api-playground .openapi-response-card {
    background: white;
    border: 1px solid #e5e7eb;
    box-shadow: none;
    border-radius: 8px;
    margin-top: 0;
    margin-bottom: 0;
}

[data-theme="dark"] #api-playground .openapi-response-header {
    background: #2d3748;
    padding: 8px 16px;
    min-height: 40px;
}

[data-theme="dark"] #api-playground .openapi-response-body {
    background: #1a202c;
    scrollbar-color: #4a5568 #2d3748;
}

[data-theme="dark"] #api-playground .openapi-response-body::-webkit-scrollbar-track {
    background: #2d3748;
}

[data-theme="dark"] #api-playground .openapi-response-body::-webkit-scrollbar-thumb {
    background: #4a5568;
}

[data-theme="dark"] #api-playground .openapi-response-body::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

[data-theme="dark"] #api-playground .code-examples-dropdown {
    background: transparent;
    color: #a0aec0;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23a0aec0' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}

[data-theme="dark"] #api-playground .code-examples-dropdown:hover {
    color: #e2e8f0;
}

[data-theme="dark"] #api-playground .code-examples-dropdown:focus {
    color: #e2e8f0;
}

[data-theme="dark"] #api-playground .openapi-copy-button {
    background: transparent;
    color: #a0aec0;
}

[data-theme="dark"] #api-playground .openapi-copy-button:hover {
    background: #4a5568;
    color: #e2e8f0;
}

[data-theme="dark"] #api-playground .openapi-preview-body pre {
    background: white !important;
}

[data-theme="dark"] #api-playground .openapi-response-body pre {
    background: white !important;
}

/* Dark theme - same OneSignal style highlighting */
[data-theme="dark"] #api-playground pre code {
    background: white !important;
    color: #333 !important;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
}

[data-theme="dark"] #api-playground pre {
    background: white !important;
    border: none !important;
    margin: 0;
    padding: 16px;
    border-radius: 0 0 8px 8px;
}

/* Same syntax highlighting colors in dark theme */
[data-theme="dark"] #api-playground .token.comment,
[data-theme="dark"] #api-playground .token.prolog,
[data-theme="dark"] #api-playground .token.doctype,
[data-theme="dark"] #api-playground .token.cdata {
    color: #6a737d;
}

[data-theme="dark"] #api-playground .token.punctuation {
    color: #24292e;
}

[data-theme="dark"] #api-playground .token.property,
[data-theme="dark"] #api-playground .token.tag,
[data-theme="dark"] #api-playground .token.boolean,
[data-theme="dark"] #api-playground .token.number,
[data-theme="dark"] #api-playground .token.constant,
[data-theme="dark"] #api-playground .token.symbol,
[data-theme="dark"] #api-playground .token.deleted {
    color: #005cc5;
}

[data-theme="dark"] #api-playground .token.selector,
[data-theme="dark"] #api-playground .token.attr-name,
[data-theme="dark"] #api-playground .token.string,
[data-theme="dark"] #api-playground .token.char,
[data-theme="dark"] #api-playground .token.builtin,
[data-theme="dark"] #api-playground .token.inserted {
    color: #032f62;
}

[data-theme="dark"] #api-playground .token.operator,
[data-theme="dark"] #api-playground .token.entity,
[data-theme="dark"] #api-playground .token.url,
[data-theme="dark"] #api-playground .language-css .token.string,
[data-theme="dark"] #api-playground .style .token.string {
    color: #d73a49;
}

[data-theme="dark"] #api-playground .token.atrule,
[data-theme="dark"] #api-playground .token.attr-value,
[data-theme="dark"] #api-playground .token.keyword {
    color: #d73a49;
}

[data-theme="dark"] #api-playground .token.function,
[data-theme="dark"] #api-playground .token.class-name {
    color: #6f42c1;
}

[data-theme="dark"] #api-playground .token.regex,
[data-theme="dark"] #api-playground .token.important,
[data-theme="dark"] #api-playground .token.variable {
    color: #e36209;
}

[data-theme="dark"] #api-playground .token.method {
    color: #d73a49;
    font-weight: 600;
}

[data-theme="dark"] #api-playground .token.json-key {
    color: #005cc5;
}

[data-theme="dark"] #api-playground .token.url {
    color: #0366d6;
    text-decoration: underline;
}

/* Hide "Response" text */
#api-playground .openapi-response-title {
    display: none;
}

/* Force scrollbars to always be visible */
#api-playground .openapi-preview-body,
#api-playground .openapi-response-body {
    scrollbar-width: thin !important;
    scrollbar-color: #cbd5e0 #f7fafc !important;
}

#api-playground .openapi-preview-body::-webkit-scrollbar,
#api-playground .openapi-response-body::-webkit-scrollbar {
    display: block !important;
    width: 8px !important;
    height: 8px !important;
}

/* Force consistent header heights across all pages */
#api-playground .openapi-preview-header,
#api-playground .openapi-response-header {
    padding: 8px 16px !important;
    min-height: 40px !important;
    height: 40px !important;
}

/* AMP Icon for sidebar */
.amp-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("/images/amp-icon.svg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 0;
    vertical-align: middle;
    flex-shrink: 0;
    filter: brightness(0) saturate(100%) invert(40%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(0%) contrast(100%);
}

/* Dark theme AMP icon */
html[data-theme="dark"] .amp-icon,
body.dark-theme .amp-icon {
    filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

/* Override any conflicting header styles */
.openapi-preview-header,
.openapi-response-header {
    padding: 8px 16px !important;
    min-height: 40px !important;
}

[data-theme="dark"] .openapi-preview-header-alt {
    background: #1a1a1a;
    border-bottom-color: #2a2a2a;
}
/* Dark theme for request card */
[data-theme="dark"] .openapi-preview-body {
    background: #0f172a; /* slate-900 */
    border-color: #334155; /* slate-700 */
}

[data-theme="dark"] .code-examples-header {
    background: #1a1a1a;
    border-bottom-color: #2a2a2a;
}

[data-theme="dark"] .code-examples-dropdown {
    background: #0a0a0a;
    border-color: #2a2a2a;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23e5e7eb' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

.openapi-column-preview .api-request-code-block,
.openapi-column-preview pre,
.openapi-column-preview code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

/* Remove gap when endpoint heading is directly followed by the preview grid */
h4 + .openapi-columns {
    margin-top: 0;
}

@media (max-width: 1024px) {
    .openapi-columns {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .openapi-column-preview {
        position: static;
        max-height: none;
        overflow: visible;
    }
}

/* Code tabs */
.code-tabs {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--white);
}

/* Code select (dropdown) */
.code-select {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: var(--white);
    overflow: hidden;
}

.code-select-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.code-select-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
}

.code-select-dropdown {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--gray-300);
    background: var(--white);
    color: var(--gray-800);
}

.code-select-body { padding: 0; }
.code-select-panel { display: none; }
.code-select-panel.active { display: block; }

[data-theme="dark"] .code-select { background: var(--gray-800); border-color: var(--gray-700); }
[data-theme="dark"] .code-select-header { background: var(--gray-700); border-bottom-color: var(--gray-600); }
[data-theme="dark"] .code-select-dropdown { background: var(--gray-800); color: var(--gray-100); border-color: var(--gray-600); }

.code-tabs-header {
    display: flex;
    gap: 4px;
    padding: 6px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.code-tab-button {
    padding: 6px 10px;
    font-size: 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--gray-700);
    cursor: pointer;
}

.code-tab-button.active {
    background: var(--white);
    border-color: var(--gray-200);
    color: var(--gray-900);
}

.code-tabs-body {
    padding: 0;
}

.code-tab-panel { display: none; }
.code-tab-panel.active { display: block; }

[data-theme="dark"] .code-tabs { background: var(--gray-800); border-color: var(--gray-700); }
[data-theme="dark"] .code-tabs-header { background: var(--gray-700); border-bottom-color: var(--gray-600); }
[data-theme="dark"] .code-tab-button { color: var(--gray-200); }
[data-theme="dark"] .code-tab-button.active { background: var(--gray-800); border-color: var(--gray-600); color: var(--gray-100); }

.schema-tree-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    background: var(--gray-50);
    border-bottom: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0; /* round top corners */
}

/* Schema composition (oneOf/anyOf/allOf) tabs */
.schema-composition {
    margin-top: 6px;
}
.schema-composition-title {
    font-size: 12px;
    color: var(--gray-600);
    margin: 6px 0 8px;
}
.schema-composition-title .schema-composition-selected {
    margin-left: 6px;
    color: var(--gray-700);
}

.schema-tabs-header {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 0;
}
.schema-tab-button {
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background: var(--gray-50);
    color: var(--gray-700);
    cursor: pointer;
}
.schema-tab-button.active {
    background: var(--white);
    color: var(--gray-900);
    border-color: var(--gray-300);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.schema-tabs-panels {
    margin-top: 8px;
}
.schema-tab-panel { display: none; }
.schema-tab-panel.active { display: block; }

[data-theme="dark"] .schema-composition-title { color: var(--gray-400); }
[data-theme="dark"] .schema-composition-title .schema-composition-selected { color: var(--gray-300); }
[data-theme="dark"] .schema-tab-button {
    background: var(--gray-800);
    color: var(--gray-200);
    border-color: var(--gray-700);
}
[data-theme="dark"] .schema-tab-button.active {
    background: var(--gray-900);
    color: var(--gray-100);
    border-color: var(--gray-600);
}
[data-theme="dark"] .schema-tree-container { background: var(--gray-100); border-color: transparent; }
[data-theme="dark"] .schema-tree-header { background: var(--gray-100); border-bottom: none; }
[data-theme="dark"] .schema-tree-title { color: var(--gray-800); }
[data-theme="dark"] .schema-node { background: var(--gray-100); border-color: var(--gray-200); }
[data-theme="dark"] .schema-key { color: var(--primary-300); }
[data-theme="dark"] .schema-description, 
[data-theme="dark"] .schema-enum { color: var(--gray-700); }
[data-theme="dark"] .schema-type { color: #38bdf8; background: rgba(56,189,248,0.12); }
[data-theme="dark"] .schema-required { color: #fca5a5; background: rgba(252,165,165,0.12); }

.schema-tree-title {
    margin: 0;
    font-family: 'Mazzard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
}

.schema-tree-badge {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-xs);
    color: var(--white);
}

.schema-tree-badge-body { background: #111827; }
.schema-tree-badge-params { background: #2563eb; }
.schema-tree-badge-parameters { background: #2563eb; }
.schema-tree-badge-query { background: #9333ea; }

.schema-tree {
    background: var(--gray-50);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Root node: remove border to avoid double framing */
.schema-tree > .schema-node {
    border: none;
    background: transparent;
}

.schema-node {
    border: 1px solid var(--gray-200); /* restore field border */
    border-radius: var(--radius-md);
    padding: var(--space-3);
    margin-bottom: var(--space-3);
    background: var(--white);
}

.schema-node-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.schema-toggle {
    width: 0;
    height: 0;
    border-left: 6px solid var(--gray-500);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    margin-right: 6px;
    cursor: pointer;
}

.schema-node.collapsed > .schema-children {
    display: none;
}

.schema-node.collapsed > .schema-node-header .schema-toggle {
    transform: rotate(0deg);
}

.schema-node:not(.collapsed) > .schema-node-header .schema-toggle {
    transform: rotate(90deg);
}

.schema-key {
    font-family: 'Mazzard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-700); /* higher contrast vs description */
}

.schema-type {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 12px;
    font-weight: 600;
    color: #0ea5e9;
    background: rgba(14,165,233,0.1);
    padding: 2px 6px;
    border-radius: var(--radius-xs);
}

.schema-required {
    font-size: 12px;
    color: #dc2626;
    background: rgba(220,38,38,0.08);
    padding: 2px 6px;
    border-radius: var(--radius-xs);
}

.schema-description {
    margin-top: var(--space-2);
    font-size: 13px;
    color: var(--gray-700);
}

.schema-enum {
    margin-top: var(--space-2);
    font-size: 13px;
    color: var(--gray-700);
}

.schema-enum code {
    background: var(--gray-100);
    padding: 1px 4px;
    border-radius: var(--radius-xs);
}

.schema-children {
    margin-top: var(--space-3);
    border-left: none; /* remove tall left line */
}

.schema-composition {
    margin-top: var(--space-3);
}

.schema-composition-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    margin-bottom: var(--space-2);
}

[data-theme="dark"] .schema-tree-container { background: var(--gray-100); border-color: transparent; }
[data-theme="dark"] .schema-tree-header { background: var(--gray-100); border-bottom-color: var(--gray-200); }
[data-theme="dark"] .schema-tree-header { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
[data-theme="dark"] .schema-tree-title { color: var(--gray-800); }
[data-theme="dark"] .schema-tree { background: var(--gray-100); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
[data-theme="dark"] .schema-node { background: var(--gray-100); border-color: var(--gray-200); }
[data-theme="dark"] .schema-key { color: var(--primary-300); }
[data-theme="dark"] .schema-description, 
[data-theme="dark"] .schema-enum { color: var(--gray-700); }
[data-theme="dark"] .schema-type { color: #38bdf8; background: rgba(56,189,248,0.12); }
[data-theme="dark"] .schema-required { color: #fca5a5; background: rgba(252,165,165,0.12); }

/* Dark theme adjustments for API preview */
[data-theme="dark"] .api-request-preview { background: var(--gray-100); }
[data-theme="dark"] .api-request-preview-header { border-bottom-color: var(--gray-200); }
[data-theme="dark"] .api-request-url { color: var(--gray-900); }
[data-theme="dark"] .api-request-preview-content { background: var(--gray-100); }
[data-theme="dark"] .api-request-code-block { background: var(--gray-100); border-color: var(--gray-200); }
[data-theme="dark"] .api-request-code-header { background: var(--gray-200); border-bottom-color: var(--gray-300); }
[data-theme="dark"] .api-request-code-title { color: var(--gray-800); }
[data-theme="dark"] .api-request-code-content pre { color: var(--gray-900); }
[data-theme="dark"] .api-request-copy-btn { color: var(--gray-400); }
[data-theme="dark"] .api-request-copy-btn:hover { background: var(--gray-600); color: var(--gray-100); }

/* Notice component */
.notice {
    --notice-rgb: 99, 201, 158; /* default rgb as fallback */
    background: #fff;
    border: 1px solid rgba(var(--notice-rgb), 0.25);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: var(--space-4) 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.notice-header {
    background: rgba(var(--notice-rgb), 0.14);
    border-bottom: 1px solid rgba(var(--notice-rgb), 0.25);
    padding: 8px 12px;
}

.notice-header-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notice-icon {
    width: 16px;
    height: 16px;
    border-radius: 9999px;
    background: rgb(var(--notice-rgb));
    flex: 0 0 auto;
}

.notice-title {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: capitalize;
    color: #0f172a; /* slate-900 */
}

.notice-body {
    background: rgba(var(--notice-rgb), 0.06);
    padding: 12px 12px;
}

.notice-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06); /* subtle divider */
}

.notice-item:last-child { border-bottom: none; }

.notice-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 9999px;
    background: rgba(var(--notice-rgb), 0.18);
    color: #0f172a; /* slate-900 */
    font-weight: 600;
    font-size: 12px;
    line-height: 1;
    flex: 0 0 24px;
}

.notice-text {
    color: #0f172a;
}
.notice-text p { margin: 0; }
.notice-text p + p { margin-top: 8px; }

/* Notice types: sets --notice-rgb palette */
.notice-tip { --notice-rgb: 34, 197, 94; }      /* green */
.notice-info { --notice-rgb: 59, 130, 246; }    /* blue */
.notice-note { --notice-rgb: 99, 102, 241; }    /* indigo */
.notice-warning { --notice-rgb: 235, 59, 90; }  /* red from old design */

/* Dark theme adjustments for notices */
[data-theme="dark"] .notice {
    background: var(--gray-800);
    border-color: rgba(var(--notice-rgb), 0.35);
    box-shadow: none;
}
[data-theme="dark"] .notice-header {
    background: rgba(var(--notice-rgb), 0.22);
    border-bottom-color: rgba(var(--notice-rgb), 0.35);
}
[data-theme="dark"] .notice-title { color: var(--gray-100); }
[data-theme="dark"] .notice-body { background: rgba(var(--notice-rgb), 0.12); }
[data-theme="dark"] .notice-badge { color: var(--gray-100); }
[data-theme="dark"] .notice-text { color: var(--gray-100); }
