/* ============================================
   EDITOR.CSS - Painel do Editor
   ============================================ */

.editor-pane {
    width: 40%;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    background: white;
    z-index: 5;
}

/* ===== EDITOR TOOLBAR ===== */
.editor-toolbar {
    padding: 6px 12px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-toolbar);
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.tool-btn {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #555;
    font-size: 0.85rem;
    transition: all var(--transition);
    position: relative;
}

.tool-btn:hover { background: #e9ecef; color: var(--primary); }
.tool-btn:active { transform: scale(0.95); }
.tool-btn.btn-upload { color: var(--accent); border-color: var(--accent); }
.tool-btn.btn-upload:hover { background: #f0f7ef; }
.tool-btn.active { background: var(--accent); color: white; border-color: var(--accent); }

.tool-separator {
    width: 1px;
    height: 20px;
    background: #ddd;
    margin: 0 4px;
    flex-shrink: 0;
}

.tool-group {
    display: flex;
    gap: 2px;
    align-items: center;
}

/* ===== MARKDOWN INPUT ===== */
textarea#markdown-input {
    flex: 1;
    width: 100%;
    border: none;
    padding: 1.5rem 2rem;
    font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.7;
    resize: none;
    outline: none;
    color: #333;
    background: white;
    tab-size: 4;
}

textarea#markdown-input::placeholder {
    color: #aaa;
    font-style: italic;
}

textarea#markdown-input:focus {
    background: #fefefe;
}

/* ===== FIND & REPLACE BAR ===== */
.find-replace-bar {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    background: #fffde7;
    display: flex;
    flex-direction: column;
    gap: 6px;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 100px; }
}

.find-replace-bar .find-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.find-replace-bar input {
    flex: 1;
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
}

.find-replace-bar input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(45,90,39,0.1);
}

.find-replace-bar .find-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    min-width: 60px;
    text-align: center;
}

.find-replace-bar .find-btn {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    color: #555;
    transition: all var(--transition);
}

.find-replace-bar .find-btn:hover { background: #e9ecef; }
.find-replace-bar .find-btn.active { background: var(--accent); color: white; }

.find-replace-bar .close-find {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 0.9rem;
    padding: 2px 6px;
}

.find-replace-bar .close-find:hover { color: #333; }

.find-highlight {
    background: #fff176;
    border-radius: 2px;
}

.find-highlight.active {
    background: #ff9800;
    color: white;
}
