.header {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  font-size: 16px;
  height: 85px;
  line-height: 40px;
  padding: 20px 70px 0px 70px; /* TRouBLe */
  position: fixed;
  width: 100%;
  z-index: 1000;
  margin: 0;
  background: #000;
  border-bottom: 5px solid #6272a4;
  box-shadow: 0 8px 6px -6px #000;
}

.header h1 {
  flex: 1;
  font-size: 15px;
  font-weight: 400;
}

.header .left, .header .right {
  padding-right:2px;
  padding-left: 0px;  /* Reduces padding inside the left and right containers */
  margin: 0;   /* Reduces margin, bringing elements closer */
}

.Adafruit-Logo {
  max-height: 200px; /* Increased from 65px to make logo larger */
  max-width: 375px; /* Increased from 150px to make logo larger */
  height: auto; /* Maintain aspect ratio */
  width: auto; /* Maintain aspect ratio */
  object-fit: contain; /* Ensure the entire logo fits within bounds */
  align-self: center; /* Centers the logo vertically within its flex container */
  justify-self: flex-start; /* Justifies the logo to the left */
}

/* Common button styling */
button {
  font-size: 14px;
  font-weight: 600;
  padding: 10px 10px;
  margin: 0 10px;
  margin-right: 10px;
  margin-left: 0px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
}







/* Disabled State for Buttons */
button:disabled {
  background-color: #6272a4;
  color: #999;
  cursor: not-allowed;
}

/* Adding a glow effect on focus for accessibility */
button:focus {
  box-shadow: 0 0 10px #bd93f9;
}

/* Styling for small screens */
@media (max-width: 768px) {
  button {
    font-size: 12px;
    padding: 8px 16px;
  }
}

body {
  font-family: proxima-nova, sans-serif;
  font-style: normal;
  font-weight: 400;
  margin: 0;
}

#app #commands a {
  text-decoration: none; /* Removes the underline from the links */
  color: white; /* Sets the text color to white */
  background-color: transparent; /* No background color by default */
  padding: 2px 10px; /* Padding around the text */
  margin-right: -15px; /* Negative margin to pull elements closer together */
  border: none; /* No borders around the links */
  cursor: pointer; /* Cursor changes to pointer to indicate clickable items */
  display: inline-block; /* Allows elements to sit next to each other */
  transition: background-color 0.3s, border-radius 0.3s; /* Smooth transition for hover effects */
  border-radius: 0; /* Initially no rounded corners */
  line-height: 26px; /* Sets the line height to ensure proper spacing */
}

#app #commands a:hover {
  background-color: #444; /* Dark gray background on hover */
  border-radius: 23px; /* Rounded corners to create an oval shape */
}

input,
select,
button,
label {
  font-weight: 600;
  outline: none;
}

div.left {
  float: left;
  display: flex;
  align-items: center;
}

div.right {
  float: right;
  display: flex;
  align-items: center;
}

div.clear {
  clear: both;
}

.main {
  overflow-x: hidden;
  overflow-y: auto;
  padding-top: 85px;
  background-color: #262a4d;
}

.hidden {
  display: none;
}

.notSupported {
  padding: 1em;
  margin-top: 1em;
  margin-bottom: 1em;
}

.subheader {
  height: 46px;
  line-height: 46px;
  padding-left: 70px;
  padding-right: 70px;
  color: white;
  background-color: #1F285E;
}

.subheader a {
  text-decoration: none; /* Removes the underline */
  color: inherit; /* Inherits the text color from the subheader */
  background-color: transparent; /* No background color by default */
  padding: 2px 10px; /* Adjust horizontal padding for oval width */
  margin-right: -15px; /* Spacing between items */
  border: none; /* No borders */
  cursor: pointer; /* Changes the cursor to indicate clickability */
  display: inline-block; /* Aligns items in line */
  transition: background-color 0.3s, border-radius 0.3s; /* Smooth transitions */
  border-radius: 0; /* No rounded corners initially */
  line-height: 26px; /* Adjust line height to control the total height including padding */
}

.subheader a:hover {
  background-color: #444; /* Dark gray background on hover */
  border-radius: 23px; /* Adjusted border-radius for a perfect oval */
}

.subheader .title {
  font-size: 24px;
  font-weight: 500;
}



#app.connected #commands {
  height: 100px;
  background-color: #1F285E;
}

#app.connected #log {
  height: calc(100vh - 300px);
}

#app #commands {
  height: 0;
}

#app #log {
  height: calc(100vh - 225px);
}

