/**
* @license
* Copyright 2020 Sébastien CANET
* SPDX-License-Identifier: BSD-3-Clause
*/

html, body {
    height: 100%;
}

body {
    font-family: sans-serif;
    font-size: large;
    font-weight: bold;
    margin: 0;
    overflow: hidden;
}

html[dir=rtl] {
    text-align: right;
}

/* Hide default Blockly zoom and trash SVG images - we use custom HTML buttons */
.blocklyZoom > image,
.blocklyZoom > svg > image,
.blocklyTrash > image,
.blocklyTrash > svg > image {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Custom Blockly Zoom Controls - Horizontal layout with trashcan */
.custom-blockly-zoom-controls {
    position: absolute !important;
    z-index: 1000 !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: blur(8px) !important;
    pointer-events: auto !important;
    align-items: center !important;
}

.custom-zoom-btn {
    width: 40px !important;
    height: 40px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: 1px solid #e5e7eb !important;
    color: #6b7280 !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

.custom-zoom-btn:hover {
    background: linear-gradient(to bottom, #f9fafb 0%, #f3f4f6 100%) !important;
    border-color: #ea580c !important;
    color: #ea580c !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.2) !important;
}

.custom-zoom-btn:active {
    transform: translateY(0) scale(0.95) !important;
    box-shadow: 0 1px 4px rgba(234, 88, 12, 0.15) !important;
}

.custom-zoom-btn i {
    width: 18px !important;
    height: 18px !important;
    transition: transform 0.2s ease !important;
}

.custom-zoom-btn:hover i {
    transform: scale(1.1) !important;
}

/* Custom Blockly Trashcan */
.custom-blockly-trashcan {
    position: absolute !important;
    z-index: 1000 !important;
    pointer-events: auto !important;
}

.custom-trash-btn {
    width: 40px !important;
    height: 40px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: 1px solid #e5e7eb !important;
    color: #6b7280 !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

.custom-trash-btn:hover {
    background: linear-gradient(to bottom, #fef2f2 0%, #fee2e2 100%) !important;
    border-color: #ef4444 !important;
    color: #ef4444 !important;
    transform: translateY(-2px) scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
}

.custom-trash-btn:active {
    transform: translateY(0) scale(0.95) !important;
    box-shadow: 0 1px 4px rgba(239, 68, 68, 0.15) !important;
}

/* Ensure trashcan button works when inside zoom controls */
.custom-blockly-zoom-controls .custom-trash-btn {
    width: 40px !important;
    height: 40px !important;
    pointer-events: auto !important;
}

/* Force horizontal layout - override any other rules */
.custom-blockly-zoom-controls {
    flex-direction: row !important;
}

.custom-blockly-zoom-controls > * {
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
}

.custom-trash-btn i {
    width: 18px !important;
    height: 18px !important;
    transition: transform 0.2s ease !important;
}

.custom-trash-btn:hover i {
    transform: scale(1.1) !important;
}
.TitleText {
    vertical-align: middle;
    color: #FFFFFF;
    font-size: x-large;
    font-weight: bold;
}
/* Popup box  */
.popup_bckgrd{
    background:rgba(0,0,0,.4);
    cursor:pointer;
    display:none;
    height:100%;
    position:fixed;
    text-align:center;
    top:0;
    width:100%;
    z-index:10000;
}
.popup_bckgrd > div {
    background-color: #fff;
    box-shadow: 10px 10px 60px #555;
    display: inline-block;
    height: auto;
    max-width: 551px;
    min-height: 100px;
    /* vertical-align: middle; */
    width: 60%;
    position: relative;
    border-radius: 8px;
    padding: 15px 5%;
}
#menuButton.active{
    transform: rotate(90deg);
}
#buttonsMenuPopup{
    animation: fadein 0.5s;
    position: fixed;
    top: 80px;
    left: 80px;
    padding: 10px;
    margin: 0;
    width: auto;
    z-index: 10001;
    background-color: #fff !important;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
#buttonsToolsPopup{
    animation: fadein 0.5s;
    position: fixed;
    top: 80px;
    left: 80px;
    padding: 10px;
    margin: 0;
    width: auto;
    z-index: 10001;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
#buttonsIotPopup{
    animation: fadein 0.5s;
    position: fixed;
    top: 80px;
    left: 80px;
    padding: 10px;
    margin: 0;
    width: auto;
    z-index: 10001;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
@keyframes fadein {
    from {opacity:0;} to {opacity:1;}
}
.menu_text{
    color: white;
    display: inline; 
}
.menu_div{
    align-content: start;
    text-align: left;
}
/*****************/
/*  Sketch name  */
/*****************/
.sketch_name_wrapper {
  display: inline-block;
  padding-left: 5px;
}
.sketch_name_icon {
  display: inline !important;
  font-size: 1.2rem !important;
  float: right;
  padding-top: 3px;
}
.sketch_name {
  width: auto !important;
  max-width: 400px;
  line-height: 64px;
  height: 3rem !important;
  font-size: 1.5rem !important;
  border-bottom: 0px solid #EEE !important;
  font-style: italic;
}
.sketch_name:focus {
    border-bottom: 1px solid #EEE !important;
}
@media only screen and (min-width: 0px) and (max-width: 600px) {
  .sketch_name {
    max-width: 200px;
  }
  /* Remove the title only leaving the sketch name */
  .app_title {
    display: none;
  }
}
@media only screen and (min-width : 600px) {
  .sketch_name {
    max-width: 275px;
  }
}
@media only screen and (min-width : 993px) {
  .sketch_name {
    max-width: 350px;
  }
}

#globalTable {
    width: 100%;
    height: 100%;
}
#optionsTop {
    height: 30px;
}
#optionsTopTitle {
    width: 268px;
    white-space: nowrap;
}
#optionsTopInteractiveHelp {
    width: 100%;
}
#functionsIcons {
    height: 30px;
}
#globalWorkspace {
    width: 100%;
    height: 100%;
}
/* ace editor */
.ace_content{
    left: 0px !important;
}
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, #e5e7eb 0%, #d1d5db 100%);
  -webkit-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 26px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: linear-gradient(to bottom, #ffffff 0%, #f9fafb 100%);
  -webkit-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.1);
}

