/* Existing content of src/analysis/public/css/style.css */

body {
  background-color: var(--bg);
}

#app {
  height: 100vh;
  width: 100%;
  display: grid;
  grid-template-columns: 275px auto;
  grid-template-rows: 75px 30px auto;
  transition: 0.3s visibility, opacity;
  opacity: 0;
  visibility: hidden;
  background-color: var(--bg);
  overflow: hidden;
}

#app.visible {
  visibility: unset;
  opacity: 1;
  transition: visibility 0s 0s, opacity 0.3s 0s;
}

#menu {
  height: 100%;
  width: 100%;
}

#sidebar {
  grid-area: 3 / 1 / 4 / 2;
  background-color: var(--bg-alt);
  padding: 16px;
  height: calc(100vh - 75px);
  overflow: auto;
  display: grid;
  min-height: 0;
  grid-template-rows: auto auto 1fr;
}

#header {
  background: var(--text);
  border-bottom: 0.25vh solid white;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  box-shadow: 0 0 12px -2px #ff6030;
  grid-area: 1 / 2 / 2 / 4;
}

#dashboard {
  grid-area: 1 / 2 / 4 / 4;
  overflow: hidden;
  position: relative;
}

#team-view {
  height: 100%;
  width: 100%;
  display: grid;
  grid-template-rows: 1fr;
  overflow: hidden;
  grid-template-columns: 1fr;
}

#team-view.side-enabled {
  grid-template-columns: 75% 25%;
}

#main-list {
  grid-area: 1 / 1 / 2 / 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  overflow-y: scroll;
  padding: 40px 0;
}

#main-list > div.hidden {
  display: none;
}

#side-list {
  grid-area: 1 / 2 / 2 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  overflow-y: scroll;
  padding: 40px 0;
}

#side-list > div.hidden {
  display: none;
}

#logo {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  grid-area: 1 / 1 / 3 / 2;
  gap: 14px;
  background-color: var(--accent-alt);
}

#logo-img {
  height: 50px;
}

#logo-text {
  color: white;
  font-size: 2.5rem;
}

#search {
  position: relative;
}

#search-container {
  padding: 20px 0;
  border-top: 1px solid var(--accent-alt);
  border-bottom: 1px solid var(--accent-alt);
  box-shadow: 0 -7px 10px -10px var(--accent-alt);
  border-radius: 8px 8px 0 0;
  margin: 20px 0;
}

#search-input {
  border-radius: var(--border-radius);
  border: none;
  width: 100%;
  font-size: 1.2rem;
  padding: 0 40px 0 12px;
  background-color: var(--bg);
  border: 2px solid var(--accent-alt);
}

#search-icon {
  position: absolute;
  top: 50%;
  right: 12px;
  font-size: 1.2rem;
  transform: translateY(-50%);
  transition: 0.3s color;
}

#search-input:focus + #search-icon,
#search-input:valid + #search-icon {
  color: var(--accent);
}

#loading-bar-container {
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 100%;
  z-index: 99;
}

#loading-bar {
  background-color: var(--accent-alt);
  height: 100%;
  width: 0%;
  transition: 0.3s all;
}

.team-container {
  border-radius: 16px;
  border: 2px solid var(--accent-alt);
  background-color: var(--bg);
  padding: 16px;
  border-top-width: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: 0.3s border, 0.3s background-color;
}

.team-container > .team-number {
  text-align: center;
  color: var(--accent-alt);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.5rem;
  transition: 0.3s color;
}

.team-container > .team-name {
  text-align: center;
  font-size: 1.2rem;
  line-height: 1.2rem;
  color: var(--text);
  transition: 0.3s color;
}

.team-container.selected {
  background-color: var(--accent-alt);
  border-top-width: 2px;
}

.team-container.selected > .team-number,
.team-container.selected > .team-name {
  color: var(--bg-alt);
}

#team-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: auto;
  padding-right: 2px;
}

#welcome {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 32px;
}

#welcome-text {
  font-size: 4rem;
  line-height: 1em;
  color: var(--accent-alt);
  text-align: center;
}

#welcome-subtext {
  font-size: 2.5rem;
  line-height: 1em;
  margin-bottom: 40px;
}

#dashboard > div {
  width: 100%;
  transition: 0.3s visibility, opacity;
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  visibility: hidden;
}

#dashboard > div.visible {
  visibility: unset;
  height: calc(100vh);
  opacity: 1;
  transition: visibility 0s 0s, opacity 0.3s 0s;
}

#match-view-switch,
#bubble-sheet-switch,
#auto-pick-switch {
  background-color: var(--bg);
  border: 3px solid var(--accent);
  border-radius: var(--border-radius);
  font-size: 1.3rem;
  width: 100%;
  color: var(--text);
  cursor: pointer;
  transition: 0.3s color, 0.3s background-color;
  margin-bottom: 10px;
}

#match-view-switch.selected,
#bubble-sheet-switch.selected,
#auto-pick-switch.selected {
  background-color: var(--accent);
  color: var(--bg-alt);
}

