.text-block {
    /* min-height: 1.5em; */
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    outline: none;
    transition: background-color 0.15s;
    cursor: default !important;
    white-space: normal;
    word-break: break-all;
    position: relative;
}

.text-block:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.text-block.focused {
    background-color: rgba(0, 0, 0, 0.05);
}

.text-block:empty::before {
    content: "Type '/' for commands...";
    color: #4b4b4b;
    opacity: 0.4;
    pointer-events: none;
}

.text-block-p {
    font-size: 1rem;
}

.text-block-h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 1.5em 0 0.5em 0;
}

.text-block-h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 1.25em 0 0.4em 0;
}

.text-block-h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1em 0 0.3em 0;
}

.text-block-bullet {
    padding-left: 1.5rem;
    position: relative;
}

.text-block-bullet::before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: #2383e2;
}

.text-block-numbered {
    padding-left: 1.5rem;
    position: relative;
    counter-increment: list-item;
}

.text-block-numbered::before {
    content: "1.";
    position: absolute;
    left: 0.25rem;
    color: #2383e2;
    font-size: 0.9em;
}

.text-block-quote {
    border-left: 3px solid #2383e2;
    padding-left: 1rem;
    color: #4b4b4b;
    font-style: italic;
}

.text-block-todo {
    /* TODO: implement checkbox styles if needed */
}

/* Estilos para listas HTML nativas */
.text-block ul,
.text-block ol {
    margin: 0;
    padding-left: 1.5rem;
}

.text-block ul li,
.text-block ol li {
    /* margin: 0.25rem 0; */
}

.text-block ul {
    list-style-type: disc;
}

.text-block ol {
    list-style-type: decimal;
}

/* Sublistas aninhadas (nested lists) */
.text-block ul ul,
.text-block ol ol,
.text-block ul ol,
.text-block ol ul {
    /* margin-top: 0.25rem; */
    /* margin-bottom: 0.25rem; */
    padding-left: 1.5rem;
}

/* Diferentes estilos de bullet para níveis aninhados */
.text-block ul ul {
    list-style-type: circle;
}

.text-block ul ul ul {
    list-style-type: square;
}

/* Color Picker Styles */
.text-block.rendered-mode {
    cursor: default;
}

.text-block.markdown-mode {
    cursor: text !important;
}

.hex-highlight {
    background: rgba(35, 131, 226, 0.1);
    border-radius: 3px;
    padding: 0 2px;
    cursor: pointer;
    border-bottom: 1px dashed #2383e2;
}

.color-picker-popup {
    position: absolute;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 150px;
}

.color-picker-popup input[type="color"] {
    width: 100%;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    background: none;
}

.color-picker-popup input[type="text"] {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: monospace;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.color-picker-header {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