#commands,
#log {
  transition: height 0.5s;
}

#commands {
  position: relative;
  margin: 0 auto;
  overflow-y: auto;
  padding: 0 60px;
}

.disconnect-icon {
    color: #FC9999; /* Light red color for disconnect icon */
}

#log {
  max-width: 100%;
  font-family: pt-mono, monospace;
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  overflow-x: hidden;
  overflow-x: auto;
  transition: color 0.1s linear;
  padding: 0 50px;
  border: 20px solid #000;
  -ms-overflow-style: none;
  scrollbar-width: none;
  background-color: #000;
  color: #cecece;
}

.green-icon {
    color: #B3FFCC;
}

.red-icon {
    color: #FC9999;
}

#butDisconnect i {
    color: #FC9999; /* Light red color */
}

#butDisconnect2 a {
    color: #FC9999; /* Light red color */
}


.footer {
    display: flex;
    justify-content: space-between;  /* Maintains space between the three main divs */
    align-items: center;  /* Aligns items vertically in the center */
    padding: 20px 70px;  /* Add padding on the sides of the footer */
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 26px;
    background-color: #1F285E;
    color: #ffffff;
}

.footer .center,
.footer .controls {
    flex: 1;  /* Each section takes equal space */
    text-align: center;  /* Centers text in each section */
}

.footer a {
  color: #4A90E2;
}

.footer .controls {
  line-height: 45px;
}

.footer .center {
    width: 76%; 
    text-align: center; 
}

/* Generic Footer Button Styling */
.footer button {
  font-size: 14px;
  padding: 10px 20px; /* Consistent padding */
  margin: 0 10px;
  border-radius: 4px; /* Slightly reduced for modern aesthetics */
  border: 2px solid transparent; /* Prepare for hover effect */
   /* Soft dark grey */
  color: #f8f8f2; /* Off-white text */
  transition: background-color 0.3s, color 0.3s, border-color 0.3s; /* Smooth transition for hover effects */
  outline: none; /* Removes the outline to clean up the appearance */
  cursor: pointer; /* Changes cursor to signify clickable button */
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
}

/* Hover State for Footer Buttons */
.footer button:hover {
  background-color: #6272a4; /* Light pinkish-purple */
  color: #f8f8f2; /* Maintain off-white text for readability */
  border-color: #bd93f9; /* Vibrant purple border appears on hover */
}

/* Active State for Footer Buttons */
.footer button:active {
  background-color: #FF5555; /* A vibrant, dark red for active state */
  color: #f8f8f2; /* Maintain off-white text for visibility */
  border-color: #ff79c6; /* Soft pink border for contrast */
}

/* Disabled State for Footer Buttons */
.footer button:disabled {
  background-color: #6272a4; /* Muted background for disabled state */
  color: #999999; /* Grayed out text indicates non-interactive */
  cursor: not-allowed; /* Cursor indicates button is not clickable */
  border-color: transparent; /* No border for disabled state */
}

/* Clear Text Button Specific Styling */
.footer button#butClear {
  /* Height removed to allow padding to define size */
  position: relative;
  top: -4px;
  font-size: 16px; /* Larger font size for emphasis */
  border-radius: 15px; /* More rounded edges for stylistic preference */
}

/* Send Button Specific Styling - assuming #butSend is another button you might add */
.footer button#butSend {
  font-size: 16px; /* Same larger font size as butClear for consistency */
  border-radius: 15px; /* Same rounded edges as butClear */
}

/* Adding a glow effect on focus for accessibility */
.footer button:focus {
  box-shadow: 0 0 8px #bd93f9;
}

/* Styling for small screens to ensure usability */
@media (max-width: 768px) {
  .footer button {
    font-size: 12px; /* Smaller font size for small screens */
    padding: 8px 15px; /* Adjusted padding for smaller screens */
  }
}


.remix {
  display: flex;
  justify-content: center;
  height: 60px;
  position: relative;
}

.remix button {
  position: absolute;
  bottom: 11px;
}

#templates {
  display: none;
}

#modelSelect {
  background-color: #333; /* Existing dropdown background */
  color: white; /* Existing text color */
  scrollbar-color: #333 #000; /* For Firefox: thumb #333, track #000 */
}

#modelSelect::-webkit-scrollbar {
  width: 8px; /* Sets the scrollbar width */
}

#modelSelect::-webkit-scrollbar-track {
  background: #000; /* Black background for the track */
}