#match-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

#select-teams-text {
  font-size: 3rem;
  line-height: 1em;
  color: var(--accent-alt);
  margin-top: 32px;
  margin-bottom: 10px;
}

#team-selects {
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-items: center;
}

#auto-pick-view {
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
  overflow: auto;
}

#pick-list-text {
  font-size: 25px;
  line-height: 1em;
  color: var(--accent-alt);
  margin-top: 32px;
  margin-bottom: 10px;
}

#team-list-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: 40px;
  gap: 10px;
  overflow: auto;
  min-width: 150px;
  min-height: 600px;
}

#auto-pick-team-list {
  display: flex;
  flex-direction: column;
  flex-basis: auto;
  margin-bottom: 15px;
  gap: 10px;
  overflow: auto;
}

#auto-pick-main {
  width: 95%;
  min-width: 475px;
  min-height: 600px;
  flex-direction: column;
  overflow: auto;
  margin: auto;
  margin-bottom: 10px;
  gap: 10px;
  margin-top: 32px;
}

#auto-pick-side {
  display: flex;
  flex-direction: column;
  overflow: auto;
  gap: 10px;
  min-width: 200px;
  min-height: 600px;
  margin-bottom: 15px;
  margin-top: 32px;
}

#alliance-vs {
  font-size: 1.5rem;
}

.alliance-selects {
  display: flex;
  flex-direction: row;
  gap: 8px;
}

.alliance-selects > select {
  width: 90px;
}

.select {
  border-radius: var(--border-radius);
  border: 2px solid var(--text);
  font-size: 1.2rem;
  text-align: center;
  color: var(--text);
  background-color: var(--bg-alt);
  transition: 0.2s border-color;
}

.select > option {
  text-align: center;
}

.select.filled {
  border-color: var(--accent-alt);
}

#match-select-label {
  font-size: 1.4em;
  /* font-weight: 00; */
}

#match-select-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

#match-select {
  width: 100px;
}

#alliance-module-container {
  display: flex;
  flex-direction: row;
  width: 100%;
  overflow-y: scroll;
}

.alliance-modules {
  width: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  overflow-y: scroll;
  padding: 10px 0 20px 0;
}

.alliance-modules.hidden {
  visibility: hidden;
}

.alliance-modules > div.hidden {
  display: none;
}

#auto-pick-stats {
  overflow: auto;
  /*
  margin-left:75px;
  margin-top:50px;
  color:red;
  border-width:5px;
  border-color:red;
  */
}

/* Added styles to make the bubble sheet graph fill the whole screen */

#bubble-sheet-view {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

#bubble-sheet-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  background-color: var(--bg-alt);
  z-index: 1;
}

#bubble-sheet-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

#bubble-sheet-graph {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* Add these new styles */
.sidebar-toggle {
  display: none; /* Hidden by default on desktop */
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  background: var(--accent-alt);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  color: white;
  font-size: 1.2rem;
}
#event-dropdown {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
}
#event-dropdown button {
  padding: 8px 12px;
  cursor: pointer;
}
#event-menu {
  display: none;
  position: absolute;
  right: 0;
  background: white;
  border: 1px solid #ccc;
  min-width: 120px;
}
#event-menu div {
  padding: 8px 12px;
  cursor: pointer;
}
#event-menu div:hover {
  background-color: #f0f0f0;
}
/* Modify the existing media query */
@media screen and (max-width: 1100px) {
  html {
    font-size: 75%;
  }

  #app {
    grid-template-columns: 200px auto;
    grid-template-rows: 40px 20px auto;
  }

  #x > div.visible {
    height: calc(100vh - 40px);
  }

  #main-list {
    padding: 25px 0;
  }

  #side-list {
    padding: 25px 0;
  }

  #logo {
    position: fixed; /* Make logo fixed at top */
    top: 0;
    left: -275px; /* Start hidden, same as sidebar */
    width: 275px; /* Match sidebar width */
    height: 75px; /* Set fixed height */
    z-index: 999; /* Same z-index as sidebar */
    transition: left 0.3s ease; /* Match sidebar transition */
  }

  #sidebar.expanded + #logo,
  #sidebar.expanded {
    left: 0;
  }

  #sidebar {
    position: fixed;
    left: -275px;
    width: 275px;
    top: 75px;
    height: calc(100vh - 75px);
    transition: left 0.3s ease;
    z-index: 999;
    display: flex;
    flex-direction: column;
  }

  #sidebar > div:nth-child(2) {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
  }

  #button-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  #search-container {
    flex: 1;
    margin: 0;
    padding: 0;
    border: none;
  }

  #team-list {
    margin-top: 0;
  }

  #sidebar.expanded {
    left: 0;
  }

  #logo.expanded {
    left: 0;
  }

  .sidebar-toggle {
    display: block;
    transition: opacity 0.15s ease;
    opacity: 1;
  }

  #app {
    grid-template-columns: 0px auto;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
  }

  .sidebar-overlay.active {
    display: block;
  }
}