input:checked + .slider {
  background: linear-gradient(to bottom, #fb923c 0%, #ea580c 100%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 0 0 3px rgba(251, 146, 60, 0.1);
}

input:checked + .slider:before {
  -webkit-transform: translateX(22px);
  -ms-transform: translateX(22px);
  transform: translateX(22px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), 0 1px 3px rgba(0, 0, 0, 0.15);
}

.slider:hover {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 0 2px rgba(0, 0, 0, 0.05);
}

input:checked + .slider:hover {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 0 0 3px rgba(251, 146, 60, 0.15);
}

/* Table */
.table_wrapper {
    height: -moz-calc(100%);
    width: -moz-calc(100%);
    /* WebKit */
    height: -webkit-calc(100%);
    width: -webkit-calc(100%);
    /* Opera */
    height: -o-calc(100%);
    width: -o-calc(100%);
    /* Standard */
    height: calc(100%);
    width: calc(100%);
    padding: 0px;
}
table {
    border-collapse: collapse;
    margin: 0;
    padding: 0;
    border: none;
    position: relative;
    /* Firefox */
    height: -moz-calc(100% - 40px);
    width: -moz-calc(100% - 40px);
    /* WebKit */
    height: -webkit-calc(100% - 40px);
    width: -webkit-calc(100% - 40px);
    /* Opera */
    height: -o-calc(100% - 40px);
    width: -o-calc(100% - 40px);
    /* Standard */
    height: calc(100% - 5px);
    width: calc(100% - 5px);
}
table table {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
}
td {
    padding: 2px;
    vertical-align: middle;
}

td.tabMiddle {
    border-top-style: none !important;
    border-left-style: none !important;
    border-right-style: none !important;
    padding-right: 5px;
    text-align: center;
    vertical-align: middle;
}

#separator {
    cursor: col-resize;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='30'><path d='M2 0 v30 M5 0 v30 M8 0 v30' fill='white' stroke='white'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    width: 15px;
    min-width: 15px;
    height: 100%;
    /* prevent browser's built-in drag from interfering */
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#content_hoverButton {
    margin: 5px;
    padding: 10px;
    border-radius: 4px;
    font-size: x-large;
    color: #FFFFFF;
}
/* Help modal */
.helpModal {
    background-color: #ebebeb;
    border: 1px solid black;
    padding: 1em;
    text-align: center;
    width: 500px;
    height: auto;
    position: fixed; /* Stay in place */
    z-index: 200; /* Sit on top */
    /* Firefox */
    left: -moz-calc(50% - 500px);
    /* WebKit */
    left: -webkit-calc(50% - 500px);
    /* Opera */
    left: -o-calc(50% - 500px);
    /* Standard */
    left: calc(50% - 500px);
    top: -100%;
    opacity: 0;
    transition: top 0.5s, opacity 0.4s;
}
.helpModal.show {
    /* Firefox */
    top: -moz-calc(50% - 325px);
    /* WebKit */
    top: -webkit-calc(50% - 325px);
    /* Opera */
    top: -o-calc(50% - 325px);
    /* Standard */
    top: calc(50% - 325px);
    opacity: 1;
}
#helpModal_header {
    padding: 5px;
    cursor: move;
    z-index: 10;
    color: #fff;
}
/* modal buttons */
#boardListModalDialogOkay{
    border: none;
    font-size: x-large;
    background-color: #4CAF50;
    border-radius: 12px;
    box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);
    margin: 5px;
    position: relative;
    left: 88px;
}
#portListModalDialogOkay{
    border: none;
    font-size: large;
    background-color: #10b981;
    color: white;
    border-radius: 12px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.1);
    font-weight: 500;
}

