/* General Styles */



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family:'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}
:root {
    height: 100%;
    --light-mode-bg: rgba(209, 209, 209, 0.75);
    --dark-mode-bg: rgba(94, 94, 94, 0.75);
    --dark-bg: rgb(20, 20, 20);
    --light-bg: white;
}


body {
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    transition: background-color 1.5s ease;
}


.container {
    display: flex;
    width: 100vw;
}

/* Sidebar Styles */
.sidebar {
    z-index: 900;
    width: 5vw;
    /* background-color: #134B57;*/
    color: white;
    display: flex;
    flex-direction: column;
    align-items: start;
    height: 100vh;
    color: black;
    transition: 0.2s width ease-out, 1.5s background-color ease, box-shadow 0.3s ease-out, color 1.5s ease;
    backdrop-filter: blur(50px);
    position: fixed;
    
}

.menuMobile {
  display: none;
}
.sidebarItem {
  padding-left: 0.5vw;
  display: flex;
  justify-content: left;
  align-items: center;
  background-color: rgba(0, 0, 0, 0);
  width: 100%;
  height: 10vh;
  overflow: clip;
  /*border: 2px solid white;*/
  font-size: 2vw;
  
  font-weight: bold;
  transition: font-size 0.15s ease, background-color 0.15s ease;
  cursor: pointer;
}

.sidebarItem:hover {
 /* background: #185c6b;*/
  background-color: rgba(0, 0, 0, 0.1);
  font-size: 2.1vw;
}
.sidebarItem:hover > .menuPic {
  height: 4.1vw;
  width: 4.1vw;
}

/* Extend the orange header background to cover filter tags - INDEX PAGE ONLY */
body:not(.classPage) .header {
  height: 15vh !important; /* Increased from 14.5vh */
}

/* Update class grid to account for taller header - INDEX PAGE ONLY */
body:not(.classPage) .class-grid {
  padding-top: 22vh !important; /* Increased from 18.5vh */
}

/* Mobile adjustments - INDEX PAGE ONLY */
@media (max-width: 768px) {
  body:not(.classPage) .header {
      height: 20vh !important; /* Increased from 16vh */
  }
  
  body:not(.classPage) .class-grid {
      padding-top: 22vh !important;
  }
}
.mode {
  position: absolute;
  z-index: 999;
  left: 90vw;
  margin-top: 1.5vh;
  padding: 0.5%;
  border-radius: 25%;
  font-size: 5vh;
  transition: background-color 0.1s ease, transform 1s ease, filter 1.5s ease;
}
.mobileClose {
  display: none;
  transition: opacity 0.75s ease;
  opacity: 0;
}

.mode:hover {
  background-color: rgba(0, 0, 0, 0.1);
  /*transform: scale(1.15,1.15);*/
}


.menuPic {
  height: 4vw;
  width: 4vw;
  margin-right: 1vw;
  transition: all 0.15s ease, filter 1.5s ease;
}

.sidebar-icon {
  margin-right: 1vw;
}

/* Main Content Styles */
.main-content {
    width: 95vw;
  left: 5vw;
  position: absolute;
}

.header {
    z-index: 50;
    
    backdrop-filter: blur(10vh);
    will-change: backdrop-filter;
    transform: translateZ(0);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 14.5vh;
    font-size: 8vh;
    width: 95vw;
    transition: background-color 1.5s ease, color 1.5s ease;
}
.header > div {
  background-color: none;
}
.title {
  margin: 0 auto;
  text-align: center;
  height: inherit;
  z-index: 500;
  
}
.profileHolder {
  display: flex;
  align-items: center;
  height: 10vh;
}
.profile {
  height: 80%;
  border: 5px solid black;
  border-radius: 50%;
  margin-right: 1vw;
  transition: background 0.3s;
}
.profile:hover {
  background: #4c6b73;
}

