.note-editor.panel { margin-bottom: 0; }
.dt_col_actions {
    white-space: nowrap !important;
    text-overflow: clip !important;
    overflow: visible !important;
}

/* Stile per textarea con aspetto codice */
.code-textarea-sql {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    background-color: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 4px !important;
    padding: 12px !important;
    color: #495057 !important;
    tab-size: 4;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    overflow-x: auto;
    word-break: break-word;
}

/* Stili per textarea quando ha il focus (visibile) */
.code-textarea-sql:not(.overlay-active) {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    background-color: #ffffff !important;
    border: 1px solid #80bdff !important;
    border-radius: 4px !important;
    padding: 12px !important;
    color: #495057 !important;
    tab-size: 4;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    overflow-x: auto;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
    word-break: break-word;
}

.code-textarea-sql:focus {
    border-color: #80bdff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
    outline: 0 !important;
    color: transparent !important;
    caret-color: black !important;
    background: none !important;
    z-index: 3;
    position: relative;
}

/* Container per evidenziazione SQL con Highlight.js */
.sql-highlight-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.sql-highlight-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 0 !important;
    background: #f8f9fa !important;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-family: Monaco, Menlo, "Ubuntu Mono", Consolas, "source-code-pro", monospace !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    overflow-x: auto;
    overflow-y: auto;
    pointer-events: auto;
    z-index: 2;
    word-break: break-word;
}

.sql-highlight-overlay code {
    background: transparent !important;
    padding: 12px !important;
    height: 100% !important;
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Nasconde la textarea quando l'overlay è attivo */
.sql-highlight-container .code-textarea-sql.overlay-active {
    color: transparent !important;
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    z-index: 1;
}