#portListModalDialogOkay:hover {
    background-color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15), 0 6px 12px rgba(0,0,0,0.15);
}

#portListModalDialogOkay:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Content blocks */
.content_wrapper {
    height: 100%;
    width: 100%;
    background-color: #eee;
    display: flex;
    flex-wrap: wrap;
    min-height: 100%;
}
.wrapper_up {
    width: 100%;
    /* Firefox */
    height: -moz-calc(100% - 41px);
    /* WebKit */
    height: -webkit-calc(100% - 41px);
    /* Opera */
    height: -o-calc(100% - 41px);
    /* Standard */
    height: calc(100% - 41px);
    min-height: 5px;
    display: flex;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    flex: 1 1 auto !important;
}
.content_blocks{
    width: 100% !important;
    overflow: hidden;
}
#content_area{
    width: calc(100% - 50px);
    height: 100%;
    min-width: 10px;
}
    
/* side panel */
.side_content {
    min-width: 10px;
    height: 97%;
    right: 0px;
    bottom: 0px;
    padding: 5px;
    margin: 0;
    border: 0;
    background-color: #ffffff;
    overflow: auto !important;
}
/* Hide scrollbars when panel is closed */
.panel[style*="max-height: 0"],
.panel[style*="max-height:0"],
.panel:not([style*="max-height"]):not([style*="px"]) {
    overflow: hidden !important;
}
.panel[style*="max-height: 0"] .side_content,
.panel[style*="max-height:0"] .side_content {
    overflow: hidden !important;
}
.config_content {
    margin: 5px;
}
#content_code {
    width: 100%;
    height: 100%;
    min-width: 5px;
}

/* Tab Styles */
.tab-button {
    position: relative;
    transition: all 0.2s ease;
    cursor: pointer;
}

.tab-button:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.tab-button.active {
    color: #1e40af !important;
    font-weight: 600;
}

/* Code editor tab buttons - minimal icon design matching image */
.tab-button-icon {
    cursor: pointer !important;
    border: none !important;
    outline: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.15s ease !important;
    min-width: 28px !important;
    min-height: 28px !important;
}

.tab-button-icon.active {
    background: hsl(210 40% 96.1%) !important;
    color: hsl(222.2 47.4% 11.2%) !important;
}

.tab-button-icon:hover {
    background: hsl(210 40% 96.1%) !important;
}

.tab-button-icon:focus-visible {
    outline: 2px solid hsl(221.2 83.2% 53.3%) !important;
    outline-offset: 2px !important;
}

/* Toggle button group styling - matching provided HTML structure */
.toggle-button-group {
    display: flex !important;
    align-items: center !important;
    border: 1px solid rgba(229, 231, 235, 0.8) !important;
    border-radius: 0.5rem !important;
    overflow: hidden !important;
    background: #f9fafb !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    padding: 0.125rem !important;
}

.toggle-button-group .has-icon {
    cursor: pointer !important;
    border: none !important;
    outline: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 0.5rem 0.75rem !important;
    background: transparent !important;
    color: #6b7280 !important;
    border-radius: 0.375rem !important;
    margin: 0 0.125rem !important;
    position: relative !important;
}

.toggle-button-group .has-icon:last-child {
    margin-right: 0 !important;
}

