/* Reset and basic styles */
html, body {
    height: 100%;
    margin: 0;
    font-family: Arial, sans-serif;
}

/* Header styles */
#header {
    height: 56px; /* Approximately 2 cm */
    background-color: #2d2d2d;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
    flex-shrink: 0;
}

#header-left {
    display: flex;
    align-items: center;
}

.logo {
    height: 40px; /* Adjust as needed */
    margin-right: 15px;
    cursor: pointer;
    transition: transform 0.2s;
}

.logo:hover {
    transform: scale(1.05);
}

#header-right {
    display: flex;
    align-items: center;
}


/* Dropdown styles */
#example-selector {
    margin-right: 10px;
    padding: 5px;
    font-size: 1em;
}

/* Label for the dropdown */
#example-label {
    margin-right: 5px;
}

/* Run Button styles */
#run-button {
    padding: 8px 16px;
    font-size: 1em;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

/* Main container below header */
#main-container {
    display: flex;
    height: calc(100% - 56px); /* Subtract header height */
    width: 100%;
}

/* Split container */
#editor-and-canvas-container
{
    display: flex;
    height: 100%;
    width: 100%;
    flex-grow: 1;
}

#editor-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

#editor {
    flex-grow: 1;
    overflow: auto;
}

#error-output {
    background-color: #f8d7da; /* Light red background */
    color: #721c24; /* Dark red text */
    border: 1px solid #f5c6cb; /* Border similar to background */
    padding: 10px;
    font-family: Consolas, monospace;
    font-size: 0.9em;
    max-height: 150px;
    overflow-y: auto;
    /* Remove the display property to let the .hidden class control visibility */
    /* display: none; */
    white-space: pre-wrap; /* Preserve formatting */
    position: relative;
}

/* Close button for error output */
#close-error {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.2em;
    color: #721c24;
    cursor: pointer;
}

#close-error:hover {
    color: #491217;
}

/* Utility class to hide elements */
.hidden {
    display: none;
}

/* Loading Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000; /* Ensure it overlays other content */
}

.modal-content {
    background-color: #fff;
    padding: 20px 30px;
    border-radius: 8px;
    text-align: center;
    width: 300px;
}

#progress-container {
    width: 100%;
    background-color: #ddd;
    border-radius: 5px;
    margin: 20px 0;
}

#progress-bar {
    width: 0%;
    height: 20px;
    background-color: #4CAF50;
    border-radius: 5px;
    transition: width 0.3s;
}

/* Canvas Styles */
#canvas-container {
    position: relative;
    height: 100%;
    width: 100%;
}

#canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Optional: Style for gutter */
.gutter {
    background-color: #eee;
    background-repeat: no-repeat;
    background-position: 50%;
}
.gutter.gutter-horizontal {
    cursor: col-resize;
    width: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #header {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }
    #header-left, #header-right {
        margin-bottom: 10px;
    }
    #run-button {
        width: 100%;
    }
}
