/* static/style.css */

body {
    font-size: 18px !important; 
    font-family: Arial, sans-serif;
    background-color: #2b2b2b;
    color: #f1f1f1;
    margin: 0;
    padding: 0;
}

header {
    background-color: #1e1e1e;
    padding: 10px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 15px;
    position: relative;
}

nav ul li a {
    color: #f1f1f1;
    text-decoration: none;
    font-weight: bold;
}

nav ul li a:hover {
    color: #ff9800;
}

nav ul li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #1e1e1e;
    padding: 10px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

nav ul li:hover ul {
    display: block;
}

nav ul li ul li {
    margin: 0;
}

nav ul li ul li a {
    padding: 10px 20px;
    display: block;
}

nav ul li ul li a:hover {
    background-color: #444;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

.main-content {
    display: flex;
    flex-direction: row;
    height: calc(100vh - 200px);
    margin-bottom: 20px;
}

.editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-right: 10px;
}

.output-container {
    width: 300px;
    min-width: 200px;
    max-width: 50%;
    position: relative;
    background-color: #1e1e1e;
    border: 2px solid #444;
    border-radius: 8px;
    padding: 20px;
    overflow: hidden;
}

.resize-handle {
    position: absolute;
    left: -5px;
    top: 0;
    bottom: 0;
    width: 10px;
    cursor: ew-resize;
}

.blockly-area {
    flex: 1;
    min-height: 200px;
    border: 2px solid #444;
    border-radius: 8px;
    background-color: #1e1e1e;
}

#code-output {
    width: 100%;
    height: calc(100% - 40px);
    border: none;
    background-color: transparent;
    padding: 10px;
    overflow: auto;
    white-space: pre;
}

.serial-monitor-container {
    height: 200px;
}

.serial-monitor {
    height: calc(100% - 40px);
    width: 100%;
    overflow-y: scroll;
    background: #f1f1f1;
    color: #000;
    padding: 10px;
    border: 2px solid #444;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
}

h2 {
    color: #ffffff;
}

.blocklyText {
    fill: #000000 !important;
}

select, button {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    background-color: #444;
    color: #f1f1f1;
    border: none;
    border-radius: 4px;
}

.hljs {
    background: #1e1e1e;
    color: #f1f1f1;
}

.blocklyTreeLabel {
    color: #ffffff;
    font-weight: bold;
    font-size: 16px !important; /* Aumenta o tamanho da fonte das categorias */
    line-height: 1.5 !important; /* Ajusta o espaçamento entre linhas */
    white-space: normal !important;
    word-wrap: break-word !important;
}

/* Ajuste o tamanho mínimo dos blocos no flyout para evitar cortes */
.blocklyFlyoutButton {
    min-width: 200px !important;
}

.blocklyTreeRow {
    height: auto !important; /* Permite que a altura da linha se ajuste ao conteúdo */
    min-height: 32px !important; /* Define uma altura mínima para as linhas */
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

/* Aumenta o tamanho da fonte dos blocos no flyout */
.blocklyFlyoutButton .blocklyText {
    font-size: 14px !important;
}

.blocklyFlyoutLabelText {
    font-size: 14px !important;
}

/* Ajusta o tamanho da fonte dos textos dentro dos blocos */
.blocklyText {
    font-size: 12px !important;
}

/* Ajusta o tamanho dos campos de entrada nos blocos */
.blocklyHtmlInput {
    font-size: 12px !important;
}

/* Aumenta o tamanho do ícone de expansão das categorias */
.blocklyTreeIconOpen,
.blocklyTreeIconClosed {
    width: 20px !important;
    height: 20px !important;
}

/* Ajusta o espaçamento dentro do toolbox */
.blocklyToolboxDiv {
    width: 250px !important; /* Aumente este valor conforme necessário */
    padding: 5px !important;
}

/* Ajuste o layout do workspace para acomodar o toolbox mais largo */
.blocklyWorkspace {
    left: 250px !important; /* Deve ser o mesmo valor da largura do toolbox */
}



/* Ajustes adicionais para melhorar a aparência */
#upload-button {
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
}

#upload-button:hover {
    background-color: #45a049;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #ddd;
}

/* Estilos para tornar a interface mais responsiva */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .editor-container, .output-container {
        width: 100%;
        max-width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
    }

    .resize-handle {
        display: none;
    }
}

/*Controls*/
.arduino-controls-container {
    font-size: 18px !important; 
    margin-bottom: 20px;
    background-color: #333;
    padding: 15px;
    border-radius: 8px;
}

.control-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    flex: 0 0 150px;
    margin-right: 15px;
    color: #f1f1f1;
}

.input-button-group {
    display: flex;
    flex: 1;
}

.input-button-group select {
    font-weight: bold; !important;
    font-size: 30;
    flex: 1;
    margin-right: 10px;
    padding: 8px;
    background-color: #444;
    color: #f1f1f1;
    border: 1px solid #555;
    border-radius: 4px;
}

.input-button-group button {
    font-weight: bold; !important;
    font-size: 30;
    padding: 8px 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.input-button-group button:hover {
    background-color: #45a049;
}

#connect-button {
    background-color: #2196F3;
}

#connect-button:hover {
    background-color: #1976D2;
}

#upload-button {
    background-color: #FF9800;
}

#upload-button:hover {
    background-color: #F57C00;
}