.toggle-button-group .has-icon.active {
    background: linear-gradient(to bottom, #ffffff 0%, #f9fafb 100%) !important;
    color: #ea580c !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06) !important;
    font-weight: 500 !important;
}

.toggle-button-group .has-icon:hover:not(.active) {
    background: rgba(255, 255, 255, 0.6) !important;
    color: #374151 !important;
}

.toggle-button-group .has-icon:focus-visible {
    outline: 2px solid #3b82f6 !important;
    outline-offset: -2px !important;
}

/* Code toolbar styling */
.cdk-code-toolbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border-bottom: 1px solid rgba(229, 231, 235, 0.8) !important;
    padding: 0.75rem 1rem !important;
    background: linear-gradient(to bottom, #ffffff 0%, #fafafa 100%) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    backdrop-filter: blur(10px) !important;
}

.cdk-code-tools {
    display: flex !important;
    align-items: center !important;
}

.tools-left {
    flex: 1 !important;
}

.tools-right {
    gap: 0.5rem !important;
    padding-right: 0.5rem !important;
}

/* Icon improvements */
.cdk-code-toolbar i[data-lucide] {
    transition: transform 0.2s ease !important;
}

.ui-button:hover i[data-lucide],
.toggle-button-group .has-icon:hover i[data-lucide] {
    transform: scale(1.05) !important;
}

.toggle-button-group .has-icon.active i[data-lucide] {
    transform: scale(1.1) !important;
}

.ui-button {
    cursor: pointer !important;
    border: none !important;
    outline: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 0.5rem 0.625rem !important;
    background: transparent !important;
    color: #6b7280 !important;
    border-radius: 0.375rem !important;
}

/* Remove all positioning from copy button */
#copyCodeButton {
    position: static !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
}

.ui-button:hover {
    background: linear-gradient(to bottom, #f9fafb 0%, #f3f4f6 100%) !important;
    color: #111827 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important;
}

.ui-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.ui-button:focus-visible {
    outline: 2px solid #3b82f6 !important;
    outline-offset: 2px !important;
}

.ui-button.invisible {
    visibility: hidden !important;
}

/* Right panel styling */
.right-panel {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    background: #ffffff !important;
    transition: width 0.3s ease, flex 0.3s ease !important;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.08) !important;
    border-left: 1px solid rgba(229, 231, 235, 0.6) !important;
}

.right-panel.collapsed {
    display: none !important;
}

.cdk-code-output {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.cdk-code {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    background: #ffffff !important;
}

.cdk-code-output {
    background: #ffffff !important;
    border-radius: 0 !important;
}

/* Restore Code Panel Button */
.restore-panel-btn {
    position: fixed !important;
    bottom: 20px !important;
    right: 12px !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: white !important;
   
    color: #4b5563 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    
    z-index: 1000 !important;
}

.restore-panel-btn:hover {
    background: #f3f4f6 !important;
    color: #111827 !important;
    transform: translateY(-2px) !important;
}

.restore-panel-btn:active {
    transform: translateY(0) !important;
}

/* Canvas expanded state - icons in corner */
.wrapper_up.canvas-expanded #customZoomControls {
    position: fixed !important;
    bottom: 80px !important;
    right: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
    background: white !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    z-index: 999 !important;
}

.wrapper_up.canvas-expanded #customZoomControls button {
    width: 36px !important;
    height: 36px !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: 1px solid #e5e7eb !important;
    color: #4b5563 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.wrapper_up.canvas-expanded #customZoomControls button:hover {
    background: #f3f4f6 !important;
    color: #111827 !important;
}

.wrapper_up.canvas-expanded #customZoomControls .zoom-separator {
    display: none !important;
}

.wrapper_up.canvas-expanded #customZoomControls .zoom-percentage {
    font-size: 11px !important;
    color: #6b7280 !important;
    padding: 4px 8px !important;
    background: #f9fafb !important;
    border-radius: 4px !important;
}

/* Smooth transition for content area width */
#content_area {
    transition: width 0.3s ease, flex 0.3s ease !important;
}

/* Content area when panel is visible (default state) */
#content_area.panel-visible {
    width: 70% !important;
    flex: 1 1 70% !important;
}

/* Content area when panel is collapsed (expanded canvas) */
#content_area.panel-collapsed {
    width: 100% !important;
    flex: 1 1 100% !important;
}

/* Right panel default state */
.right-panel:not(.collapsed) {
    width: 30% !important;
    flex: 0 0 30% !important;
}

.tab-content {
    display: flex;
    flex-direction: column;
    background: #ffffff !important;
    border-radius: 0 0 0 0 !important;
}

.tab-content.hidden {
    display: none !important;
}

/* Code editor container enhancement */
#tab-content-code {
    background: #ffffff !important;
    position: relative !important;
}

#tab-content-code::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(229, 231, 235, 0.5), transparent);
    z-index: 1;
}

