/* set smaller font size for big screens */
@media screen and (min-width: 1200px) {
  html {
  font-size: 14px;
}}

@media screen and (max-width: 1200px) {
  html {
  font-size: 12px;
}}

html,
body {
  /*overflow-y: hidden;*/
}

#bottom, * {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}


:root{
  --signal-background-dark: #1f1f1f;
  --signal-labels-dark: #d3d3d3;
  --app-background-dark: #3b3f41;
  --btn-selected-background-dark: #32363a;
  --signal-color-dark: #339e9e;
  --mark-color: #ff0000;
  --mark-opacity-min: 0.01;
  --mark-opacity-max: 0.25;

  --signal-color-light: #1f1f1f;
  --signal-background-light: #ffffff;
  --signal-labels-light: #1f1f1f;
  --app-background-light: #3b3f41;
  --btn-selected-background-light: #697c92;

  --channel-container-height: 100px;
}

label {
  cursor: text;
}

/* Define other variables for light theme */
.light-theme {
  --signal-color: var(--signal-color-light);
  --signal-background: var(--signal-background-light);
  --signal-labels: var(--signal-labels-light);
  --app-background: var(--app-background-light);
  --btn-selected-background: var(--btn-selected-background-light);
}

/* Define other variables for dark theme */
.dark-theme {
  --signal-color: var(--signal-color-dark);
  --signal-background: var(--signal-background-dark);
  --signal-labels: var(--signal-labels-dark);
  --app-background: var(--app-background-dark);
  --btn-selected-background: var(--btn-selected-background-dark);
}

.main {
  background-color: var(--app-background);
}

.slider {
  -webkit-appearance: none;
  width: 100%;
  height: 25px;
  background: #d3d3d3;
  outline: none;
  opacity: 0.7;
}


.div_top{
  flex-grow: 0;
  flex-shrink: 0;
  width: 100%;  
}

.div_mid{  
  display: flex;
  flex-direction: row;
  width: 100%;  
  flex: 1;
  overflow: hidden;
}

.resize_panel{  
  border-right: 2px solid var(--signal-background);
  border-bottom: 2px solid var(--signal-background);
  overflow-y: auto;
  overflow-x: hidden;

}

.mid_right {
  width: 10%;
}

.mid_left {
  width: 7%;
  height: 100%;
}

.chan_panel {
  width: 10%;
  overflow-y: scroll;
  overflow-x: hidden;
}

.slider-range{
  width: 100%;
  height: 1.3em;
  background: #d3d3d3;
}

.slider-range.slider-container:hover {
  background: #b4b4b4;
}

.slider-window{
  width: 10%;
  height: 1.3em;
  margin-left: 50%;
  resize: horizontal;
  cursor: pointer;
}

.slider-window:hover {
  --bs-gradient: none !important;
}


