
/* Responsive design */
@media (max-width: 768px) {
    .editors {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .header__title {
        font-size: 2rem;
    }

    .header__subtitle {
        font-size: 1rem;
    }



    .editor-container {
        padding: 1rem;
    }
}


/* Syntax highlighting hints for textareas */
.zozeditor {
    tab-size: 4;
    -moz-tab-size: 4;
}

/* Loading state for buttons */
.editor-container__button.loading {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none !important;
}

.editor-container__button.loading::after {
    content: ' ⏳';
    animation: pulse 1s infinite;
}

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

/* Zig Compilation Loader */
.zig-loader-container {
    display: none;
    margin: 10px 0;
    padding: 15px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    text-align: left;
    background-color: #000;
    color: #00ff00;
}

.zig-loader-container.show {
    display: block;
}

.zig-loader-text {
    color: #8B4513;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    display: inline;
}

.zig-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #333;
    border-top: 2px solid #8B4513;
    border-radius: 50%;
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
    animation: spin 1s linear infinite;
}

.zig-spinner-fast {
    width: 20px;
    height: 20px;
    border: 2px solid #333;
    border-top: 2px solid #00ff00;
    border-radius: 50%;
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
    animation: spin 0.3s linear infinite;
}

.zig-terminal-output {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #333;
    color: #00ff00;
    /* font-family: 'JetBrains Mono', 'Menlo', 'Ubuntu Mono', monospace; */
    font-size: 13px;
    white-space: pre;
    /* line-height: 1.4; */
}


/* Estilos para tema oscuro */
html[data-theme="dark"] .zig-terminal-output {
    filter: none;
}



@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.ace-tooltip {
  text-align: left;
}
/* ACE Editor Loading Placeholder */
.ace-editor-loading-placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ace-editor-loading-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

.ace-editor-loader-text {
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

/* Lazy Loading Specific Styles */
.ace-editor-lazy-placeholder {
    background: linear-gradient(135deg, #f1f3f4 0%, #e8eaed 100%);
    border: 2px dashed #dee2e6;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ace-editor-lazy-placeholder:hover {
    border-color: #adb5bd;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ace-editor-lazy-icon {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.6;
    animation: float 3s ease-in-out infinite;
}

.ace-editor-lazy-hint {
    font-size: 12px;
    color: #868e96;
    font-style: italic;
    margin-top: 5px;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Editor Container States */
.editor-container[data-lazy-loaded="false"] .editor-container__button {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.editor-container[data-lazy-loaded="true"] .editor-container__button {
    opacity: 1;
    cursor: pointer;
    pointer-events: auto;
}

/* ACE Editor specific styling */
.ace_editor {
  /* left:-10%; */
    border: 0px solid #e1e5e9 !important;
    border-radius: 4px !important;
    font-family: 'JetBrains Mono', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
    width:100%;
    /* min-width: 700px; */
    font-size: 13px!important;
    background-color: transparent;
    /* height: auto !important; */
    /* max-height: 1800px !important; */
    /* min-height: 400px !important; */

    /* Compensar el zoom del book.css (ajuste fino) */
    /*zoom: 1.3!important; /* Ajuste menos agresivo */
    /* transform: scale(0.85) !important; */
    /* transform-origin: top left !important; */
}

/* Contenedor del editor para compensar el zoom del book */
/* Contenedores de editores también compensan el zoom */
.zozeditor,
.ace_editor_container,
td .ace_editor {
    width:100%;
    /* zoom: 0.74 !important; */
    /* transform: scale(0.76) !important; */
    /* transform-origin: top left !important; */
}

.ace_editor.ace_focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

/* Ensure ACE editor container takes full width */
/* .ace_editor {
    width: 100% !important;
    min-height: 200px !important;
} */

/* ACE Native Autocompletion Dropdown Styling */
.ace_autocomplete {
    /* background: white !important; */
    /* color: black !important; */
    /* border: 1px solid #ddd !important; */
    border-radius: 0!important;
    border:0 !important;
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important; */
    /* font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important; */
    /* font-size: 14px !important; */
    /* max-height: 300px !important; */

    /* position: fixed !important; */
    /* z-index: 9999 !important; */
}

/* solo para desktop */
@media (min-width: 769px) {
  .ace_autocomplete {
  width: 450px !important;
    max-width: 450px !important;
    min-width: 450px !important;
  }
}
.ace-multi-cursor {
    pointer-events: auto;
}
