/* General styles */

:root {
    --primary-color: #b4d647;
    --secondary-color: #F5A623;
    --background-color: #F0F4F8;
    --text-color: #2C3E50;
    --border-color: #E1E4E8;
    --hover-color: #EDF2F7;
    --success-color: #66BB6A;
    --warning-color: #FFA726;
    --error-color: #EF5350;
}
/* .rightpanel{
 position: fixed;
 top: 7%;
 z-index: 1000;
} */
.rightpanel .container-fluid .board-select-wrapper{
    display:flex;
    
}
.rightpanel .container-fluid{
    position: relative;
}
.board-select-wrapper {
    position: relative;
    display: inline-block;
    position: absolute;
    right: 60px;
    top: -2.8em;
    /* left: 90%; */
}

.board-select {
    /* padding: 0px 25px; */
    padding: 8px 5px;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    background: white;
    font-size: 10px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 170px;
    height: 30px;
    margin-right: 2px;
}
.board-select option {
    color: #333 !important;  /* Text color */
    background-color: white !important;  /* Background color */
    font-size: 14px;
    border-radius: 20px !important;
}
.board-select:hover, .board-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.3);
    transition: background-color 0.3s ease;
}

.board-select-wrapper::after {
    content: '\f078';
    font-family: "Font Awesome 5 Free";
    font-weight: 1000;
    position: absolute;
    top: 42%;
    right: 38%;
    transform: translateY(-50%);
    pointer-events: none;
    color: gray;
}
.launch-button {
    text-align: center;
    display: inline-block;
    margin: 10px;
  }

  .toolbar-wrapper {
    width: 100%;
    display: flex;
    justify-content: center; /* centers horizontally */
    margin-bottom: 15px;
  }
  
  .control-bar {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
  }

  /* Common circular button style */
.circle-btn,
.upload-btn,
.save-btn ,
.singin-btn{
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}

.upload-btn{
    width: 37px;
    height: 37px;
    border-radius: 50%;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}
.save-btn{
    width: 37px;
    height: 37px;
    border-radius: 50%;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}
.singin-btn{
    width: 37px;
    height: 37px;
    border-radius: 50%;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}
.upload-btn,
.save-btn,
.singin-btn {
  margin-top: 13px;
}

.icon-with-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
  
  .icon-label {
    font-size: 11px;
    font-weight: 5000;
    color: white;
  }

  #undoButton,
  #redoButton {
    background-color: white;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    width:30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }
  
  #undoButton .material-symbols-outlined,
  #redoButton .material-symbols-outlined {
    color: gray;
    font-size: 20px;
    font-weight: 1000;
  }
  

.fa-rocket{
 font-size: 21px;
  color: white;
}

.icon-with-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 0px 6px; /* Optional: reset margins */
    padding-bottom: 10px;
  }

.launch-label ,  .save-label  {
  font-size: 11px;
  font-weight: 500;
  color: #333;
}
.save-button {
    text-align: center;
    display: inline-block;
    margin: 10px;
  }
  

  
  

  
.reset-btn, .load-btn{
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 20px;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    height: 37px;
    min-width: 120px;
    text-align: center;
    margin-right: 5px;
    
}