/* Read/Write toggle labels enhancement */
.tools-center span {
    font-weight: 500 !important;
    letter-spacing: 0.025em !important;
    transition: color 0.2s ease !important;
}

.tools-center span:hover {
    color: #374151 !important;
}

/* Verbose Output Area */
#content_verbose {
    background: #1e1e1e;
    color: #4ade80;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    padding: 1rem !important;
    border-radius: 0 !important;
}

#content_verbose .error {
    color: #f87171;
}

#content_verbose .warning {
    color: #fbbf24;
}

#content_verbose .info {
    color: #60a5fa;
}

/* Serial Output Area */
#content_serial {
    background: #000000 !important;
    color: rgba(29, 147, 47, 1) !important;
    font-family: 'Courier New', monospace !important;
    padding: 1rem !important;
    border-radius: 0 !important;
    line-height: 1.6 !important;
}

/* Tab content header styling */
#tab-content-verbose > div:first-child,
#tab-content-serial > div:first-child {
    border-bottom: 1px solid rgba(229, 231, 235, 0.8) !important;
    background: linear-gradient(to bottom, #ffffff 0%, #fafafa 100%) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

#barre_h{
    cursor: row-resize;
    width: 100%;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='30' height='10'><path d='M0 2 h30 0 M0 5 h30 0 M0 8 h30 0' fill='none' stroke='black'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    /* prevent browser's built-in drag from interfering */
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
#detailedCompilation_span,
#boardSelected_span,
#portSelected_span{
    color: white;
    vertical-align: middle;
}

#content_serial {
    background: #000000;
    color: rgba(29, 147, 47, 1);
    width: 100%;
    height: 10px;
    min-height: 10px;
    white-space: pre-wrap;
    overflow-y: scroll;
}

/* The boards list modal (background) */
.modal {
    position: fixed; /* Stay in place */
    z-index: 200; /* Sit on top */
    width: 700px; /* Full width */
    height: 650px; /* Full height */
    /* Firefox */
    left: -moz-calc(50% - 350px);
    /* WebKit */
    left: -webkit-calc(50% - 350px);
    /* Opera */
    left: -o-calc(50% - 350px);
    /* Standard */
    left: calc(50% - 350px);
    overflow: hidden; /* Enable scroll if needed */
    top: -100%;
    opacity: 0;
    transition: top 0.5s, opacity 0.4s;
    pointer-events: none;
    visibility: hidden;
}
.modal:not(.show) {
    display: none !important;
}
.modal:not(.show) * {
    pointer-events: none !important;
}
.overlay{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    background-color: rgba(0,0,0,0.5); /*dim the background*/
    display: none;
    overflow: hidden;
    pointer-events: none;
}
.overlay[style*="display: block"] {
    pointer-events: auto;
}
.modal.show {
    /* Firefox */
    top: -moz-calc(50% - 325px);
    /* WebKit */
    top: -webkit-calc(50% - 325px);
    /* Opera */
    top: -o-calc(50% - 325px);
    /* Standard */
    top: calc(50% - 325px);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}
/* Modal Content/Box */
.modal-content {
    position: relative;
    background-color: #fefefe;
    -webkit-border-radius: 15px !important;
    -moz-border-radius: 15px !important;
    border-radius: 15px !important;
    padding: 5px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
}

/* Enhanced styling for port list modal */
#portListModal .modal-content {
    background-color: #ffffff !important;
    border-radius: 16px !important;
    padding: 0 !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden;
}
/* The Close Button */
.closeModal {
    color: #FFFFFF;
    float: right;
    font-size: 28px;
    font-weight: bold;
    -ms-transform: translateY(-20%);
    transform: translateY(-20%);
}
.closeModal:hover,
.closeModal:focus {
    color: #FFCC00;
    text-decoration: none;
    cursor: pointer;
}
/* Modal Header */
.modal-header {
    padding: 10px;
    color: white;
    border-radius: 15px !important;
    -webkit-border-radius: 15px !important;
    -moz-border-radius: 15px !important;
    border-top-left-radius: 15px !important;
    border-top-right-radius: 15px !important;
}
/* Modal Body */
.modal-body {
    padding: 5px;
}
/* Modal Footer */
.modal-footer {
    padding: 10px;
    color: white;
    border-radius: 15px !important;
    -webkit-border-radius: 15px !important;
    -moz-border-radius: 15px !important;
    border-top-left-radius: 15px !important;
    border-top-right-radius: 15px !important;
}

/* Port List Modal - White Theme Override */
#portListModal .modal-header {
    background-color: #ffffff !important;
    color: #111827 !important;
    border-bottom: 1px solid #e5e7eb !important;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px !important;
}