.main-container{
    /*overflow: hidden;*/
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.menuBtn:hover > .fa {
  transform: scale(1.4);
}

.context-menu-marks-categories
{
  background-color: #232626;
  border-radius: 5px;
  padding: 5px;
}
/* General styles for all marks */
.mark {
  background: rgba(255,0,0,0.10);
  border-left: 1px solid #ff0000ff;
  border-right: 1px solid #ff0000ff;
}

/* General hover effect */
.mark.hovered {
background: rgba(255, 0, 0, 0.2); /* Slightly darker background on hover */
  border-left: 1px solid #ff0000ff; /* Red border */
  border-right: 1px solid #ff0000ff;
}

/* Specific sleep stage styles with tuned colors */

/* N1 */
.mark.n1 {
  background: rgba(65, 171, 171, 0.3); /* Light teal with increased alpha */
  border-left: 1px solid #41abab; /* Light teal border */
  border-right: 1px solid #41abab;
}
.mark.n1.hovered {
  background: rgba(65, 171, 171, 0.5); /* Light teal hover background with higher alpha */
  border-left: 1px solid #41abab; /* Light teal hover border */
  border-right: 1px solid #41abab;
}

/* N2 */
.mark.n2 {
  background: rgba(173, 168, 71, 0.3); /* Olive with increased alpha */
  border-left: 1px solid #ada847; /* Olive border */
  border-right: 1px solid #ada847;
}
.mark.n2.hovered {
  background: rgba(173, 168, 71, 0.5); /* Olive hover background with higher alpha */
  border-left: 1px solid #ada847; /* Olive hover border */
  border-right: 1px solid #ada847;
}

/* N3 */
.mark.n3 {
  background: rgba(127, 71, 173, 0.3); /* Purple with increased alpha */
  border-left: 1px solid #7f47ad; /* Purple border */
  border-right: 1px solid #7f47ad;
}
.mark.n3.hovered {
  background: rgba(127, 71, 173, 0.5); /* Purple hover background with higher alpha */
  border-left: 1px solid #7f47ad; /* Purple hover border */
  border-right: 1px solid #7f47ad;
}

/* Wake */
.mark.wake {
  background: rgba(81, 173, 71, 0.3); /* Green with increased alpha */
  border-left: 1px solid #51ad47; /* Green border */
  border-right: 1px solid #51ad47;
}
.mark.wake.hovered {
  background: rgba(81, 173, 71, 0.5); /* Green hover background with higher alpha */
  border-left: 1px solid #51ad47; /* Green hover border */
  border-right: 1px solid #51ad47;
}

/* REM */
.mark.rem {
  background: rgba(173, 74, 71, 0.3); /* Red with increased alpha */
  border-left: 1px solid #ad4a47; /* Red border */
  border-right: 1px solid #ad4a47;
}
.mark.rem.hovered {
  background: rgba(173, 74, 71, 0.5); /* Red hover background with higher alpha */
  border-left: 1px solid #ad4a47; /* Red hover border */
  border-right: 1px solid #ad4a47;
}

/* NOT-SCORED */
.mark.not-scored {
  background: rgba(136, 136, 136, 0.3); /* Gray with increased alpha */
  border-left: 1px solid #888888; /* Gray border */
  border-right: 1px solid #888888;
}
.mark.not-scored.hovered {
  background: rgba(136, 136, 136, 0.5); /* Gray hover background with higher alpha */
  border-left: 1px solid #888888; /* Gray hover border */
  border-right: 1px solid #888888;
}



.hovered.generic_panel_button {
  background-color: var(--bs-btn-hover-bg) !important;
  border-color: var(--bs-btn-hover-border-color) !important;
}

.annot_div{
  padding: 5px;
  border: 1px solid #ccc;
}


.channel_container{
  position: relative;
  height: var(--channel-container-height);  
  width: 100%;
  flex: 1;
}

.annot_div {
  padding: 5px;
  background-color: #f2f2f2;
  border: 1px solid #ccc;
}

.generic_panel_button{
  width: 100%;
  /* padding: 5px; */
}

.hover-shadow:hover {
  box-shadow: inset 0 0 5px 2px rgba(0, 0, 0, 0.3);
}

.generic_panel_option{
  width: 100%;
  padding: 5px;
}

.generic_panel_option{
  width: 100%;
  padding: 5px;    
}

/* .resizer {
  width: 100%;
  height: 2px;
  background: #2f2e2e;
  position: absolute;
  bottom: 0;
  right: 0;
  cursor: se-resize;
} */


.fixed-options {
  position: fixed;
  z-index: 1;
  width: inherit;
}

.container-fluid {
  height: 93vh;
  display: flex;
  flex-direction: column;
}

.middle {
  display: flex;
  flex: 1;
  background-color: #e1e1e1;
}

.mid_mid {
  flex: 1;
  background-color: var(--signal-background);
  position: relative;
  overflow-y: hidden;
  overflow-x: hidden;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.canvas_container {
  height: 100%;
  width: 100%;
  flex-direction: column;
  display: flex;
  overflow-y: hidden;
  overflow: hidden;
  position: relative;
}

#session_view{
  overflow-y: scroll;
  height: 80vh;
}

#json-preview,
#json-display {
  height: 50vh;
}

.amplitude-range-popover .popover-arrow {
  display: none;
}

.amplitude-range-popover {
  transform: translate(-100px,-100px) !important;
  max-width: 100%;
}

.no-arrows::-webkit-outer-spin-button,
.no-arrows::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.no-arrows {
  -moz-appearance: textfield;
}

/* Drag and drop styles for channel buttons */
.channel_button.dragging {
    opacity: 0.6;
    cursor: grabbing;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.channel_button.drag-over {
    border-top: 2px solid #007bff;
}

/* Style for when a channel is being dragged */
.channel_list-container {
    position: relative;
}

/* Visual indicator for drop target */
.drop-indicator {
    height: 2px;
    background-color: #007bff;
    position: absolute;
    left: 0;
    right: 0;
    z-index: 100;
    display: none;
}

/* Cursor styles for draggable elements */
[draggable="true"] {
    cursor: grab;
}

[draggable="true"]:active {
    cursor: grabbing;
}

/* Last clicked channel indicator */
.last-clicked-channel {
    border-left: 3px solid #0d6efd !important; /* Bootstrap primary color */
    position: relative;
    background-color: rgba(13, 110, 253, 0.15) !important; /* Light blue background */
}

.last-clicked-channel::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #0d6efd;
}

/* Add a pulsing animation to make the selection more noticeable */
@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.4);
    }
    70% {
        box-shadow: 0 0 0 4px rgba(13, 110, 253, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
    }
}

.last-clicked-channel {
    animation: pulse-border 2s infinite;
}

/* Initially hide the input field */
.bottom  {
  z-index: 10;
}

.bottom-menu-filter-input,
.bottom-menu-filter-unit {
  width: 0px;
  transition: visibility 0s, width 0.3s ease-in-out;
}

.bottom-menu-filter-unit {
  visibility: hidden;
}

.bottom-menu-filter-unit.show {
  visibility: visible;
  width: 1.7vw;
}

.bottom-menu-input {
  width: 5vw !important;
}

.bottom-menu-input-sm {
  width: 3vw !important;
}

#nav_session_name {
  display: inline;
  margin: 0;
  outline: none;
  padding: 5px;
  background: inherit;
  cursor: pointer;
}

#nav_session_name:focus {
    background: #767575;
    outline: none;
    border: none;
    border-radius: 4px;
}

.dropdown-submenu {
        position: relative;
    }

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
}

.dropdown-submenu:hover > .dropdown-menu {
    display: block;
}