/* =================================================================
   Code Snippet Viewer Styles
================================================================= */

.snippet-container {
    margin-top: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.snippet-tabs {
    display: flex;
    background-color: var(--card-bg-color);
    padding: 5px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.snippet-tab {
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 6px;
    margin: 2px;
    font-size: 0.9em;
    color: var(--text-color-secondary);
    transition: background-color 0.2s, color 0.2s;
    border: 1px solid transparent;
}

.snippet-tab:hover {
    background-color: var(--hover-bg-color);
    color: var(--text-color-primary);
}

.snippet-tab.active {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 500;
}

.snippet-content {
    position: relative;
    background-color: #2d2d2d; /* A nice dark background for code */
    padding: 15px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    line-height: 1.5;
    color: #f8f8f2;
    display: none; /* Hidden by default */
    max-height: 300px;
    overflow-y: auto;
    direction: ltr;
    text-align: left;
}

.snippet-content.active {
    display: block;
}

.snippet-content pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.copy-snippet-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #444;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8em;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.copy-snippet-btn:hover {
    opacity: 1;
}

.copy-snippet-btn:active {
    background-color: #555;
}