/* Filter Buttons */
.filters {
    width: 95vw;
    height: 5vh;
  /*  display:flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 1vw;
    padding-top: 0.9vw;*/
}
/*.filterIcon {
  float: right;
  height: 100%;
  margin-right: 2vw;
  display:flex;
  align-items: center;
}*/
.filterIcon {
  display:flex;
  align-items: center;
  font-size: 5vh;
  float: right;
  margin-right: 2vw;
  margin-top: 1vh;
  border-radius: 50%;
  border: 1px solid black;
}

.filterArea {
    height:5vh;
    width: 95vw;
    display: flex;
    flex-wrap: nowrap; 
    justify-content: center; 
    align-items: flex-end;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    /*padding: 0 1vw 0 1vw;*/
}
.filterArea::-webkit-scrollbar {
    height: 0.5vh;
}

.filterArea::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.filterArea::-webkit-scrollbar-track {
    background: transparent;
}


.filterChip {
  display: inline-block;
  margin: 0 0.5vw;
}

/* Material Design Filter Chip Styling */
md-filter-chip {
  transition: all 0.3s ease;
  --md-sys-color-primary: #2196F3;
  --md-sys-color-on-primary: white;
  --md-sys-color-surface: rgba(255, 255, 255, 0.8);
  --md-sys-color-on-surface: #333;
  --md-sys-color-outline: #ccc;
  background-color: rgba(255, 255, 255, 0.5) !important;
  color: #333 !important;
}