/* Button hover effects */
.upload-btn:hover, .reset-btn:hover, .save-btn:hover, .load-btn:hover ,.singin-btn:hover , #undoButton:hover , #redoButton:hover  {
  transform: translateY(-2px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.reset-btn{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 37px;
    min-width: 120px;
    white-space: nowrap; /* Prevents text from wrapping */
    text-align: center;
    padding: 10px 14px;
}
.load-btn{
    width: 130px;
    display: inline-block;
   vertical-align: middle;
   white-space: nowrap;

}

.upload-btn {
     background: white;
 }

 .upload-btn i {
    font-size: 21px;
    background:  linear-gradient(270deg, rgba(255,98,3,1) 0%, rgba(241,203,70,1) 85%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


.reset-btn { background: var(--warning-color); }

.save-btn { 
    background: white;
 }
 .save-btn i {
    font-size: 21px;
    background: linear-gradient(270deg, rgba(54,203,255,1) 0%, rgba(0,60,211,1) 85%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


.singin-btn{ 
    background: white;
 }
 .singin-btn i {
    font-size: 21px;
    /* background-color: #66BB6A; */
    /* background: linear-gradient(270deg, rgba(2,213,217,1) 0%, rgba(188,219,93,1) 85%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; */
}
.load-btn { background: var(--error-color); }

#boardSelect {
    width: 230px;                 /* Wider for better text visibility */
    padding: 9px 10px;            /* Slim padding for minimal height */
    font-size: 11px;              /* Smaller text size */
    height: 34px;                 /* Reduced total height */
    line-height: 1;               /* Tighter vertical spacing */
    border-radius: 50px;          /* Full-rounded corners for pill effect */
    border: 1px solid #ccc;       /* Light border for subtle styling */
    background-color: #fff;       /* Clean white background */
    outline: none;                /* Remove default blue outline on focus */
    color: gray;
    font-weight: 1000;
  }
  
  
  


#barre_h .middle{
 display: flex;
 justify-content: flex-end; 
    width: 100%;
}

/* Enhanced Terminal Styles */


.terminal{
    position: fixed; /* Changed from fixed */
    bottom: 7%; /* Adjust this value to move it above the buttons */
    left: -3%; 
    width: 400px; /* Optional, adjust width */
    height: 250px;
    background-color: #1e1e1e;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    padding: 10px;
    border-radius: 10px;
    border: 3px solid #b4d647;
    resize: none;
    white-space: pre-wrap;
    overflow-y: auto;
    display: none; /* Initially hidden */
    background-color: black;  /* Black background */
    color: white;             /* White text */
    margin-left: 75%;
    z-index: 1000;
}

/* Enhanced Serial Monitor Styles */
.serial-monitor {
    position: fixed; /* Changed from fixed */
    bottom: 20%; /* Adjust this value to move it above the buttons */
    left: -3%; 
    width: 400px; /* Optional, adjust width */
    height: 250px;
    background-color: #1e1e1e;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    padding: 10px;
    border-radius: 10px;
    border: 3px solid #b4d647;
    resize: none;
    white-space: pre-wrap;
    overflow-y: auto;
    display: none; /* Initially hidden */
    margin-left: 75%;
    background-color: white;  /* White background */
    color: black;             /* Black text */
     z-index: 1000;
}



/* Adjust footer to ensure terminal is always above */
#barre_h{
    z-index: 9999; 
}

.terminal:focus {
    outline: none; /* Remove the focus outline */
    background-color: #1e1e1e; /* Ensure the background color stays dark */
    border: 1px solid #61dafb; /* Retain the light blue border */
    color: white; /* Retain the default text color */
}

.fa-terminal, .fa-desktop, .fa-plug{
    margin-top: 3px;
}

.terminal div {
    margin-bottom: 5px;
}
.terminal .error {
    color: red;
}
.terminal .success {
    color: lightgreen;
}
.terminal-btn {
    background: linear-gradient(270deg, rgba(255,98,3,1) 0%, rgba(241,203,70,1) 85%);
    color: white;
    padding: 2px 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: 2px solid transparent;
    border-radius: 0px; 
    font-weight: bold; 
}


.terminal-btn:hover{
    /* background-color: #EF5350; */
    /* color: #fff; */
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.monitor-btn{
        background: linear-gradient(270deg, rgba(54,203,255,1) 0%, rgba(0,60,211,1) 85%);
        color: white;
        padding: 2px 6px;
        cursor: pointer;
        transition: background-color 0.3s ease;
        border: 2px solid transparent;
        border-radius: 4px; /* Optional: add rounded corners */
        font-weight: bold;  /* Optional: bold white text */
}
    
.monitor-btn:hover{
/* background-color: #b4d647; */
/* color: #fff; */
cursor: pointer;
}
.connect-btn{
    background: linear-gradient(270deg, rgba(2,213,217,1) 0%, rgba(188,219,93,1) 85%);
    color: white;
    padding: 2px 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: 2px solid transparent;
    border-radius: 4px; /* Optional: add rounded corners */
    font-weight: bold;  /* Optional: bold white text */
}
.connect-btn:hover{
/* background: #45B7D1; */
margin-left: 2px;
cursor: pointer;
}

/* When shown, force display */
.terminal:not(.d-none),
.serial-monitor:not(.d-none) {
    display: block !important;
}

/* Scrollbar styles */
.terminal::-webkit-scrollbar,
.serial-monitor::-webkit-scrollbar {
    width: 8px;
}

.terminal::-webkit-scrollbar-track,
.serial-monitor::-webkit-scrollbar-track {
    background: #444; /* Darker scrollbar track */
}

.terminal::-webkit-scrollbar-thumb,
.serial-monitor::-webkit-scrollbar-thumb {
    background-color: #61dafb; /* Light blue scrollbar */
    border-radius: 10px;
    border: 2px solid #fcfdfe;
}
.toggle-button-wrapper{
    display: flex;
}
.toggle-button-wrapper .btn {
    border-bottom-left-radius: 11px;
    transition: transform 0.3s, background-color 0.3s;
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-right: 10px;
}

.toggle-button-wrapper .btn:hover {
    transform: scale(1.1);
    color: #fff;  
}

.toggle-button {
    padding: 5px 10px;
    font-size: 0.8em;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.3s;
}



.toggle-button:hover {
    transform: scale(1.05);
    background-color: #f08080;
}

.toggle-button:focus {
    outline: none;
}

#connectModal .modal-dialog {
    background-color: white;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px; /* Set fixed width */
    height: auto !important;
    max-height: 300px !important; /* Force height */
    overflow: hidden; /* Prevent unwanted scrolling */
}

/*  ------------------------------------  */

#customDialogBackdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
  }
  
  #customDialog {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    width: 380px;
    max-width: 90%;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    text-align: center;
    transform: scale(0.9);
    animation: popIn 0.3s ease-out forwards;
    border: 3px solid #FFD166;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  @keyframes popIn {
    0% { transform: scale(0.9); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
  }
  
  .customDialogTitle {
    font-size: 24px;
    font-weight: bold;
    color: #2196F3 !important;
    margin-bottom: 15px;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
  }
  
  .customDialogMessage {
    font-size: 18px;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.4;
    font-family: 'Comic Sans MS', cursive, sans-serif;
  }
  
  .customDialogButtons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
  }
  
  #customDialogInput {
    width: 90%;
    padding: 12px 15px;
    margin: 10px 0;
    border: 2px solid #118AB2;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
    font-family: 'Comic Sans MS', cursive, sans-serif;
  }
  
  #customDialogInput:focus {
    border-color: #06D6A0;
    box-shadow: 0 0 0 3px rgba(6, 214, 160, 0.2);
  }
  
  #customDialogCancel, #customDialogOkay {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    min-width: 100px;
  }
  
  #customDialogOkay {
    background-color: #F44336 !important;
    color: white;
  }
  
  #customDialogOkay:hover {
    background-color: #05B589;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 10px rgba(6, 214, 160, 0.3);
  }
  
  #customDialogOkay:active {
    transform: translateY(0) scale(0.98);
  }
  
  #customDialogCancel {
    background-color: #4CAF50 !important;
    color: white;
  }
  
  #customDialogCancel:hover {
    background-color: #D43D63;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 10px rgba(239, 71, 111, 0.3);
  }
  
  #customDialogCancel:active {
    transform: translateY(0) scale(0.98);
  }
  
  .bounce {
    animation: bounce 0.5s;
  }
  
  @keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
  }
  
