/* Active Plots Container */
.active-plots-container {
  position: fixed;
  top: 70px;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 1040;
  display: flex;
  gap: 10px;
  animation: fadeIn 0.3s ease-out;

  &::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
  }

  &.single-plot {
    justify-content: center;
  }
  &.side-by-side {
    justify-content: space-between;
  }
}

/* Plot Windows */
.active-plot-window {
  background: #fff;
  border: 0 solid #077da5;
  border-radius: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;

  &.full-width {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
  }
  &.half-width {
    width: calc(50% - 5px);
  }
}

.plot-window-content {
  flex: 1;
  overflow: auto;
  > * {
    height: 100%;
    overflow: auto;
  }
}

/* Minimized Plots */
.minimized-plots-container {
  position: fixed;
  top: 4px;
  left: 14%;
  transform: none;
  z-index: 1050;
  display: flex;
  gap: 8px;
  max-width: min(1040px, calc(100vw - 40px));
  overflow-x: auto;
  padding: 4px 8px 12px;
  justify-content: flex-start;
  animation: fadeIn 0.2s ease-out;
}

.minimized-plot-bar {
  background: #008cba;
  border-radius: 6px;
  padding: 2px 8px;
  width: 200px;
  min-width: 200px;
  transition: background 0.2s ease;
  animation: slideDown 0.3s ease-out;

  &:hover {
    background: #077da5;
  }
}

.minimized-plot-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.minimized-plot-title {
  color: #fff;
  font: 500 13px/1 sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  max-width: 140px;
}

.minimized-plot-actions {
  display: flex;
  gap: 4px;

  .btn {
    padding: 4px 6px;
    font-size: 16px;
    color: rgba(255, 231, 231, 0.89);
    border: none;
    background: none;

    &:hover {
      color: #fff;
    }
  }
}

.plot-window-title {
  flex: 1;
}

.plot-window-controls {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.plot-window-controls {
  display: flex;
  gap: 6px;
  flex-shrink: 0;

  .btn {
    padding: 4px 6px;
    font-size: 16px;
    color: rgba(255, 231, 231, 0.89);
    border: none;
    background: none;

    &:hover {
      color: #fff;
    }
  }
}

/* Animations */
@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
