/* Python Sandbox Styles */

/* Code Editor */
.code-editor {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.5;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    resize: vertical;
    min-height: 300px;
}

[data-bs-theme="dark"] .code-editor {
    background-color: #1e1e1e;
    border-color: #495057;
    color: #d4d4d4;
}

.code-editor:focus {
    outline: none;
    border-color: #052c65;
    box-shadow: 0 0 0 0.25rem rgba(5, 44, 101, 0.1);
}

[data-bs-theme="dark"] .code-editor:focus {
    border-color: #6ea8fe;
    box-shadow: 0 0 0 0.25rem rgba(110, 168, 254, 0.1);
}

/* Console Output */
.console-output {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    background-color: #1e1e1e;
    color: #d4d4d4;
    border: 1px solid #495057;
    border-radius: 0.375rem;
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

[data-bs-theme="dark"] .console-output {
    background-color: #0d1117;
    border-color: #30363d;
}

.console-line {
    padding: 2px 0;
    border-left: 3px solid transparent;
    padding-left: 8px;
    margin-bottom: 4px;
}

.console-output {
    color: #4ec9b0;
}

.console-error {
    color: #f48771;
    border-left-color: #f48771;
    background-color: rgba(244, 135, 113, 0.05);
}

.console-warning {
    color: #dcdcaa;
    border-left-color: #dcdcaa;
    background-color: rgba(220, 220, 170, 0.05);
}

/* Loading spinner in status */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Examples button group */
.btn-group {
    gap: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .code-editor {
        font-size: 12px;
        min-height: 250px;
    }
    
    .console-output {
        font-size: 12px;
        max-height: 300px;
    }
    
    .btn-group {
        display: flex;
        flex-wrap: wrap;
    }
    
    .btn-group .btn {
        flex: 1 1 auto;
        min-width: 120px;
    }
}

/* Custom scrollbar for console */
.console-output::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.console-output::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.console-output::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.console-output::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Alert adjustments */
.alert {
    border-radius: 0.375rem;
}

.alert .fsvg {
    vertical-align: middle;
}