/* Format Text Pro - seotoolpro.ro */

.ftp-wrap {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 24px;
}

/* ── Statistici bar ── */
.ftp-stats-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    background: #f9fafb;
    border-radius: 8px;
    padding: 14px 16px;
}

.ftp-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 60px;
}

.ftp-stat-val {
    font-size: 22px;
    font-weight: 700;
    color: #7c3aed;
    line-height: 1.1;
}

.ftp-stat-lbl {
    font-size: 11px;
    color: #6b7280;
    text-align: center;
    margin-top: 2px;
    white-space: nowrap;
}

/* ── Editoare ── */
.ftp-editors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.ftp-editor-col {
    display: flex;
    flex-direction: column;
}

.ftp-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    min-height: 30px;
}

.ftp-editor-title {
    font-weight: 600;
    font-size: 13px;
    color: #374151;
}

.ftp-header-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ftp-textarea {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    color: #111827;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s;
    outline: none;
    line-height: 1.6;
}

.ftp-textarea:focus {
    border-color: #7c3aed;
}

.ftp-output-ta {
    background: #f9fafb;
    color: #374151;
}

/* ── Butoane mici header ── */
.ftp-btn-small {
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.ftp-btn-purple {
    background: #7c3aed;
    color: #fff;
}
.ftp-btn-purple:hover { background: #6d28d9; }

.ftp-btn-green {
    background: #059669;
    color: #fff;
}
.ftp-btn-green:hover { background: #047857; }

.ftp-btn-gray {
    background: #e5e7eb;
    color: #374151;
}
.ftp-btn-gray:hover { background: #d1d5db; }

.ftp-btn-danger {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}
.ftp-btn-danger:hover { background: #fca5a5; }

/* ── Sectiuni operatii ── */
.ftp-sections {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ftp-section {
    background: #f9fafb;
    border-radius: 8px;
    padding: 14px 16px;
}

.ftp-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 10px;
}

.ftp-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ftp-btn {
    padding: 8px 14px;
    background: #fff;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s;
}

.ftp-btn:hover {
    border-color: #7c3aed;
    color: #7c3aed;
    background: #faf5ff;
}

.ftp-btn.ftp-btn-undo {
    border-color: #fcd34d;
    color: #92400e;
    background: #fffbeb;
}
.ftp-btn.ftp-btn-undo:hover {
    background: #fef3c7;
    border-color: #f59e0b;
}

.ftp-btn.ftp-btn-findreplace {
    border-color: #7c3aed;
    color: #7c3aed;
    background: #faf5ff;
}
.ftp-btn.ftp-btn-findreplace:hover,
.ftp-btn.ftp-btn-findreplace.active {
    background: #7c3aed;
    color: #fff;
}

/* ── Find / Replace panel ── */
.ftp-fr-panel {
    background: #f3f0ff;
    border: 1.5px solid #c4b5fd;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
    animation: ftpFade 0.2s ease;
}

.ftp-fr-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.ftp-fr-field {
    flex: 1;
    min-width: 140px;
}

.ftp-fr-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.ftp-fr-field input {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px solid #c4b5fd;
    border-radius: 6px;
    font-size: 13px;
    box-sizing: border-box;
    outline: none;
}

.ftp-fr-field input:focus {
    border-color: #7c3aed;
}

.ftp-fr-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: #4b5563;
}

.ftp-fr-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.ftp-fr-panel .ftp-btn {
    padding: 8px 18px;
    align-self: flex-end;
}

/* ── Toast ── */
.ftp-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #111827;
    color: #fff;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    z-index: 9999;
    white-space: nowrap;
}

.ftp-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@keyframes ftpFade {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 650px) {
    .ftp-editors {
        grid-template-columns: 1fr;
    }

    .ftp-stats-bar {
        gap: 6px;
        padding: 10px 12px;
    }

    .ftp-stat-val {
        font-size: 18px;
    }

    .ftp-wrap {
        padding: 16px;
    }

    .ftp-fr-row {
        flex-direction: column;
    }

    .ftp-fr-field {
        width: 100%;
    }
}