/* --------------------------------------- */

#uploadingIconUploading {
    display: inline-block;
    animation: rotating 2s linear infinite;
    font-size: 28px; /* Adjusted icon size */
    animation: spin 2s linear infinite; /* Apply spinning animation */
}
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

#uploadingMessageUploading {
    display: block; /* Ensures the message is in a new line, centered */
}

/* Styling the close button */
#stopUploadButton {
    display: block;
    margin: 20px auto 0; /* Center the button and add space from content */
    padding: 10px 20px;
    font-size: 14px;
    color: #fff; /* White text */
    background-color: #4785d6; /* Blue background */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}


/* Hover effect for the button */
#stopUploadButton:hover {
    background-color: #B0C4DE; /* Darker blue on hover */
}

.popup.board-error {
    border-color: #ff9800; /* Orange */
    color: #ff9800; /* Orange text */
}

/* Popup Style */
.popup {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    padding: 20px;
    border: 1px solid #ccc;
    background-color: white;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: visible;
    opacity: 1;
    transition: visibility 0s, opacity 0.5s linear;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-size: 16px;
}

.popup.success {
    border-color: #b4d647;
    color: #b4d647;
}

.popup.error {
    border-color: #f44336;
    color: #f44336;
}

 /* Uploading Popup Style */
 .popup.uploading {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    padding: 20px;
    border: 1px solid #ccc;
    background: linear-gradient(135deg, #e9efff 0%, #fef8dd 100%); /* Gradient background */
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: visible;
    opacity: 1;
    transition: visibility 0s, opacity 0.5s linear;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-size: 18px; /* Adjusted font size */
    width: 350px; /* Adjusted width */
    text-align: center; /* Ensures text is centered */
}

/* Overlay Style */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    z-index: 999; /* Just below the popup */
}