#modelSelect::-webkit-scrollbar-thumb {
  background: #333; /* Dark gray for the thumb, matching dropdown */
}

#modelSelect::-webkit-scrollbar-thumb:hover {
  background: #444; /* Slightly lighter on hover for visibility */
}

/* On/Off Switch Widget */
.onoffswitch {
  display: inline-block;
  position: relative;
  width: 50px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  margin-left: 10px;
}

.onoffswitch-checkbox {
  display: none;
}

.onoffswitch-label {
  display: block;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid #900;
  border-radius: 12px;
  transition: border 0.3s ease-in 0s;
}

.onoffswitch-inner {
  display: block;
  width: 200%;
  margin-left: -100%;
  transition: margin 0.3s ease-in 0s;
}

.onoffswitch-inner:before,
.onoffswitch-inner:after {
  display: block;
  float: left;
  width: 50%;
  height: 25px;
  padding: 0;
  line-height: 25px;
  font-size: 14px;
  color: white;
  font-family: proxima-nova, sans-serif;
  font-style: normal;
  font-weight: 600;
  box-sizing: border-box;
}

.onoffswitch-inner:before {
  content: "on";
  padding-left: 8px;
  background-color: #8ec641;
  color: #fff;
  text-align: left;
}

.onoffswitch-inner:after {
  content: "off";
  padding-right: 6px;
  background-color: #c64141;
  color: #fff;
  text-align: right;
}

.onoffswitch-switch {
  display: block;
  width: 19px;
  margin: 3px;
  background: #44475a;
  position: absolute;
  top: 0;
  bottom: 0;
  right: 27px;
  border: 1px solid #900;
  border-radius: 15px;
  transition: all 0.3s ease-in 0s;
}

.onoffswitch-checkbox:checked + .onoffswitch-label {
  border-color: #71ae1e;
}

.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
  margin-left: 0;
}

.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
  right: 0px;
  border-color: #67ac38;
}

.footer .onoffswitch {
  margin-right: 20px;
  top: 7px;
}

#butClear {
  margin-top: 10px;
}


#commands {
  min-width: 600px;
  justify-content: center;
  position: relative;
  align-items: center;
}

#commands .upload {
  width: 600px;
  display: flex;
  align-items: center;
  margin: 5px auto;
  justify-content: center;
}

#commands .upload .offset {
  width: 50px;
}

#commands .upload label {
  white-space: nowrap;
}

.firmware > input {
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  z-index: -1;
}

.status-display {
    text-align: left;    /* Centers text horizontally */
    width: 75%;           /* Ensures the div takes the full width of its container */
    margin: 0px 0;        /* Adds some vertical spacing, adjust as needed */
    color: #ff9999;        /* Sets the text color, adjust based on your theme */
    font-size: .75em;        /* Appropriate font size */
}

.firmware {
  border-style: solid;
  margin-left: 20px;
  margin-right: 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.firmware > svg {
  margin-right: 10px;
}

.debug-function {
  color: #8ec641;
}

.error-message {
  color: #c64141;
}

.timestamp {
  color: #8ec641;
}

.progress-bar {
  width: 100%;
  height: 24px;
  border-style: solid;
  border-width: 2px;
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
}

.progress-bar > div {
  height: 24px;
  background-color: #71ae1e;
  width: 0;
}

#commands .buttons {
  display: flex;
  justify-content: center;
  width: 600px;
  margin: 10px auto;
}

#commands .buttons button {
  margin-left: 10px;
  margin-right: 10px;
  border-width: 2px;
  border-style: solid;
}
.justify {
  display: flex;
  justify-content: space-between;
}
.center {
  text-align: center;
}

/* Product Selector Overlay */
.product-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.product-overlay.hidden {
  display: none;
}

.product-modal {
  text-align: center;
  color: #ffffff;
}

.product-modal h2 {
  font-size: 28px;
  margin-bottom: 30px;
  font-weight: 600;
}

.product-cards {
  display: flex;
  gap: 30px;
  justify-content: center;
}

.product-card {
  background: #1a1a2e;
  border: 2px solid #333;
  border-radius: 12px;
  padding: 30px 40px;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  min-width: 200px;
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: #4A90E2;
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
}

.product-card img {
  max-width: 120px;
  max-height: 120px;
  object-fit: contain;
  margin-bottom: 15px;
}

.product-card h3 {
  font-size: 20px;
  margin: 10px 0 5px 0;
  font-weight: 600;
}

.product-card p {
  font-size: 14px;
  color: #aaa;
  margin: 0;
}