#portListModal .modal-header i {
    color: #3b82f6 !important;
    width: 20px;
    height: 20px;
}

#portListModal .modal-header span:not(.closeModal) {
    color: #111827 !important;
    font-weight: 600;
    font-size: 18px;
    flex: 1;
}

#portListModal .closeModal {
    color: #6b7280 !important;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

#portListModal .closeModal:hover,
#portListModal .closeModal:focus {
    color: #111827 !important;
    background: #f3f4f6;
    border-radius: 6px;
}

#portListModal .modal-body {
    padding: 20px !important;
    background-color: #ffffff !important;
    color: #374151 !important;
}

#portListModal .modal-footer {
    background-color: #ffffff !important;
    color: #111827 !important;
    border-top: 1px solid #e5e7eb !important;
    padding: 16px 20px !important;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
}

#portListModal #serialMenu {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background-color: #ffffff;
    color: #111827;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

#portListModal #serialMenu:hover {
    border-color: #3b82f6;
}

#portListModal #serialMenu:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#portListModal #serialMenu option {
    padding: 8px;
    background-color: #ffffff;
    color: #111827;
}

/* Setup Sidebar - Beautiful White Theme */
#lateral-panel-setup-bloc {
    background: #ffffff !important;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1), -2px 0 8px rgba(0, 0, 0, 0.08) !important;
}

#lateral-panel-setup-label {
    background: #ffffff !important;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px !important;
    height: 40px !important;
    top: 20px !important;
}

#lateral-panel-setup-label:hover {
    background: #f9fafb !important;
}

#lateral-panel-setup-label i {
    color: #3b82f6 !important;
    width: 20px;
    height: 20px;
}

#lateral-panel-setup-bloc .accordion {
    background-color: #f9fafb !important;
    color: #111827 !important;
    padding: 16px 20px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-bottom: 1px solid #e5e7eb !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    transition: all 0.2s ease !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#lateral-panel-setup-bloc .accordion:hover {
    background-color: #f3f4f6 !important;
    color: #111827 !important;
}

#lateral-panel-setup-bloc .accordion:after {
    content: "\02795"; /* Unicode character for "plus" sign (+) */
    font-size: 18px;
    color: #6b7280;
    transition: transform 0.3s ease;
}

#lateral-panel-setup-bloc .accordion.active:after {
    content: "\02796"; /* Unicode character for "minus" sign (-) */
    transform: rotate(0deg);
}

#lateral-panel-setup-bloc .config_content {
    background-color: #ffffff !important;
    color: #374151 !important;
    padding: 20px !important;
    margin: 0 !important;
}

#lateral-panel-setup-bloc .side_content {
    background-color: #ffffff !important;
    color: #374151 !important;
}

#lateral-panel-setup-bloc .UIText {
    color: #374151 !important;
    font-weight: 500;
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
    margin-top: 16px;
}

#lateral-panel-setup-bloc .UIText:first-child {
    margin-top: 0;
}

#lateral-panel-setup-bloc select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background-color: #ffffff;
    color: #111827;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    margin-bottom: 12px;
}

#lateral-panel-setup-bloc select:hover {
    border-color: #3b82f6;
}

#lateral-panel-setup-bloc select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#lateral-panel-setup-bloc select option {
    padding: 8px;
    background-color: #ffffff;
    color: #111827;
}

#lateral-panel-setup-bloc input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin: 12px 0;
}

#lateral-panel-setup-bloc input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

#lateral-panel-setup-bloc input[type="range"]::-webkit-slider-thumb:hover {
    background: #2563eb;
    transform: scale(1.1);
}

#lateral-panel-setup-bloc input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

#lateral-panel-setup-bloc input[type="range"]::-moz-range-thumb:hover {
    background: #2563eb;
    transform: scale(1.1);
}

#lateral-panel-setup-bloc input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3b82f6;
    margin-right: 8px;
}

#lateral-panel-setup-bloc input[type="checkbox"]:checked {
    accent-color: #3b82f6;
}

#lateral-panel-setup-bloc .panel {
    background-color: #ffffff !important;
    padding: 0 20px !important;
    border-top: 1px solid #e5e7eb;
}

#lateral-panel-setup-bloc form {
    background-color: transparent !important;
}

#lateral-panel-setup-bloc br {
    display: none;
}

/* CLI Section Styling */
#lateral-panel-setup-bloc .CLI {
    background-color: #ffffff !important;
}

