/* Code Tabs and Code Block Styles */
/* Matches the styling from notification-service-api-integration-guide.html */

/* CSS Variables - matching the reference file */
:root {
    --bg-color: #fafafa;
    --text-color: #1d1d1f;
    --accent-color: #0077ff;
    --accent-hover: #0056cc;
    --section-bg: #ffffff;
    --border-color: #e5e5e7;
    --text-secondary: #6e6e73;
}

/* Inline code styling */
code {
    background: var(--bg-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    word-break: break-word;
    white-space: pre-wrap;
}

/* Code block (pre) styling */
pre {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

/* Code inside pre blocks */
pre code {
    background: none;
    padding: 0;
    white-space: pre;
    word-break: normal;
    display: block;
    overflow-x: auto;
    max-width: 100%;
    font-size: 0.9em;
    line-height: 1.6;
}

/* Code tabs container */
.code-tabs {
    margin: 2rem 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--section-bg);
}

/* Code tabs header */
.code-tabs-header {
    display: flex;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
}

/* Code tab buttons */
.code-tab-button {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.code-tab-button:hover {
    color: var(--text-color);
    background: rgba(0, 119, 255, 0.05);
}

.code-tab-button.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    background: var(--section-bg);
}

/* Code tab content */
.code-tab-content {
    display: none;
}

.code-tab-content.active {
    display: block;
}

/* Code blocks inside tabs */
.code-tab-content pre {
    margin: 0;
    border-radius: 0;
    background: var(--bg-color);
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    box-sizing: border-box;
    padding: 1.5rem;
}

.code-tab-content pre code {
    white-space: pre;
    word-break: normal;
    display: block;
    overflow-x: auto;
    max-width: 100%;
    font-size: 0.9em;
    line-height: 1.6;
}

/* Ensure code blocks can scroll horizontally on all screen sizes */
pre,
.code-tab-content pre {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    box-sizing: border-box;
}

pre code,
.code-tab-content pre code {
    white-space: pre;
    word-break: normal;
    display: block;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .code-tab-button {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    pre,
    .code-tab-content pre {
        padding: 1rem;
        font-size: 0.85em;
    }
}

