/* Custom API Documentation Styles */

:root {
    --primary-color: #005a8d;
    --secondary-color: #00446b;
    --accent-color: #e31e24;
    --danger-color: #e31e24;
    --warning-color: #f59e0b;
    --bg-color: #f4f7f6;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f3f4f6;
    --text-primary: #333333;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-sm: 4px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Header */
.header {
    background-color: #ffffff;
    box-shadow: var(--shadow-lg);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.logo img {
    height: 40px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    padding: 0.25rem 0;
    z-index: 1000;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.15s ease;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background-color: var(--bg-secondary);
}

.dropdown-menu a.active {
    background-color: var(--primary-color);
    color: white;
}

.nav-dropdown > .nav-link {
    cursor: pointer;
    user-select: none;
}

.nav-dropdown.open > .nav-link {
    background-color: rgba(255, 255, 255, 0.15);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.version-badge {
    background: rgba(0, 90, 141, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-color);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .header-nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        margin-top: 1rem;
        flex-wrap: wrap;
    }
    
    .nav-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.75rem;
    }
    
    .dropdown-menu {
        position: static;
        display: block;
        margin-top: 0;
        box-shadow: none;
        border-top: 1px solid var(--border-color);
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    padding: 4rem 2rem;
    text-align: center;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.overview-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: left;
    backdrop-filter: blur(10px);
}

/* Global Authentication Section */
.global-auth-section {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
    position: sticky;
    top: 80px;
    z-index: 998;
    box-shadow: var(--shadow-sm);
    margin-bottom: 0;
}

.global-auth-content {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

/* Global Headers Section */
.global-headers-section {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
    position: sticky;
    top: 240px;
    z-index: 997;
    box-shadow: var(--shadow-sm);
    margin-bottom: 0;
}

.global-headers-content {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


.global-header-input {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    transition: border-color 0.2s;
    width: 100%;
    min-width: 250px;
}

.global-header-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.auth-validation-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    width: 100%;
}

.validate-auth-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.validate-auth-btn:hover:not(:disabled) {
    background: var(--primary-dark);
}

.validate-auth-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

.auth-validation-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
}

.auth-status-text {
    flex: 1;
}

.auth-validation-status.auth-status-pending {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.auth-validation-status.auth-status-validating {
    background: var(--warning-color);
    color: white;
}

.auth-validation-status.auth-status-success {
    background: var(--secondary-color);
    color: white;
}

.auth-validation-status.auth-status-error {
    background: var(--danger-color);
    color: white;
}

.send-request-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Controls Panel */
.controls-panel {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    position: sticky;
    top: 340px;
    z-index: 996;
    box-shadow: var(--shadow-sm);
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-group input,
.control-group select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.control-group input:focus,
.control-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Main Content Layout */
.main-content {
    width: 100%;
}

.main-content > .container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Reference and Getting Started pages have no sidebar - single column so content can use full width */
.main-content.getting-started-content > .container {
    display: block;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 360px; /* Below all sticky sections (header + auth + headers + controls) */
    height: fit-content;
    max-height: calc(100vh - 380px); /* Account for top offset */
    overflow-y: auto;
    overflow-x: hidden;
    width: 280px;
    max-width: 280px;
    box-sizing: border-box;
    /* Ensure scrolling works properly */
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    /* Make sure sidebar can scroll independently */
    align-self: start;
}

.nav-menu {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    overflow-x: hidden; /* Prevent horizontal overflow */
    width: 100%;
    box-sizing: border-box;
}

.nav-search {
    position: relative;
    margin-bottom: 1rem;
}

.nav-search i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.nav-search input {
    width: 100%;
    padding: 0.5rem 0.5rem 0.5rem 2rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.nav-list {
    list-style: none;
}

.nav-item.nav-special {
    border-top: 1px solid var(--border-color);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

.nav-item.nav-special .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.nav-item.nav-special .nav-link:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.nav-item.nav-special .nav-link i {
    font-size: 1rem;
    width: 1.25rem;
    text-align: center;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-resource-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s, border-left 0.2s;
    font-weight: 500;
    position: relative;
}

.nav-resource-header:hover {
    background: var(--bg-secondary);
}

/* Active resource view state (when this resource is currently displayed) */
.nav-resource-header.active {
    background: var(--bg-secondary);
    border-left: 3px solid var(--primary-color);
    font-weight: 600;
}

.nav-resource-header.active .nav-resource-name {
    color: var(--primary-color);
}

.nav-toggle {
    font-size: 0.75rem;
    transition: transform 0.2s;
    color: var(--text-muted);
}

/* Expanded state (for showing/hiding endpoint list) */
.nav-resource-header.expanded .nav-toggle {
    transform: rotate(90deg);
}

.nav-resource-header.active .nav-toggle {
    transform: rotate(90deg);
}

.nav-resource-name {
    flex: 1;
    color: var(--text-primary);
    min-width: 0; /* Allow flex item to shrink */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.nav-endpoints {
    list-style: none;
    margin-left: 1.5rem;
    margin-top: 0.5rem;
    display: none;
}

.nav-resource-header.expanded + .nav-endpoints,
.nav-resource-header.active + .nav-endpoints {
    display: block;
}

.nav-endpoint-name {
    margin: 0.25rem 0;
}

.nav-endpoint-name-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
    font-size: 0.875rem;
}

.nav-endpoint-name-header:hover {
    background: var(--bg-secondary);
}

.nav-endpoint-name-header .nav-toggle {
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.nav-endpoint-name-header.active .nav-toggle {
    transform: rotate(90deg);
}

.nav-endpoint-name-text {
    flex: 1;
}

.nav-endpoint-list {
    list-style: none;
    padding-left: 1.5rem;
    margin: 0.25rem 0;
    display: none;
}

.nav-endpoint-name-header.active + .nav-endpoint-list {
    display: block;
}

.nav-endpoint {
    margin-bottom: 0.25rem;
}

.nav-endpoint a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s;
    font-size: 0.875rem;
    min-width: 0; /* Allow flex item to shrink */
    overflow: hidden; /* Prevent overflow */
}

.nav-endpoint a:hover {
    background: var(--bg-secondary);
}

.method-badge {
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
    min-width: 45px;
    text-align: center;
}

.endpoint-path {
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0; /* Allow flex item to shrink */
}

/* Content Area */
.content-area {
    min-width: 0;
    overflow-x: hidden; /* Prevent horizontal overflow */
    width: 100%;
    box-sizing: border-box;
}

.resource-section {
    margin-bottom: 3rem;
    transition: opacity 0.3s ease-in-out;
}

/* Active resource section (currently visible) */
.resource-section.active {
    display: block !important;
    opacity: 1;
}

/* Hidden resource sections */
.resource-section:not(.active) {
    display: none !important;
    opacity: 0;
}

.resource-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.resource-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
}

.resource-description {
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.8;
}

/* Endpoint Name Heading */
.endpoint-name-heading {
    font-size: 1.75rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.endpoint-name-heading:first-of-type {
    margin-top: 1.5rem;
}

/* Endpoint Card */
.endpoint-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s;
}

.endpoint-card:hover {
    box-shadow: var(--shadow-md);
}

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

.auth-required-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--warning-color);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.auth-required-badge i {
    font-size: 0.875rem;
}

.cost-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--secondary-color);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.cost-badge i {
    font-size: 0.875rem;
}

.operation-id-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    font-family: 'Courier New', monospace;
}

.operation-id-badge i {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.endpoint-method-badge {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-transform: uppercase;
    min-width: 80px;
    text-align: center;
}

.path-code {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 1.125rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.try-it-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.try-it-btn:hover {
    background: var(--primary-dark);
}

.endpoint-summary h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.endpoint-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* Tidy, readable “callout” boxes for YAML-rendered descriptions */
.resource-description,
.endpoint-description {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}

.resource-description {
    margin-top: 0.75rem;
}

.endpoint-description {
    margin-top: 0.75rem;
}

/* Markdown-rendered content styles */
.endpoint-description-content,
.resource-description-content {
    line-height: 1.6;
}

.endpoint-description-content p,
.resource-description-content p {
    margin-bottom: 1em;
}

.endpoint-description-content code,
.resource-description-content code {
    background-color: #f4f4f4;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.endpoint-description-content pre,
.resource-description-content pre {
    background-color: #f4f4f4;
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto;
}

/* Hide method tags/badges in the UI (sidebar + endpoint header) */

.endpoint-description-content ul,
.resource-description-content ul {
    margin-left: 1.5em;
    margin-bottom: 1em;
}

.endpoint-section {
    margin-bottom: 2rem;
}

.endpoint-section h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

/* Method Badge Colors */
.method-get { background: #10b981; color: white; }
.method-post { background: #3b82f6; color: white; }
.method-put { background: #f59e0b; color: white; }
.method-delete { background: #ef4444; color: white; }
.method-patch { background: #8b5cf6; color: white; }

/* Parameters Table */
.parameters-table {
    overflow-x: auto;
}

.parameters-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.parameters-table th,
.parameters-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.parameters-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

.parameters-table code {
    background: var(--bg-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8125rem;
}

.param-location {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 3px;
    color: var(--text-secondary);
}

.required-badge {
    color: var(--danger-color);
    font-weight: 500;
    font-size: 0.75rem;
}

.optional-badge {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Request Body Section */
.request-body-section {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.request-body-section h5 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.request-body-schema-info {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.schema-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.schema-table th,
.schema-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.schema-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.8125rem;
}

.schema-table code {
    background: var(--bg-tertiary);
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.8125rem;
}

/* Request Body Input Fields - reuse parameter input styles */
.request-body-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    background: var(--bg-color);
    color: var(--text-primary);
    margin-top: 0.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

.request-body-section .param-input-group {
    margin-bottom: 1rem;
}

.request-body-section .param-input-group label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.request-body-section .param-description {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.request-body-section .param-type {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-style: italic;
    margin-top: 0.125rem;
}

/* Request Body Editor (legacy - kept for backwards compatibility) */
.request-body-editor textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    resize: vertical;
}

/* Try It Panel */
.try-it-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.try-it-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.try-it-header h4 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.close-panel-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.25rem;
}

.close-panel-btn:hover {
    color: var(--text-primary);
}

.request-url {
    margin-bottom: 1.5rem;
}

.request-url label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.url-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-color);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.url-display code {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--text-primary);
    word-break: break-all;
}

.copy-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
}

.copy-btn:hover {
    background: var(--primary-dark);
}

.request-params,
.request-headers {
    margin-bottom: 1.5rem;
}

.request-params h5,
.request-headers h5 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: var(--text-primary);
}

.param-input-group {
    margin-bottom: 1rem;
}

.param-input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.param-input,
.param-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    transition: border-color 0.2s;
    background: var(--bg-color);
    color: var(--text-primary);
}

.param-input:focus,
.param-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.param-select {
    cursor: pointer;
}

.param-description {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    line-height: 1.4;
    font-style: italic;
}

.headers-info {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.headers-note {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.headers-note i {
    color: var(--primary-color);
}

.header-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    background: var(--bg-color);
    color: var(--text-primary);
}

.header-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.send-request-btn {
    padding: 0.75rem 2rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.send-request-btn:hover {
    background: #059669;
}

.response-section {
    margin-top: 1.5rem;
}

.response-header.collapsible-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    color: var(--text-primary);
    font-weight: 600;
    transition: color 0.2s ease;
}

.response-header.collapsible-header:hover {
    color: var(--primary-color);
}

.response-header.collapsible-header .collapse-icon,
.response-header.collapsible-header .expand-icon {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
    width: 1rem;
    text-align: center;
}

.response-content {
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.2s ease-out;
    max-height: 5000px;
    opacity: 1;
}

.response-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Ensure response body formatting is preserved */
.response-content .response-body {
    display: block;
    visibility: visible;
}

.response-status {
    margin-bottom: 0.75rem;
    font-weight: 500;
    padding: 0.5rem 0;
    min-height: 1.5rem;
}

.response-body {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
}

.response-body.error-response {
    border-color: var(--danger-color);
    background: #fef2f2;
}

/* JSON Syntax Highlighting */
.response-body .json-key {
    color: #881391;
    font-weight: 500;
}

.response-body .json-string {
    color: #0b5394;
}

.response-body .json-number {
    color: #1c00cf;
}

.response-body .json-boolean {
    color: #0e6e00;
    font-weight: 500;
}

.response-body .json-null {
    color: #808080;
    font-style: italic;
}
    font-size: 0.875rem;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Examples */
.example-code {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
    overflow-x: auto;
}

.example-code pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

/* Responses */
.responses-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.response-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    flex-wrap: wrap;
}

.status-code {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    min-width: 60px;
    text-align: center;
}

.response-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    font-family: 'Courier New', monospace;
}

.response-description {
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.status-2xx { background: var(--secondary-color); color: white; }
.status-4xx { background: var(--warning-color); color: white; }
.status-5xx { background: var(--danger-color); color: white; }

/* Response status banners */
.response-status.status-success {
    background: var(--secondary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    display: inline-block;
}

.response-status.status-warning {
    background: var(--warning-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    display: inline-block;
}

.response-status.status-error {
    background: var(--danger-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    display: inline-block;
}

.response-status.status-loading {
    background: var(--text-muted);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    display: inline-block;
}

/* Password Helper */
.password-helper {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border-color);
    background: var(--bg-tertiary);
}

.password-helper > summary {
    list-style: none;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
}

.password-helper > summary::-webkit-details-marker {
    display: none;
}

.password-helper summary i {
    margin-right: 0.35rem;
}

.password-helper-content {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.password-helper-text {
    margin: 0;
    color: var(--text-secondary);
}

.password-helper-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.password-helper-status {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.password-helper-status.success {
    color: var(--secondary-color);
}

.password-helper-status.error {
    color: var(--danger-color);
}

/* Footer */
/* Getting Started Page Styles */
.getting-started-content {
    padding: 2rem 0;
}

.getting-started-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

/* Reference pages (Error Codes, Filter Constraints, Response Objects, Password Encoding) use a wider content area */
.reference-page .getting-started-wrapper,
.getting-started-wrapper.reference-wrapper {
    max-width: 1280px;
}

/* Reference page: main content + sidebar layout */
.reference-body {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: start;
}

.reference-sidebar {
    width: 242px;
    flex-shrink: 0;
    order: 1;
    position: sticky;
    top: 6rem;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
}

.reference-content {
    flex: 1;
    min-width: 0;
    order: 2;
}

/* Reference page table of contents (sidebar) */
.reference-toc {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem 1.25rem;
    box-shadow: var(--shadow-sm);
}

.reference-toc-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.reference-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.reference-toc-list li {
    margin-bottom: 0.5rem;
}

.reference-toc-list li:last-child {
    margin-bottom: 0;
}

.reference-toc-list a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    display: block;
}

.reference-toc-list a:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .reference-body {
        flex-direction: column;
    }
    .reference-sidebar {
        width: 100%;
        position: static;
    }
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.page-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.content-section {
    background: var(--bg-color);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.content-section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.content-section h2 i {
    font-size: 1.5rem;
}

.content-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.content-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.content-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.content-section ul,
.content-section ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.content-section li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.code-block {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin: 1.5rem 0;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.code-block code {
    font-family: inherit;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.info-table thead {
    background: var(--primary-color);
    color: white;
}

.info-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-table td {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.info-table tbody tr:hover {
    background: var(--bg-secondary);
}

.info-table code {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.875rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.code-examples {
    margin: 2rem 0;
}

.code-examples h4 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.quick-start-steps {
    list-style: none;
    padding-left: 0;
    counter-reset: step-counter;
}

.quick-start-steps > li {
    counter-increment: step-counter;
    margin-bottom: 2.5rem;
    padding-left: 3.5rem;
    position: relative;
}

.quick-start-steps > li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
}

.quick-start-steps h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.quick-start-steps ul,
.quick-start-steps ol {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

.next-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.next-step-card {
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.next-step-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.next-step-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.next-step-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.next-step-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.next-step-card a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.next-step-card a:hover {
    text-decoration: underline;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.footer {
    background-color: #333333;
    color: #ffffff;
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
}

.footer a {
    color: #aaaaaa;
    text-decoration: none;
}

.footer a:hover {
    color: #ffffff;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
        max-height: none;
    }
}

/* Example Tabs Styles */
.example-tabs-container {
    margin-top: 1rem;
}

.example-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1rem;
}

.example-tab-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
    position: relative;
    top: 2px;
}

.example-tab-btn:hover {
    color: var(--primary-color);
    background: var(--bg-secondary);
}

.example-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

.example-tab-content {
    display: none;
}

.example-tab-content.active {
    display: block;
}

.error-codes-search {
    position: relative;
    margin: 1.5rem 0;
}

.error-codes-search input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
}

.error-codes-search i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Interactive Password Encoder (reference page) */
.password-encoder-tool {
    background: var(--bg-secondary);
    padding: 1.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    max-width: 560px;
}

.password-encoder-tool .encoder-row {
    margin-bottom: 1.25rem;
}

.password-encoder-tool .encoder-row:last-child {
    margin-bottom: 0;
}

.password-encoder-tool label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.password-encoder-tool .encoder-input {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: var(--bg-color);
    color: var(--text-primary);
}

.password-encoder-tool .encoder-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.password-encoder-tool .encoder-input::placeholder {
    color: var(--text-muted);
}

.password-encoder-tool .encoder-input[readonly] {
    background: var(--bg-tertiary);
    cursor: text;
}

.password-encoder-tool .encoder-actions {
    margin: 1.5rem 0 1.25rem;
}

.password-encoder-tool .encoder-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9375rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.password-encoder-tool .encoder-btn:hover {
    background: var(--primary-dark);
}

.password-encoder-tool .encoder-result-wrap {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.password-encoder-tool .encoder-result-wrap .encoder-input {
    flex: 1;
    min-width: 0;
}

.password-encoder-tool .encoder-copy-btn {
    flex-shrink: 0;
    padding: 0.75rem 1.25rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.password-encoder-tool .encoder-copy-btn:hover {
    filter: brightness(0.95);
}

.example-code {
    display: inline-block;
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    margin: 0.25rem;
}

@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }
    
    .controls-grid {
        grid-template-columns: 1fr;
    }
    
    .endpoint-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .path-code {
        width: 100%;
    }
}