#lateral-panel-setup-bloc .iconButtons.CLI {
    background-color: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 10px !important;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #374151 !important;
    margin: 4px;
}

#lateral-panel-setup-bloc .iconButtons.CLI:hover {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

#lateral-panel-setup-bloc .iconButtons.CLI i {
    color: inherit !important;
}

#lateral-panel-setup-bloc .controlPanelInput {
    width: 100% !important;
    padding: 10px 14px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    background-color: #ffffff !important;
    color: #111827 !important;
    font-size: 14px !important;
    transition: all 0.2s ease;
    margin-bottom: 8px;
    box-sizing: border-box;
}

#lateral-panel-setup-bloc .controlPanelInput:hover {
    border-color: #3b82f6;
}

#lateral-panel-setup-bloc .controlPanelInput:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#lateral-panel-setup-bloc #CLI_title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

#lateral-panel-setup-bloc #CLI_githubLinkButton {
    margin-left: auto;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

#lateral-panel-setup-bloc #CLI_githubLinkButton:hover {
    opacity: 1;
}

/* Scrollbar styling for setup panel */
#lateral-panel-setup-bloc::-webkit-scrollbar {
    width: 8px;
}

#lateral-panel-setup-bloc::-webkit-scrollbar-track {
    background: #f9fafb;
}

#lateral-panel-setup-bloc::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

#lateral-panel-setup-bloc::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Examples UI - Beautiful, Crisp, and Neat Styling */
#examples-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

.example-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 0 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06) !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    overflow: hidden !important;
    margin-bottom: 10px !important;
    width: 100% !important;
}

.example-card:last-child {
    margin-bottom: 0 !important;
}

.example-card:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-2px) !important;
}

.example-card:active {
    transform: translateY(0) scale(0.98) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

.example-card > div:first-child {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.example-card h4 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
    max-width: 100% !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

#examples-grid {
    background: #f9fafb !important;
}

#examples-grid::-webkit-scrollbar {
    width: 8px;
}

#examples-grid::-webkit-scrollbar-track {
    background: #f9fafb;
}

#examples-grid::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

#examples-grid::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Modal board selector information */
#boardDescriptionSelector {
    overflow: auto;
}
#hideSelectScrollbar {
    display: inline-block;
    vertical-align: top;
    overflow: hidden;
    border: solid grey 1px;
}
#hideSelectScrollbar > select {
    padding: 10px;
}
#board_mini_picture_div {
    position:absolute;
    right:65px;
    width:166px;
    height:266px;
}
#board_mini_picture {
    text-align: center;
    width:166px;
    height:266px;
    object-fit: contain;
}
.modalBoard_info {
    left: 380px;
    position: absolute;
}
/* collapsible content inside div */
.collapsibleButton {
    color: #FFFFFF;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: large;
    font-weight: bold;
}
/* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */
.active, .collapsibleButton:hover {
    background-color: #FFCC00;
    color: #000000;
}
/* Style the collapsible content. Note: hidden by default */
.collapsibleContent {
    visibility: hidden;
    padding: 0 18px;
    background-color: white;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.1s ease-out;
}
.collapsibleButton:after {
    content: '\02795'; /* Unicode character for "plus" sign (+) */
    float: left;
    padding-right: 5px;
    transition: 0.1s ease-out;
}
.active:after {
    transform: rotateZ(45deg);
    transition: 0.1s ease-out;
}

/* ============================================
   SIDEBAR LAYOUT STYLES (Tailwind Enhanced)
   ============================================ */

/* Custom scrollbar for sidebar */
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Fade in animation for popups */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.2s ease-out;
}

/* Active button state for sidebar */
.sidebar-icon-btn.active {
    background: rgba(59, 130, 246, 0.4) !important;
    border-color: rgba(59, 130, 246, 0.6) !important;
}

