.ref-editor-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    vertical-align: middle;
}

.btn-editor {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 4px 8px;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    color: #0284c7;
    background: rgba(2, 132, 199, 0.1);
    border: 1px solid rgba(2, 132, 199, 0.3);
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    vertical-align: middle;
    box-sizing: border-box;
}

.btn-editor:hover {
    background: rgba(2, 132, 199, 0.2);
    border-color: #0284c7;
    color: #0369a1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.15);
}

.btn-editor:active {
    transform: translateY(0);
}

.btn-editor.editor-loading {
    opacity: 0.6;
    pointer-events: none;
    animation: editorPulse 1s infinite alternate;
}

/* Modo oscuro (Paneles modernos, dashboard) */
body.dark-theme .btn-editor,
.glass .btn-editor,
.data-section .btn-editor,
.card .btn-editor {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.35);
}

body.dark-theme .btn-editor:hover,
.glass .btn-editor:hover,
.data-section .btn-editor:hover,
.card .btn-editor:hover {
    background: rgba(56, 189, 248, 0.25);
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.2);
}

/* Versión compacta (para tablas y celdas de administración) */
.btn-editor-sm {
    padding: 2px 6px;
    font-size: 0.75rem;
    border-radius: 4px;
}

.btn-editor-icon {
    padding: 3px 5px;
    border-radius: 4px;
}

.btn-editor svg {
    flex-shrink: 0;
}

@keyframes editorPulse {
    from { opacity: 0.5; }
    to { opacity: 1; }
}
