/**
 * E-Tafel - Zentrales Stylesheet
 * Verwaltet Layout und UI-Komponenten der Hauptseite.
 */

body {
    background-color: #f3f4f6;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}

.modal-overlay {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

/* --- LAYOUT --- */
.editor-wrapper {
    width: 100%;
    height: calc(100vh - 5rem); /* Platz für Header + etwas Luft */
    display: flex;
    flex-direction: column; 
    padding: 1rem;
    overflow: hidden; 
}

.editor-box {
    width: 100%;
    flex: 1; 
    min-height: 200px; 
    display: flex;
    flex-direction: column;
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    transition: width 0.3s;
    overflow: hidden;
    position: relative;
}

/* TinyMCE Integration */
.tox-tinymce {
    height: 100% !important;
    width: 100% !important;
    border: none !important;
    border-top: 1px solid #e5e7eb !important;
    flex-grow: 1;
}

/* Fallback Textarea */
#tafel-editor {
    width: 100%;
    height: 100%;
    padding: 1rem;
    font-family: monospace;
    border: none;
    resize: none;
    outline: none;
    color: #374151;
}

/* Debug Konsole */
#debug-console {
    height: 2rem;
    background: #004f62; 
    color: #ffffff;
    font-family: monospace;
    font-size: 0.75rem;
    padding: 0.25rem 1rem;
    display: flex;
    align-items: center;
    overflow: hidden;
    white-space: nowrap;
    border-top: 1px solid #1f93b4;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1000;
}

/* --- RESIZER FÜR MATHE-VORSCHAU --- */
.resizer {
    height: 12px;
    background-color: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    cursor: row-resize;
    display: none; 
    justify-content: center;
    align-items: center;
    flex-shrink: 0; 
    transition: background-color 0.2s;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.resizer:hover, .resizer.active {
    background-color: #e2e8f0;
}

.resizer::after {
    content: "";
    width: 40px;
    height: 4px;
    border-top: 2px solid #cbd5e1;
    border-bottom: 2px solid #cbd5e1;
    display: block;
}

/* --- UI STYLING (Range Slider & Scrollbars) --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

input[type=range] {
    -webkit-appearance: none;
    background: transparent;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    margin-top: -6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    border: 1px solid #e2e8f0;
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: #475569;
    border-radius: 2px;
}