md-filter-chip[selected] {
  background-color: rgba(255, 255, 255, 0.8) !important;
  color: #333 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

md-filter-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

md-filter-chip[selected]:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Remove the duplicate selected styling that was causing progressive blue */
/* Classes Grid */
.class-grid {
  /* top | right | bottom | left */
    position: absolute;
    top: 0vh;
    padding: 2.5vw;
    padding-top: 18.5vh;
    display: grid;
    grid-template-columns: 20vw 20vw 20vw 20vw;

    column-gap: 3.3vw;
    row-gap: 2vh;
    height: 100vh;
    width: 95vw;
    overflow-x: hidden;
    overflow-y: scroll;
}

.class-grid::-webkit-scrollbar {
    width: 0.5vw;
}

.class-grid::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.class-grid::-webkit-scrollbar-track {
    background: transparent;
}


.sidebar:hover {
  /*background-color: #165766;*/
  width: 17.5vw;
  box-shadow: 0 0 5vh rgba(0, 0, 0, 0.2);
}

.classHeader {
  width: 18vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: black;
}

.classHeader > span {
  width: 5vw;
  text-align: center;
}
.classIcon {
  height: 5vw;
  width: 5vw;
  text-align: center;
}
.className {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5vw;
  cursor: pointer;
  font-weight: bold;
  text-align: center;
  transition: transform 0.25s ease;
}

.classRate {
  margin-top: 1vh;
  padding: 0 1vh 0 1vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 6vh;
  width: 18vw;
  border: 1px solid black;
  border-radius: 2vh;
  backdrop-filter: saturate(80%);
  color: black;
}
.classDes {
  padding: 1%;
  margin-top: 1vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: auto;
  font-size: auto;
  color: black;
  
}
.classCard {
  border: 3px solid currentColor;
  height: min-content;
  width: fit-content;
  padding: 1vh 1vw 1vh 1vw;
  cursor: default;
  border-radius: 2vh;
  transition: box-shadow 0.2s ease, transform 0.1s ease, background-color 1.5s ease;
  
}
.classCard:hover {
  box-shadow: 0 0 1vh currentColor;
  transform: scale(1.005);
}
span {
  user-select: none;
}

/* Subject Color Styles - unified and visually meaningful */

/* Subject Color Styles - all lowercase for mapping */
.agriculture {
  background: #8bc34a !important; /* green for agriculture */
  color: #3e5c1c !important;
}
.appliedsciences, .technology, .engineering, .manufacturing {
  background: #607d8b !important; /* blue-grey for STEM */
  color: #263238 !important;
}
.arteducation, .arts {
  background: #ffb74d !important; /* orange for art */
  color: #7c4700 !important;
}
.business, .finance, .marketing, .management {
  background: #ffd600 !important; /* gold for business */
  color: #7c6f00 !important;
}
.career, .technicaleducation {
  background: #bdbdbd !important; /* grey for CTE */
  color: #333 !important;
}
.english {
  background: #7a98de !important;
  color: #5e75ab !important;
}
.health {
  background: #e57373 !important; /* red for health */
  color: #7f2323 !important;
}
.humanservices {
  background: #f8bbd0 !important; /* pink for human services */
  color: #7c3f58 !important;
}
.informationsolutions {
  background: #00bcd4 !important; /* cyan for info tech */
  color: #004d56 !important;
}
.mathematics, .math {
  background: #335a8a !important;
  color: #203957 !important;
}
.music {
  background: #ddc260 !important;
  color: #ab9649 !important;
}
.physicaleducation {
  background: #aed581 !important; /* light green for PE */
  color: #33691e !important;
}
.science {
  background: #7f995a !important;
  color: #55663c !important;
}
.socialstudies, .history {
  background: #5b135a !important;
  color: #290928 !important;
}
.worldlanguage, .foreignlanguage {
  background: #e99ca5 !important;
  color: #b57980 !important;
}
.misc {
  background: #c3044c !important;
  color: #8f0339 !important;
}

.closeMenu {
  z-index: 901;
  opacity: 0;
  transform: rotate(90deg);
  transition: opacity 0.25s ease, transform 0.5s ease;
}
.openMenu {
  z-index: 902;
  transition: opacity 0.25s ease, transform 0.5s ease;
}


/* Updated search bar styles for better visibility and positioning */

.search-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: -1vh 0vw 0 0vw; /* Remove negative left margin */
  /* width: 100%; */
  position: absolute;
  right: 9vw;
  top: 4vh;
  z-index: 100;
  /*padding-left: 1vw; Reduce left padding for better alignment */
}
.search-box {
  position: absolute;
  right: 0;
  display: flex;
  align-items: center;
  background: rgba(189, 189, 189, 0.95);
  border-radius: 2vh;
  padding: 0.8vh 1.5vw;
  backdrop-filter: blur(15px);
  border: 2px solid rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  width: calc(2vh + 1.5vw + 1.7vw);
  max-width: 35vw;
  max-height: 4vh;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  color: black;
  overflow: hidden;
}

.search-box:focus-within {
  background: rgba(255, 255, 255, 1);
  border-color: #a7a7a7;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  width: 25vw;
    right: 0;
}

.search-icon {
  color: rgba(0, 0, 0, 0.6);
  font-size: 2vh;
  margin-right: 0.8vw; 
  transition: color 0.2s ease;
}

.search-box:focus-within .search-icon {
  color: #000000;
}

#searchInput {
  background: transparent;
  border: none;
  outline: none;
  color: #333;
  font-size: 1.6vh;
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  width: 100%;
  padding: 0;
}

#searchInput::placeholder {
  color: rgba(0, 0, 0, 0.5);
  font-weight: 400;
}

.clear-search {
  color: rgba(0, 0, 0, 0.5);
  font-size: 2.2vh;
  cursor: pointer;
  margin-left: 0.8vw;
  padding: 0.2vh;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.clear-search:hover {
  color: #f44336;
  background: rgba(244, 67, 54, 0.1);
}

/* Dark mode adjustments */
.search-box.dark-mode {
  background: rgba(60, 60, 60, 0.95);
  border-color: rgba(255, 255, 255, 0.2);
}

.search-box.dark-mode:focus-within {
  background: rgba(80, 80, 80, 1);
  border-color: #64B5F6;
  box-shadow: 0 4px 20px rgba(100, 181, 246, 0.3);
}

.search-box.dark-mode .search-icon {
  color: rgba(255, 255, 255, 0.7);
}

.search-box.dark-mode:focus-within .search-icon {
  color: #64B5F6;
}

.search-box.dark-mode #searchInput {
  color: white;
}