.td-icons{
    padding-left: 43.2%;
    position: fixed; /* Keep it fixed in place */
    top: 0.7em; /* Adjust vertical position */
    left: 27%; /* Center it horizontally */
    transform: translateX(-50%); /* Ensure perfect centering */
    z-index: 1000; /* Ensure it stays above other elements */
    display: flex; /* Keep buttons aligned */
    /* gap: 1px;  */
}
.td-icons .iconButtons{
    margin: 5px;
    /* background-color: #ffffff; Ensure white background */
    border: none;
    padding: 5px 10px;
    cursor: pointer;
}

/* Custom Popup Styling */
#custom-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #b4d647, #fad0c4);
    padding: 20px;
    width: 350px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-radius: 15px; /* Curved edges */
    text-align: center;
    font-family: Arial, sans-serif;
    color: #333;
    z-index: 1000;
}

/* Popup Heading */
#popup-title {
    font-size: 18px;
    font-weight: bold;
    text-transform: capitalize; /* First letter capital */
    margin-bottom: 10px;
}

/* Popup Message */
#popup-message {
    font-size: 14px;
    margin-bottom: 15px;
}

/* Popup Close Button */
#popup-close {
    background: #b4d647;
    color: white;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    transition: 0.3s;
}

#popup-close:hover {
    background: #b4d647;
}
.toast-container{
    position: absolute;
    bottom: 180px;
    left: 75%;
}
.toast-body{
  width: 400px;
  color: white;
  height: 30px;
  margin-bottom: 0%;
  position: fixed;
  bottom: 20%;
  left: 38%;
}
.text-bg-success{
    height: 50px;
    position: fixed;
    bottom: 17.5%;
    left: 36%;
} 
.text-bg-info{
  height: 70px;
   position: fixed;
    bottom: 17%;
    left: 36%;
}
.text-bg-danger{
  width: 390px;
  height: 120px;
  position: fixed;
  bottom: 11%;
  left: 38%;
  padding: 10px;
}
.text-bg-warning{
height: 50px;
   position: fixed;
    bottom: 18%;
    left: 38%;
}
.btn-close-white{
  margin-top: 13px;
}
.blocklyTrash {
    display: none !important;
  }
  .blocklyZoom {
    display: none !important;
  }
    
  .outlined-icon {
    font-size: 22px;
    background-color: #d3d3d3; /* light gray */
    color: white;
    border-radius: 50%;
    padding: 12px;
    width: 44px;
    height: 44px;
    text-align: center;
    line-height: 20px;
  }

  #wrapper_up {
    position: relative;
  }
  
  .Plus {
    position: absolute;
    bottom: 1.5em;
    right: 2em; /* updated to fixed spacing */
    z-index: 10;
  }
  
  .Plus .Sub-Plus {
    display: flex;
    gap: 6px;
    width: max-content;
  }
  
  .Plus .Sub-Plus i {
    background: linear-gradient(to bottom, #4facfe, #00f2fe);
    color: #fafbfc;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.2s ease;
    /* ❌ REMOVE position: absolute */
  }
  
  
  .Plus .Sub-Plus i:hover {
    transform: scale(1.1);
  }
  .custom-menu-bar {
    /* display: flex; */
    /* position: relative;  */
    z-index: 9999; 
  }
  
  .custom-menu-bar .dropbtn {
    background-color: transparent;
    border: none;
    padding: 5px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 30px;
    margin-left: 8px;
    color: white;
  }
  
  .dropdown {
    position: relative;
    display: inline-block;
    margin-left: 20px;
  }

 .dropdown-content {
  display: none;
  position: absolute;
  background-color: white;
  min-width: 180px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  margin-top: 10px;
  border-radius: 15px;
  pointer-events: auto;
}
  
 
.dropdown-content.show {
  display: block;
  pointer-events: auto;
  z-index: 9999;
}
  .dropdown-content a {
    color: rgb(20, 20, 20);
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    font-weight: 200;
  }
  
  .dropdown-content a:hover {
    background-color: #f1f1f1;
    border-radius: 15px;
  }
  
  .dropbtn:hover {
    background-color: #fff;
    color: #b4d647;
  }
  .custom-dialog-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
     background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
     z-index: 1000;
  }


