/* ============================================
   HTML Code Viewer Styles
   Interactive code/result display component
   ============================================ */

/* Inline code snippets */
.info-box code,
.tip-box code,
.step-content code,
.resource-content code,
.intro-text code,
.regular-text code,
.ul-step-list li code,
.objectives-list li code {
    background: var(--alabaster);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: var(--dark-blue);
}

.tip-box code {
    background: white;
}

/* Code Example Wrapper */
.code-example-wrapper {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    margin: 2rem 0;
}

/* Code Tabs */
.code-tabs {
    display: flex;
    background: var(--alabaster);
    border-bottom: 2px solid #e5e7eb;
}

.code-tab {
    flex: 1;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    border-right: 1px solid #e5e7eb;
    color: var(--text-medium);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.code-tab:last-child {
    border-right: none;
}

.code-tab:hover {
    background: rgba(80, 165, 230, 0.05);
    color: var(--dark-blue);
}

.code-tab.active {
    background: white;
    color: var(--dark-blue);
    font-weight: 600;
    border-bottom: 3px solid var(--light-blue);
    margin-bottom: -2px;
}

/* Code Display Container */
.code-display {
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Code View */
.code-view {
    display: none;
    padding: 0;
    flex: 1;
}

.code-view.active {
    display: block;
}

.code-view pre {
    margin: 0;
    padding: 2rem;
    background: #1e1e1e;
    color: #d4d4d4;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    height: 100%;
}

.code-view code {
    font-family: 'Courier New', Courier, monospace;
}

/* Result View */
.result-view {
    display: none;
    padding: 2rem;
    background: white;
    flex: 1;
}

.result-view.active {
    display: block;
}

.result-content {
    max-width: 100%;
}

/* Result Content Styling */
.result-content h1,
.result-content h2,
.result-content h3,
.result-content h4,
.result-content h5,
.result-content h6 {
    color: var(--dark-blue);
    font-weight: 600;
    line-height: 1.3;
}

.result-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: var(--text-dark);
}

.result-content p:last-child {
    margin-bottom: 0;
}

.result-content ul,
.result-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.result-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: var(--text-dark);
}

.result-content a {
    color: var(--medium-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.result-content a:hover {
    color: var(--dark-blue);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .code-tab {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    .code-view pre {
        padding: 1.5rem;
        font-size: 0.85rem;
    }
    
    .result-view {
        padding: 1.5rem;
    }
}

/* ============================================
   JSON Code Comparer Styles
   Side-by-side JSON comparison component
   ============================================ */

/* JSON Comparer Container */
.json-comparer {
    background: #1e1e1e;
}

/* JSON Views */
.json-view {
    display: none;
    padding: 2rem;
    padding-bottom: 0;
    flex: 1;
}

.json-view.active {
    display: block;
}

.json-view pre {
    margin: 0;
    padding: 0;
    background: transparent;
    color: #d4d4d4;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    height: 100%;
}

.json-view code {
    font-family: 'Courier New', Courier, monospace;
    color: #d4d4d4;
}

/* Responsive Design */
@media (max-width: 768px) {
    .json-view {
        padding: 1.5rem;
    }
    
    .json-view pre {
        font-size: 0.85rem;
    }
}