/* Contenedor principal de escritura por página */
.escritura-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 1280px;
    height: 720px;
    z-index: 2;
    background: transparent;
}
/* Bloque de texto visible dentro de tu aplicación */
.bloque-texto {
    position: absolute;
    min-width: 100px;
    min-height: 32px;
    padding: 6px 8px;
    border: 1.5px dashed #007bff; /* Borde siempre visible en tu app */
    border-radius: 4px;
    outline: none;
    font-family: Arial, sans-serif;
    font-size: 18px;
    color: #000000;
    background: rgba(255, 255, 255, 0.4); /* Semitransparente para ver dónde está */
    box-sizing: border-box;
    cursor: move;
    z-index: 10;
}

.bloque-texto:hover,
.bloque-texto:focus-within {
    border-style: solid;
    border-color: #0056b3;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Barra superior de controles (Nivel + Eliminar) dentro de la app */
.controles-bloque {
    position: absolute;
    top: -28px;
    right: 0;
    display: flex; /* Siempre visible al interactuar con el bloque */
    gap: 4px;
    background: #ffffff;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #007bff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 100;
    user-select: none;
    align-items: center;
}

.btn-eliminar-bloque {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
}

.btn-eliminar-bloque:hover {
    background: #bd2130;
}

.select-nivel-bloque {
    font-size: 11px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: white;
    color: #333;
    cursor: pointer;
    outline: none;
}

.contenido-editable {
    outline: none;
    word-break: break-word;
    white-space: pre-wrap;
    min-height: 24px;
    cursor: text;
}