/* Override old styles that conflict with Tailwind */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Sidebar Styles */
.sidebar {
    width: 70px;
    background: linear-gradient(180deg, #1e3a5f 0%, #2c5282 100%);
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
}

.sidebar-header {
    padding: 15px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.sidebar-logo img {
    width: 30px;
    height: 30px;
    filter: brightness(0) invert(1);
}

.sidebar-title {
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav {
    flex: 1;
    padding: 10px 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom scrollbar for sidebar */
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.ace_editor {
    position: static!important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-family: 'Inter', "Fira Code", "JetBrains Mono", "Segoe UI", monospace !important;
    line-height: 1.6 !important;
    color: #0f172a !important;
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08) !important;
}

/* Custom scrollbar for Ace Editor */
.ace_scrollbar {
    width: 12px !important;
}

.ace_scrollbar-inner {
    background: transparent !important;
}

.ace_scrollbar-v {
    right: 0 !important;
    width: 12px !important;
}

.ace_scrollbar-h {
    bottom: 0 !important;
    height: 12px !important;
}

/* Custom scrollbar thumb styling */
.ace_scrollbar::-webkit-scrollbar,
.ace_editor ::-webkit-scrollbar {
    width: 12px !important;
    height: 12px !important;
}

.ace_scrollbar::-webkit-scrollbar-track,
.ace_editor ::-webkit-scrollbar-track {
    background: rgba(249, 250, 251, 0.8) !important;
    border-radius: 6px !important;
    margin: 2px !important;
}

.ace_scrollbar::-webkit-scrollbar-thumb,
.ace_editor ::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #d1d5db 0%, #9ca3af 100%) !important;
    border-radius: 6px !important;
    border: 2px solid rgba(249, 250, 251, 0.8) !important;
    transition: background 0.2s ease !important;
}

.ace_scrollbar::-webkit-scrollbar-thumb:hover,
.ace_editor ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #9ca3af 0%, #6b7280 100%) !important;
}

/* Firefox scrollbar */
.ace_scrollbar,
.ace_editor {
    scrollbar-width: thin !important;
    scrollbar-color: #d1d5db rgba(249, 250, 251, 0.8) !important;
}

.functions-icons-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 8px;
}

/* Shadcn-style sidebar button - modern, clean design */
.sidebar-icon-btn {
    width: 48px !important;
    height: 48px !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: 1px solid hsl(214.3 31.8% 91.4%) !important;
    color: hsl(215.4 16.3% 46.9%) !important;
    font-size: 18px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    line-height: 1 !important;
    vertical-align: middle !important;
    position: relative !important;
}

.sidebar-icon-btn:hover {
    background: hsl(210 40% 96.1%) !important;
    border-color: hsl(214.3 31.8% 91.4%) !important;
    color: hsl(222.2 47.4% 11.2%) !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1) !important;
    transform: none !important;
}

.sidebar-icon-btn:active,
.sidebar-icon-btn.active {
    background: hsl(210 40% 96.1%) !important;
    border-color: hsl(214.3 31.8% 91.4%) !important;
    color: hsl(222.2 47.4% 11.2%) !important;
    transform: none !important;
}

.sidebar-icon-btn:focus-visible {
    outline: 2px solid hsl(221.2 83.2% 53.3%) !important;
    outline-offset: 2px !important;
}

.sidebar-icon-btn i,
.sidebar-icon-btn span i {
    color: inherit !important;
    font-size: 18px !important;
}

.sidebar-icon-btn:hover i,
.sidebar-icon-btn:hover span i {
    color: inherit !important;
}

.sidebar-icon-btn:disabled {
    background: transparent !important;
    color: hsl(215.4 16.3% 60%) !important;
    cursor: not-allowed !important;
    opacity: 0.5 !important;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 70px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background: #f5f5f5;
}

.main-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

/* Update popup positions for sidebar layout */
#buttonsMenuPopup {
    animation: fadein 0.5s;
    position: fixed;
    top: 80px;
    left: 80px;
    padding: 10px;
    margin: 0;
    width: auto;
    z-index: 10001;
    background-color: #fff !important;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#buttonsToolsPopup {
    animation: fadein 0.5s;
    position: fixed;
    top: 80px;
    left: 80px;
    padding: 10px;
    margin: 0;
    width: auto;
    z-index: 10001;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#buttonsIotPopup {
    animation: fadein 0.5s;
    position: fixed;
    top: 80px;
    left: 80px;
    padding: 10px;
    margin: 0;
    width: auto;
    z-index: 10001;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Update content wrapper for new layout */
.content_wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100vh !important;
}

/* Hide old table-based layout elements */
.table_wrapper {
    display: none !important;
}

/* Ensure content blocks work properly */
#content_blocks {
    width: 100% !important;
    height: 100% !important;
}

/* Prevent popup background from blocking clicks when hidden */
.popup_bckgrd[style*="display: none"],
.popup_bckgrd.hidden {
    display: none !important;
    pointer-events: none;
}

/* Ensure content blocks take full available space */
#content_area {
    width: 100% !important;
    height: 100%;
    min-width: 10px;
}

.content_blocks,
#content_blocks {
    width: 100% !important;
    height: 100% !important;
    overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    
    .main-content {
        margin-left: 60px;
    }
    
    .sidebar-icon-btn {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}