.custom-dialog-box {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
    max-width: 320px;
    width: 100%;
    border-top: 4px solid #0bad3e;;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

.custom-dialog-box h2 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 22px;
    font-weight: 600;
}

.custom-dialog-box p {
    margin: 0 0 20px 0;
    color: #555;
    line-height: 1.5;
    font-size: 15px;
}

.custom-dialog-box p strong {
    color: #0bad3e;
    font-size: 16px;
}

.custom-dialog-box button {
    margin-top: 10px;
    padding: 8px 20px;
    background-color: #0bad3e;;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.custom-dialog-box button:hover {
    background-color: #3367d6;
}
 
.submenu-toggle {
    display: inline-block;
    width: 100%;
}

.submenu-content {
    margin-top: 4px;
    padding-left: 15px;
    border-left: 2px solid #ddd;
}

.hidden {
      display: none !important;
}

label {
    display: block;
    margin: 2px 0;
}


.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
  }
  .modal-box {
    background: white;
    padding: 20px;
    max-width: 420px;
    margin: 10% auto;
    border-radius: 8px;
    font-family: sans-serif;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  }
  .modal-link {
    color: blue;
    word-break: break-word;
    text-decoration: underline;
  }


#editBtn-Baud{
  position: absolute;
  bottom: 110px;
  right: 24%;
  padding: 5px 10px;
}

#inputField-text {
  position: absolute;
  bottom: 25px;
  right: 7%;
  width: 290px;
  margin-right: 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 6px 12px;
}
.send-btn {
  position: absolute;
  bottom: 32px;
  right: 3.5%;
  padding: 5px 10px !important;
  margin-left: 10px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.send-btn:hover {
  background: #0069d9;
}
@media (max-width: 1024px) {
  .send-btn {
  position: absolute;
  bottom: 32px;
  right: 1.5%;
  }
}
#startStopBtn{
  position: absolute;
  bottom: 71px;
  right: 18.5%;
  /* background: #28a745; */
  color: white;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
}
#baudDropdown{
  display: none; 
  max-height: 150px; 
  overflow-y: auto; 
 width: 100px !important;
  max-width: 100px !important;
  min-width: 100px !important;
   position: absolute; 
   bottom: 110px;
   right: 7.6%;
   z-index: 1000;
   background: white;
   border: 1px solid #ddd;
   border-radius: 4px;
   box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }
  #baudRateInput{
   position: absolute; 
   bottom: 70px;
   right: 7.5%;
   width: 99px;
   background: #f8f9fa;
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
  /* background-image: linear-gradient(to right, transparent 75%, gray); */
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 50px 100%;
}

