
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.switch .slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #8FA6F0; /* Your preferred color */
}

input:checked + .slider:before {
  transform: translateX(26px);
}


/* Default: side by side for landscape/desktop */
#left-panel {
    width: 35%;
    overflow-y: auto;
}

#right-panel {
    width: 65%;
    overflow-y: auto;
}

/* Only target specific elements that need width constraining, not dropdowns */
#left-panel img,
#left-panel input,
#left-panel .dash-graph,
#right-panel img,
#right-panel input,
#right-panel .dash-graph {
    max-width: 100%;
}

@media (max-width: 768px) {
    .main-layout {
        flex-direction: column !important;
    }
    #left-panel {
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        overflow-y: visible !important;
        overflow-x: hidden !important;
    }
    #right-panel {
        width: 100% !important;
        height: auto !important;
        overflow-y: visible !important;
        overflow-x: hidden !important;
    }

    /* Fix elements cutting off on right side */
    .Select-menu-outer {
        width: 100% !important;
    }

    /* Summary table */
    #data-table,
    .dash-table-container,
    .dash-spreadsheet-container,
    .dash-spreadsheet,
    .dash-spreadsheet table {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
    }

    /* Cross section figure */
    #beam-cross-section-container {
        width: 100% !important;
        overflow-x: hidden !important;
    }

    #beam-cross-section {
        width: 100% !important;
    }

    /* Beam list */
    #beam-list-container {
        width: 100% !important;
        overflow-x: hidden !important;
    }

    #beam-list {
        width: 100% !important;
    }
}
}
