/* Notion Typewriter - Component Styles */
/* Uses shared variables from /styles.css */
/* =============================================================================
   Fixes applied:
   - #2: Light mode scrollbar with correct data-theme selector
   - #3: Explicit transparent backgrounds for embedded mode
   - #4: Cursor color using shared CSS variables (no hardcoding)
   - #7: Font loading optimization
   ============================================================================= */

/* =============================================================================
   Base Styles
   ============================================================================= */

   html, body {
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--bg);
    color: var(--notion-text-primary);
    font-family: var(--notion-font-family);
    line-height: 1.6;
}

/* Fix #3: Explicit transparent backgrounds when embedded */
html[data-embedded="true"],
html[data-embedded="true"] body,
html[data-embedded="true"] .container,
html[data-embedded="true"] section,
html[data-embedded="true"] .typewriter-text {
    background: transparent !important;
}

.container {
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
}

section {
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.typewriter-text {
    white-space: pre-line;
    width: 100%;
    text-align: center;
    padding: 1rem;
    color: var(--notion-text-primary);
    background: transparent;
}

/* =============================================================================
   Fix #4: Cursor using shared CSS variables
   ============================================================================= */

.Typewriter__cursor {
    color: var(--notion-text-muted);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* =============================================================================
   Fix #2: Light mode scrollbar with correct selector (data-theme)
   ============================================================================= */

/* Scrollbar uses shared border/text variables - automatically theme-aware */
.typewriter-text {
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.typewriter-text::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.typewriter-text::-webkit-scrollbar-track {
    background: transparent;
}

.typewriter-text::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.typewriter-text::-webkit-scrollbar-thumb:hover {
    background: var(--notion-text-muted);
}

/* =============================================================================
   Fix #7: Font loading states to prevent FOUT/FOIT
   ============================================================================= */

/* Ensure font inherits properly during async font load */
.typewriter-text {
    font-family: inherit;
}

/* When fonts are loading, reduce visual jarring */
.fonts-loading .typewriter-text {
    opacity: 0.95;
}

/* Smooth transition when fonts are ready */
.fonts-ready .typewriter-text {
    opacity: 1;
    transition: opacity var(--notion-transition-fast);
}