/* Instructor info row */
.course-instructor-header .instructor-info .instructor-select {
  font-size: 28px;
}
@media (max-width: 900px) {
  .course-instructor-header .instructor-info .instructor-select {
    font-size: 22px;
  }
}
.course-instructor-header .instructor-menu {
  box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.2);
}
/* Change tooltip alignment */
@media (min-width: 768px) {
  .tooltip-inner {
    margin-left: 8.15rem;
  }
}

.course-info-container {
  width: 100%;
  margin-bottom: 50px;
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  row-gap: 10px;
}

.times-info-container {
  width: 100%;
  display: flex;
}

.grades-ratings-container {
  width: 100%;
  height: 300px;
  display: flex;
  gap: 10px;
}

.grades-container {
  position: relative;
  width: 45%;
  height: 100%;
  flex-shrink: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  z-index: 0;
}

.chart-container {
  position: relative;
  margin-top: none;
  height: 80vh;
  width: 80vw;
}

.chart-button {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
}

.ratings-container {
  height: 100%;
  display: flex;
  flex-grow: 1;
  flex-direction: column;
  gap: 10px;
}

.ratings-row {
  display: flex;
  height: 50%;
}

.rating-card {
  height: 100%;
  background-color: white;
  width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.rating-card-num {
  font-size: 42px;
  color: #d75626;
}

.rating-card-desc {
  font-size: 18px;
}

.info-container {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  background-color: white;
  height: 100%;
  margin-left: 10px;
  padding-top: 6px;
  padding-bottom: 6px;
  padding-left: 8px;
  justify-content: space-around;
  min-width: 250px;
}

.absolute-center {
  position: absolute;
  top: auto;
  left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.bottom-center {
  position: absolute;
  bottom: 10px;
  left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.top-center {
  position: absolute;
  top: 10px;
  left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.gpa-text {
  color: #384676;
  font-size: 28px;
  margin: 0;
}

.students-text {
  color: #56679d;
  font-size: 16px;
  margin: 0;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.info-title {
  font-size: 14px;
  width: 130px;
  padding-left: 5px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.info-bar .progress {
  margin: 0;
  padding: 0;
}
.info-bar .progress-bar {
  margin: 0;
  padding: 0;
}

.info-num {
  display: flex;
  justify-content: flex-end;
  width: 70px;
  padding-right: 10px;
}

.info-bar {
  flex-grow: 1;
  flex-shrink: 1;
}

@media (max-width: 1100px) {
  .grades-ratings-container {
    flex-direction: column;
    height: 650px;
  }

  .grades-container {
    height: 50%;
    width: 100%;
  }

  .ratings-container {
    height: 50%;
  }

  .info-container {
    margin-right: 0;
  }

  .gpa-text {
    font-size: 24px;
  }
  .students-text {
    font-size: 14;
  }
}

@media (max-width: 800px) {
  .info-num {
    width: 60px;
  }
}

@media (max-width: 500px) {
  .ratings-container {
    height: 200px;
  }
  .ratings-container {
    height: 38%;
  }
  .grades-container {
    height: 62%;
  }
  .rating-card-num {
    font-size: 24px;
  }
  .rating-card-desc {
    font-size: 14px;
  }
  .info-title {
    font-size: 12px;
    width: 120px;
  }
  .info-num {
    font-size: 14px;
    width: 30;
  }
  .progress {
    height: 14px;
  }
}

@media (max-width: 410px) {
  .grades-ratings-container {
    height: 400px;
  }

  .grades-container {
    height: 50%;
  }

  .ratings-container {
    height: 50%;
  }
  .rating-card-num {
    font-size: 16px;
  }
  .rating-card-desc {
    font-size: 10px;
  }
  .info-title {
    font-size: 10px;
    width: 90;
  }
  .info-container {
    font-size: 10px;
  }
  .info-num {
    font-size: 10px;
  }
  .progress {
    height: 10px;
  }

  .gpa-text {
    font-size: 18px;
  }
  .students-text {
    font-size: 12px;
  }
  .info-container {
    width: 250px;
    flex-shrink: 1;
    min-width: 0;
  }
  .rating-card {
    width: 70px;
    min-width: 80px;
    flex-grow: 1;
    flex-shrink: 1;
  }
  .grades-container {
    margin-bottom: 0;
  }
}

@media (max-width: 380px) {
  .info-bar {
    width: 50%;
    flex-shrink: 2;
    margin-right: 0;
    padding-right: 0;
  }
  .info-num {
    margin-left: 2;
  }
}

.rotated {
  transform: rotateZ(90deg);
}

#sectionInfo {
  max-width: 100%;
  overflow-x: hidden;
  padding-top: 4px;
}

/* Enrollment progress bar */
@media (max-width: 1200px) {
  .enrollment-progress,
  .waitlist-progress {
    width: 30px !important;
  }
}
@media (max-width: 1024px) {
  .enrollment-info {
    display: none !important;
  }
  .times-info-container .grid {
    grid-template-columns: [start] 6ch [sec-num] 150px [type] 1fr [end] !important;
  }
  .section-row {
    grid-template-columns: [start] 6ch [sec-num] 150px [type] 1fr [end];
  }
}

.enrollment-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.enrollment-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  margin: 0 60px;
}

.enrollment-metrics {
  display: flex;
  gap: 30px;
  flex: 1;
  max-width: 700px;
  margin: 0 auto;
}

.enrollment-metric {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
}

.metric-label {
  font-size: 14px;
  white-space: nowrap;
  width: 85px;
  text-align: right;
}

.enrollment-progress,
.waitlist-progress {
  width: 100px;
  height: 8px;
  margin: 0;
}

.metric-text {
  font-size: 14px;
  white-space: nowrap;
  width: 70px;
  text-align: left;
}

.waitlist-bar {
  background-color: #ffc107;
}

/* Section styles */
.sections-header {
  margin-bottom: 15px;
}

.sections-toggle-wrapper {
  margin-left: auto;
  padding-left: 2rem;
}

.sections-toggle {
  display: flex;
  align-items: stretch;
  height: 34px;
  border-radius: 6px;
  overflow: hidden;
  background-color: #f8f9fa;
  position: relative;
  padding: 2px;
}

.section-count {
  background-color: var(--tcf-blue, #384676);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  margin-left: 7px;
  font-weight: 500;
}

.section-row {
  display: grid;
  grid-template-columns:
    [start] 6ch [sec-num] 150px [type] minmax(200px, 1fr) [times] minmax(
      120px,
      auto
    )
    [end];
  gap: 16px;
  margin-bottom: 4px;
  align-items: center;
  padding: 12px 16px;
  background-color: white;
  border-radius: 6px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.section-row:hover {
  transform: translateY(-1px);
  border-color: var(--tcf-blue, #384676);
  box-shadow: 0 2px 4px rgba(56, 70, 118, 0.08);
  text-decoration: none;
  color: inherit;
}

.section-row > div {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  line-height: 1.4;
}

.section-row > div:first-child {
  font-weight: 500;
  color: var(--tcf-blue, #384676);
}

.section-row > div:last-child {
  text-align: right;
  color: #666;
}

.hidden-section {
  display: none !important;
}

.toggle-sections {
  cursor: pointer;
  transition: background-color 0.2s ease;
  user-select: none;
  display: inline-flex;
  align-items: center;
}

.toggle-sections:hover {
  background-color: var(--tcf-blue-dark, #2c3e8c) !important;
}

.toggle-icon {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.toggle-icon.fa-chevron-up {
  transform: rotate(180deg);
}

/* Section toggle */
.toggle-option {
  padding: 0 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  color: #666;
  position: relative;
  z-index: 1;
  border-radius: 4px;
  min-width: 90px;
}

.toggle-option:hover:not(.active) {
  color: var(--tcf-blue, #384676);
}

.toggle-option.active {
  color: white;
}

.toggle-option.active::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--tcf-blue, #384676);
  border-radius: 4px;
  z-index: -1;
  box-shadow: 0 2px 4px rgba(56, 70, 118, 0.2);
}

@media (max-width: 768px) {
  .sections-toggle {
    height: 32px;
  }

  .toggle-option {
    padding: 0 16px;
    font-size: 12px;
    min-width: 80px;
  }
}
