/* ============================================================================
   BASE & LAYOUT
   Reset, scrollbars, sections, controls
   ============================================================================ */

:root {
    /* Surfaces - Dark theme */
    --rb-bg-base: #0f172a;
    --rb-bg-input: #0f172a;
    --rb-bg-surface: #1e293b;
    --rb-bg-elevated: #334155;
    
    /* Text */
    --rb-text-primary: #e2e8f0;
    --rb-text-secondary: #94a3b8;
    --rb-text-muted: #64748b;
    --rb-text-dimmed: #475569;
    
    /* Semantic colors */
    --rb-color-error: #ef4444;
    --rb-color-error-dark: #7f1d1d;
    --rb-color-error-border: #991b1b;
    --rb-color-success: #10b981;
    --rb-color-success-dark: #064e3b;
    --rb-color-info: #3b82f6;
    --rb-color-info-dark: #0c4a6e;
    --rb-color-purple: #7c3aed;
    --rb-color-purple-dark: #1e1b4b;
    
    /* Borders */
    --rb-border-default: #334155;
    --rb-border-dark: #1e293b;
    --rb-border-purple: #4338ca;
}

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

html {
    scroll-padding-top: 40px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    line-height: 1.6;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 6px;
    border: 2px solid #0f172a;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Firefox scrollbar styling */
* {
    scrollbar-width: thin;
    scrollbar-color: #334155 #0f172a;
}

/* Fix anchor link scroll position to account for sticky header */
h1,
h2,
h3,
h4,
h5,
h6 {
    scroll-margin-top: 80px;
}

.section {
    display: none;
}

.section.active {
    display: block;
}

.controls {
    background: #1e293b;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

/* Service Iframe Sections */
.section-iframe {
    height: calc(100vh - 40px);
    padding: 0;
}

.section-iframe.active {
    display: flex;
    flex-direction: column;
}

.service-iframe-container {
    width: 100%;
    flex: 1;
    min-height: 0;
    position: relative;
}

.service-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    background: #1e293b;
    display: none;
}

.service-iframe.loaded {
    display: block;
}

.service-iframe-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #1e293b;
    border-radius: 8px;
    gap: 16px;
}

.service-iframe-placeholder.hidden {
    display: none;
}

.service-iframe-placeholder-icon {
    font-size: 4rem;
    opacity: 0.5;
}

.service-iframe-placeholder-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #e2e8f0;
}

.service-iframe-placeholder-text {
    font-size: 0.9375rem;
    color: #64748b;
    text-align: center;
    max-width: 400px;
    line-height: 1.5;
}