#editControls::after {
  /* content: "(baud)"; */
  position: absolute;
  bottom: 16.5%;
  right: 10.5%;
  color: gray;
  font-size: 0.85rem;
  pointer-events: none;
}

 .dropdown-item {
    /* position: relative; */
    /* padding: 6px 12px; */
    width: 100% ;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 5px;
}
.dropdown-item:hover {
  background: #f8f9fa;
}

#baudArrow {
  position: absolute;
  right:9%;   /* Adjust based on input width */
  bottom: 7.3%;
  transform: translateY(-50%);
  color: #6c757d;
  pointer-events: none;
  font-size: 1.3rem;
}

/* #startStopBtn:hover {
  background: #218838;
} */

#startStopBtn.stop {
  background: #dc3545 !important;
}

#startStopBtn.stop:hover {
  background: #c82333 !important;
}

.port-loading-spinner {
  display: inline-block;
  animation: spin 1s linear infinite;
  font-size: 24px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}




.alert-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 380px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-top: 5px solid #0bad3e;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    z-index: 1000;
}

.alert-box p {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 15px;
    line-height: 1.5;
}

.alert-box p strong {
    color: #0066cc;
}

.alert-box h6 {
    margin: 15px 0 5px 0;
    color: #555;
    font-size: 14px;
}

.alert-box a {
    color: #0066cc;
    text-decoration: none;
    word-break: break-all;
    font-size: 13px;
    display: inline-block;
    margin-top: 5px;
}

.alert-box a:hover {
    text-decoration: underline;
}

.alert-box span {
    font-size: 18px;
    color: #888;
    transition: color 0.2s;
}

.alert-box span:hover {
    color: #555;
}

/* Icon colors */
.alert-box p:before {
    content: "❌";
    margin-right: 8px;
    font-size: 16px;
    vertical-align: middle;
}

.alert-box p strong:before {
    content: "✅";
    margin-right: 8px;
    font-size: 16px;
    vertical-align: middle;
}

.alert-box h6:before {
    content: "🔗";
    margin-right: 8px;
    font-size: 14px;
    vertical-align: middle;
}

@media (max-width: 1700px) and (max-height: 1000px) {
 .serial-monitor {
    position: fixed; /* Changed from fixed */
    bottom: 20%; /* Adjust this value to move it above the buttons */
    left: 3%; 
  } 
  .terminal{
    position: fixed; /* Changed from fixed */
    bottom: 7%; /* Adjust this value to move it above the buttons */
    left: 3%; 
  }
  #baudArrow {
  position: absolute;
  right:9%;   /* Adjust based on input width */
  bottom: 12.3%;
}
}


@media (max-width: 1660px) and (max-height: 953px) {

.serial-monitor {
    position: fixed; /* Changed from fixed */
    bottom: 20%; /* Adjust this value to move it above the buttons */
    left: -3%; 
  } 
  .terminal{
    position: fixed; /* Changed from fixed */
    bottom: 7%; /* Adjust this value to move it above the buttons */
    left: -3%; 
  }
  #baudArrow {
  position: absolute;
  right:9%;   /* Adjust based on input width */
  bottom: 15.3%;
}
#editControls::after {
  /* content: "(baud)"; */
  position: absolute;
  bottom: 16.5%;
  right: 10.5%;
  color: gray;
  font-size: 0.85rem;
  pointer-events: none;
}
}


@media (max-width: 1440px) {
  .serial-monitor, .terminal{
  position: absolute;
  bottom: 18%;
  left: -4.5%;
}

#baudArrow {
  position: absolute;
  right:9%;   /* Adjust based on input width */
  bottom: 14.5%;
  transform: translateY(-50%);
  color: gray;
  pointer-events: none;
  font-size: 1.3rem;
}
#editControls::after {
  /* content: "(baud)"; */
  position: absolute;
  bottom: 16.0%;
  right: 10.5%;
  color: gray;
  font-size: 0.85rem;
  pointer-events: none;
}

}
@media (max-width: 1024px) {
 .custom-menu-bar .dropbtn{
  margin-left: 0px;
 }
 .dropdown{
  margin-left: 10px;
 }
 #baudDropdown{
   width: 100px !important;
   position: absolute; 
   bottom: 110px;
   right: 8.0%;
 }