.search-box.dark-mode #searchInput::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.search-box.dark-mode .clear-search {
  color: rgba(255, 255, 255, 0.6);
}

.search-box.dark-mode .clear-search:hover {
  color: #f44336;
  background: rgba(244, 67, 54, 0.2);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .search-container {
    margin: 1.5vh 3vw 0.5vh 3vw;
    width: calc(100% - 6vw);
  }
  
  .search-box {
    min-width: 70vw;
    max-width: 85vw;
    padding: 1.5vh 4vw;
    border-radius: 3vh;
  }
  
  .search-icon {
    font-size: 2.8vh;
    margin-right: 2vw;
  }
  
  #searchInput {
    font-size: 2.2vh;
  }
  
  .clear-search {
    font-size: 2.6vh;
    margin-left: 1.5vw;
  }
}


@media (hover: none) {
  .sidebarItem:hover {
  background-color: initial;
  font-size: initial;
  }
  .sidebar:hover {
    width: initial;
  }
.classCard:hover {
  box-shadow: initial;
  transform: initial;
}
.sidebar:hover {
  /*background-color: #165766;*/
  width: 5vw;
  box-shadow: initial;
}

}
.code:hover {
  background-color: none;
  font-size: inherit;
}
@media (max-width:768px) {
  .header {
    width: 100vw;
    left: 0vh;
    height: 16vh;
  }
  .class-grid {
    /* top | right | bottom | left */
    position: absolute;
    top: 0vh;
    padding-left: 6.6vw;
    column-gap: 6.6vw;
    padding-top: 18.5vh;
    grid-template-columns: 40vw 40vw;
    height: 100vh;
    width: 100vw;
  } 
  .classHeader {
    width: 38vw;
  }
  .className {
    width: 27vw;
    font-size: 1.75vh;
  }
  .classRate {
    height: 6vh;
    width: 38vw;
  }
  .sidebar {
    width: 40vw;
    transform: translateX(-40vw);
    box-shadow: 0 0 5vh rgba(0, 0, 0, 0.2);
    transition: transform 0.5s ease;
  }
  .sidebarItem {
    font-size: 3vh;
  }
  .menuPic {
    height: 6vh;
    width: 6vh;
  }
  .main-content {
    width: 100vw;
    left: 0vw;
  }
  .title {
    margin: auto;
    display: flex;
    align-content: center;
    justify-content: center;
    margin-left: auto;
    text-align: center;
  }
  .filterArea {
    width: 100vw;
    height: 5.5vh;
  }
  .menuMobile {
    display: flex;
    position: absolute;
    height: 6vh;
    width: 6vh;
    margin-top: 2vh;
    margin-left: 0.5vw;
    margin-right: 1vw;
  }
  .mobileClose {
    display: flex;
  }

}

:root {
  --md-assist-chip-container-shape: 0px;
  --md-assist-chip-label-text-font: system-ui;
  --md-sys-color-outline: #6F7979;
  --md-sys-color-on-surface: black;
  --md-filter-chip-selected-container-color: rgba(28, 109, 128, 0.5);
  --md-filter-chip-selected-pressed-label-text-color: black;
  --md-filter-chip-disabled-label-text-color: black;
  --md-filter-chip-hover-label-text-color: black;
  --md-filter-chip-label-text-color: black;
  --md-filter-chip-focus-label-text-color: black;
 --md-sys-color-surface-container-high: #e3e9e9;
    --md-sys-color-primary: #006a6a;

}



.fab {
    position: fixed;
    bottom: 2vh;
    right: 2vh;
    z-index: 9999;
  }