/*@import "configuration.less";*/
* {
-webkit-box-sizing: border-box;
   -moz-box-sizing: border-box;
        box-sizing: border-box;
}

html, body {
    width: 100%;      /*provides the correct work of a full-screen layout*/ 
    height: 100%;     /*provides the correct work of a full-screen layout*/
    overflow: hidden; /*hides the default body's space*/
    margin: 0px;      /*hides the body's scrolls*/
    /* Largura mínima para evitar colapso do layout de 3 colunas */
    min-width: 700px;
}
	 
#canvas {
    padding: 0px;
    margin: 0px;
    border: 0px;
    position: absolute;
    top: 0px;
    right: 0px;
    left: 0px;
    bottom: 0px;
    overflow: scroll;
    background-color: transparent;
}

/* ─── Painel esquerdo (ELEMENTS) — scroll vertical ─── */
#palette {
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
    box-sizing: border-box;
    padding: 4px 0;
}

/* ─── Painéis centrais (REPORT e GRAPH) — scroll vertical ─── */
#report_panel,
#graph_panel {
    overflow-y: auto !important;
    overflow-x: hidden;
    height: 100%;
    box-sizing: border-box;
}

/* ─── Painéis direitos (DATA e SETTINGS) — scroll vertical ─── */
#data_panel,
#settings_panel {
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
    box-sizing: border-box;
}

#data_panel > div,
#settings_panel > div {
    overflow-y: auto !important;
    overflow-x: hidden;
    height: 100%;
    box-sizing: border-box;
}

/* ─── Corrige painel direito dhtmlx que some em telas menores ─── */
/* O dhtmlx 3W usa células a/b/c; garante que a célula c (direita) seja visível */
.dhx_cell_layout {
    min-width: 0 !important;
}

/* Garante que o container do layout não fique com largura negativa */
.dhtmlx_layout_cont {
    min-width: 700px;
}

/* ─── Ícones no palette ─── */
.palette_node_element {
    border: none;
    background-color: transparent;
    padding: 10px 4px;
    cursor: move;
    width: 90px;
    margin: 12px auto;
    text-align: center;
    border-radius: 6px;
    transition: background-color 0.15s;
}
.palette_node_element:hover {
    background-color: rgba(0,0,0,0.06);
}

/* BUS e TRAFO: exibir na horizontal (rotacionar 90°) */
.palette_node_element.bus-icon svg,
.palette_node_element.bus-icon img {
    transform: rotate(90deg);
    display: inline-block;
}

.palette_node_element.trafo-icon svg,
.palette_node_element.trafo-icon img {
    transform: rotate(90deg);
    display: inline-block;
}

.shadow {
    -moz-box-shadow: 3px 3px 4px #000;
    -webkit-box-shadow: 3px 3px 4px #000;
    box-shadow: 3px 3px 4px #000;
    -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='#000000')";
    filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='#000000');
}

/* ─── Spinner de loading ─── */
@keyframes ndse-spin {
    to { transform: rotate(360deg); }
}

/* ─── Overlay de simulação ─── */
#sim_loading_overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#sim_loading_overlay .ndse-spinner {
    width: 48px;
    height: 48px;
    border: 5px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ndse-spin 0.8s linear infinite;
    margin-bottom: 16px;
}

#sim_loading_overlay .ndse-loading-msg {
    color: #fff;
    font-size: 16px;
    font-family: Arial, sans-serif;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* ─── Modais ─── */
.ndse-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.ndse-modal-box {
    background: #fff;
    border-radius: 8px;
    padding: 24px 28px;
    max-width: 560px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    position: relative;
}

.ndse-modal-box h2 {
    margin: 0 0 12px;
    font-size: 18px;
    color: #2c3e50;
}

.ndse-modal-box h3 {
    margin: 14px 0 6px;
    font-size: 14px;
    color: #34495e;
}

.ndse-modal-box p, .ndse-modal-box li {
    font-size: 13px;
    line-height: 1.6;
    color: #555;
}

.ndse-modal-box ul {
    padding-left: 18px;
    margin: 4px 0;
}

.ndse-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #888;
    line-height: 1;
}

.ndse-modal-close:hover {
    color: #333;
}

/* ─── Botões Save — feedback visual ─── */
.ndse-btn-save {
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.ndse-btn-save:hover {
    background: #2980b9;
}
.ndse-btn-save:active {
    transform: scale(0.97);
}
.ndse-btn-save.saved {
    background: #27ae60 !important;
    transition: background 0s;
}

.palette_node_element {
    position: relative;
}

/* ─── Formulários no painel direito ─── */
#data_panel input[type="text"],
#data_panel input[type="number"],
#data_panel select {
    width: 100%;
    padding: 4px 6px;
    font-size: 12px;
    border: 1px solid #bdc3c7;
    border-radius: 3px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
#data_panel input:focus,
#data_panel select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52,152,219,0.15);
}

/* ─── Tabela de resultados do Load Flow ─── */
#lf_results_table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    margin-top: 8px;
}
#lf_results_table th {
    background: #2c3e50;
    color: #fff;
    padding: 5px 6px;
    text-align: center;
    font-weight: 600;
}
#lf_results_table td {
    padding: 4px 6px;
    text-align: center;
    border-bottom: 1px solid #ecf0f1;
}
#lf_results_table tr:hover td {
    background: #eaf4fb;
}

/* ─── Gráfico TA ─── */
#ta_chart_container {
    margin-top: 8px;
    border: 1px solid #ecf0f1;
    border-radius: 4px;
    padding: 8px;
    background: #fafafa;
}