.board-select-wrapper{
  position: absolute;
  right: 20px;
  /* top: -2.8rem; */
}
.serial-monitor, .terminal{
  position: absolute;
  bottom: 18%;
  left: -18%;
}

#baudArrow {
  position: absolute;
  right:9%;   /* Adjust based on input width */
  bottom: 17%;
  transform: translateY(-50%);
  color: gray;
  pointer-events: none;
  font-size: 1.3rem;
}
#editControls::after {
  display: none;
  /* content: "(baud)"; */
  position: absolute;
  bottom: 16.0%;
  right: 10.5%;
  color: gray;
  font-size: 0.75rem;
  pointer-events: none;
}
}
@media (max-width: 768px) {
#baudArrow {
  position: absolute;
  right:9%;   /* Adjust based on input width */
  bottom: 8.5%;
  transform: translateY(-50%);
  color: gray;
  pointer-events: none;
  font-size: 1.3rem;
}
}

.guest-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(2px);
}

.guest-modal {
  /* background: #1e417a; */
  background: #0b509d;
  border-radius: 16px;
  /* width: 500px; */
  padding: 5px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  animation: modalFadeIn 0.3s ease-out;
}

.guest-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}

#guestModalTitle {
  font-size: 20px;
  font-weight: 600;
  color: white;
  margin: 0 auto;
}

.guest-modal-close {
  cursor: pointer;
  font-size: 28px;
  color: #888;
  transition: color 0.2s;
  margin-right: 5px;
}

.guest-modal-close:hover {
  color: #333;
}

/* .guest-modal-body img{
 width: 200px;
} */

.guest-modal-image {
  width: 500px;
  max-height: 210px;
  object-fit: contain;
  /* margin: 10px 0 20px; */
  color: white;
  margin-right: 20px;
}
.guest-community-heading {
  color: #b5f915; /* or adjust to match your branding */
  font-size: 20px;
  font-weight: bold;
  margin-top: 10px;
  margin-bottom: 10px;
}

#guestModalMessage {
  color: white;
  margin: 15px 0;
  line-height: 1.5;
}

.guest-modal-btn {
  background-color: #7c3aed;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  margin: 15px;
  width: 80%;
  transition: background-color 0.2s, transform 0.1s;
}

.guest-modal-btn:hover {
  background-color: #6d28d9;
}

.guest-modal-btn:active {
  transform: scale(0.98);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Overlay background - Enhanced */
#updateOverlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9998;
  animation: fadeIn 0.3s ease-out;
}

/* Popup container - Enhanced */
#updatePopup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  padding: 50px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.05);
  width: 440px;
  z-index: 9999;
  text-align: center;
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  /* border: 1px solid rgba(255, 255, 255, 0.8); */
  border: 3px solid #43A047;
  box-sizing: border-box;
}

/* Popup title - Enhanced */
#updatePopup h3 {
  margin-top: 0;
  margin-bottom: 16px;
  color: #2E7D32;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Popup message text - Enhanced */
#updateMessage {
  font-size: 16px;
  line-height: 1.5;
  color: #424242;
  margin: 18px 0 24px;
  /* padding: 0 8px; */
}

/* OK button - Enhanced */
#updatePopup button {
  background: linear-gradient(to bottom, #4CAF50 0%, #3d9140 100%);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 3px 8px rgba(76, 175, 80, 0.25);
  min-width: 100px;
}

#updatePopup button:hover {
  background: linear-gradient(to bottom, #43A047 0%, #368039 100%);
  transform: translateY(-1.5px);
  box-shadow: 0 5px 12px rgba(76, 175, 80, 0.35);
}

#updatePopup button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(76, 175, 80, 0.25);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}