/**
 * Realmify Style Guide - CSS Variables
 * Voxel Forge Theme (3D minimalista, gamer-tech, colaborativo)
 */

:root {
    /* Primary Colors */
    --realmify-voxel-blue: #1C9CF6;
    --realmify-arcane-teal: #00C4A7;
    --realmify-neon-violet: #6A38FF;
    
    /* Background Colors */
    --realmify-abyss-black: #05060F;
    --realmify-ether-white: #F8F9FF;
    --realmify-deep-grid-gray: #121321;
    --realmify-dark-bg: #0C0F2C;
    
    /* Accent Colors */
    --realmify-ether-gold: #EEDA4B;
    
    /* Text Colors */
    --realmify-text-primary: #F8F9FF;
    --realmify-text-secondary: #E0E1EB;
    --realmify-text-muted: #A3A5B4;
    
    /* Border Colors */
    --realmify-border-dark: #1E202D;
    --realmify-border-active: #1C9CF6;
    
    /* Shadows */
    --realmify-shadow-card: 0 2px 20px rgba(0, 0, 0, 0.25);
    --realmify-shadow-glow: 0 0 8px rgba(0, 196, 167, 0.3);
    --realmify-shadow-glow-blue: 0 0 8px rgba(28, 156, 246, 0.3);
    
    /* Transitions */
    --realmify-transition: cubic-bezier(0.4, 0, 0.2, 1);
    --realmify-duration: 0.25s;
    
    /* Spacing */
    --realmify-spacing-xs: 8px;
    --realmify-spacing-sm: 16px;
    --realmify-spacing-md: 24px;
    --realmify-spacing-lg: 40px;
    --realmify-spacing-xl: 80px;
    
    /* Border Radius */
    --realmify-radius: 12px;
    --realmify-radius-sm: 8px;
    
    /* Typography */
    --realmify-font-heading: 'Space Grotesk', 'Segoe UI', sans-serif;
    --realmify-font-subheading: 'Poppins', 'Segoe UI', sans-serif;
    --realmify-font-body: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    
    /* Line Height */
    --realmify-line-height: 1.5;
}

/* Bootstrap Color Overrides */
:root {
    --bs-primary: var(--realmify-voxel-blue);
    --bs-secondary: var(--realmify-arcane-teal);
    --bs-success: var(--realmify-arcane-teal);
    --bs-info: var(--realmify-voxel-blue);
    --bs-warning: var(--realmify-ether-gold);
    --bs-danger: #ff4757;
    --bs-dark: var(--realmify-deep-grid-gray);
    --bs-light: var(--realmify-text-muted);
}

/* Global Text Color Overrides for Better Contrast */
.text-muted {
    color: var(--realmify-text-secondary) !important;
}

.text-secondary {
    color: var(--realmify-text-secondary) !important;
}

small,
.small {
    color: var(--realmify-text-secondary) !important;
}

/* Ensure all body text has good contrast */
body {
    color: var(--realmify-text-primary);
}

/* Card text improvements */
.card {
    color: var(--realmify-text-primary);
}

.card-text {
    color: var(--realmify-text-secondary);
}

/* Badge improvements */
.badge {
    color: var(--realmify-text-primary);
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: var(--realmify-radius-sm);
}

.badge.bg-primary,
.badge.bg-success,
.badge.bg-info,
.badge.bg-warning,
.badge.bg-danger,
.badge.bg-secondary,
.badge.bg-dark {
    color: var(--realmify-text-primary);
}

/* Badge colors for Realmify theme */
.badge.bg-success {
    background-color: var(--realmify-arcane-teal) !important;
}

.badge.bg-primary {
    background-color: var(--realmify-voxel-blue) !important;
}

.badge.bg-warning {
    background-color: var(--realmify-ether-gold) !important;
    color: var(--realmify-abyss-black) !important;
}

.badge.bg-danger {
    background-color: #ff4757 !important;
}

.badge.bg-secondary {
    background-color: var(--realmify-deep-grid-gray) !important;
    border: 1px solid var(--realmify-border-dark);
}

.badge.bg-dark {
    background-color: var(--realmify-dark-bg) !important;
}

/* Link improvements */
a {
    color: var(--realmify-voxel-blue);
}

a:hover {
    color: var(--realmify-arcane-teal);
}

/* Code blocks global styles - Exclude CodeMirror completely */
/* Only apply to standalone pre elements (not inside CodeMirror) */
pre:not(.CodeMirror-line):not(.CodeMirror-lines):not(.CodeMirror-code) {
    background: var(--realmify-dark-bg);
    border: 1px solid var(--realmify-border-dark);
    color: var(--realmify-text-primary);
    padding: var(--realmify-spacing-md);
    border-radius: var(--realmify-radius);
    font-family: 'Courier New', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: auto;
    box-shadow: var(--realmify-shadow-card);
    margin: 1rem 0;
}

/* Exclude CodeMirror pre elements explicitly */
.CodeMirror pre,
.CodeMirror .CodeMirror-line pre,
.CodeMirror .CodeMirror-lines pre,
.CodeMirror .CodeMirror-code pre {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: inline !important;
    line-height: inherit !important;
    font-size: inherit !important;
}

pre:not(.CodeMirror-line):not(.CodeMirror-lines):not(.CodeMirror-code) code {
    background: transparent;
    border: none;
    color: var(--realmify-text-primary);
    padding: 0;
}

/* Inline code (not inside pre, not CodeMirror) */
:not(.CodeMirror):not(.CodeMirror *) > code:not(.CodeMirror-line),
code:not(.CodeMirror-line):not(.CodeMirror *) {
    background: var(--realmify-deep-grid-gray);
    border: 1px solid var(--realmify-border-dark);
    color: var(--realmify-voxel-blue);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

