/* ==========================================================================
   Course Theme Variables
   ==========================================================================
   Single source of truth for course-specific colors. When the MkDocs
   palette changes (primary/accent in mkdocs.yml), update the values here
   and all CSS that references these variables will follow automatically.

   Current palette: indigo / cyan  (mkdocs.yml → theme.palette)
   ========================================================================== */

:root {
  /* Primary — matches mkdocs primary: indigo */
  --course-primary: #3f51b5;                       /* indigo 500 */
  --course-primary-light: #7986cb;                 /* indigo 300 */
  --course-primary-dark: #283593;                  /* indigo 800 */
  --course-primary-10: rgba(63, 81, 181, 0.10);
  --course-primary-12: rgba(63, 81, 181, 0.12);
  --course-primary-15: rgba(63, 81, 181, 0.15);

  /* Accent — matches mkdocs accent: cyan */
  --course-accent: #00bcd4;                        /* cyan 500 */
  --course-accent-light: #4dd0e1;                  /* cyan 300 */
}

/* Dark mode overrides */
[data-md-color-scheme="slate"] {
  --course-primary: #7986cb;                       /* lighter indigo for dark bg */
  --course-primary-light: #9fa8da;
  --course-primary-dark: #3949ab;
  --course-primary-10: rgba(121, 134, 203, 0.12);
  --course-primary-12: rgba(121, 134, 203, 0.12);
  --course-primary-15: rgba(121, 134, 203, 0.15);

  --course-accent: #4dd0e1;
  --course-accent-light: #80deea;
}

/* ==========================================================================
   Announcement Bar
   Dark navy bg with white text — forced in both light and dark mode.
   ========================================================================== */

[data-md-color-scheme="default"] .md-announce {
  background-color: #1a237e !important;
}

[data-md-color-scheme="default"] .md-announce,
[data-md-color-scheme="default"] .md-announce a,
[data-md-color-scheme="default"] .md-announce a strong,
[data-md-color-scheme="default"] .md-announce__inner {
  color: #ffffff !important;
}

[data-md-color-scheme="default"] .md-announce a svg path {
  fill: #ffffff !important;
}


/* --------------------------------------------------------------------------
   OPTION 1: Group background tints
   Each tab group gets a slightly different shade of indigo.
   Comment out this block and uncomment Option 3 below to switch styles.
   -------------------------------------------------------------------------- */

/* Group 1: Course essentials — Home, Syllabus, Lecture Notes (base indigo) */
/* No override needed — inherits default --md-primary-fg-color */

/* --------------------------------------------------------------------------
   Nav Tab Group Tints
   Each tab group gets a slightly different shade to visually separate them.
   Tabs: Home(1) Syllabus(2) Weeks(3) Recaps(4) | Concepts(5) Guides(6) | Quizzes(7) Individual(8) Group(9) | References(10)
   Update nth-child values if tabs are added/removed/reordered.
   -------------------------------------------------------------------------- */

/* Group 1: Course info — dark indigo (WCAG AAA 12.6:1 with white)
   Tabs: Syllabus(2) Weeks(3) Recaps(4) */
.md-tabs__item:nth-child(2) {
  background-color: #1a237e;
  border-radius: 6px 0 0 0;
  margin-left: 3px;
}

.md-tabs__item:nth-child(3) {
  background-color: #1a237e;
}

.md-tabs__item:nth-child(4) {
  background-color: #1a237e;
  border-radius: 0 6px 0 0;
}

/* Group 2: Learning materials — dark teal (WCAG AA 5.7:1 with white)
   Tabs: Concepts(5) Guides(6) */
.md-tabs__item:nth-child(5) {
  background-color: #00695c;
  border-radius: 6px 0 0 0;
  margin-left: 3px;
}

.md-tabs__item:nth-child(6) {
  background-color: #00695c;
  border-radius: 0 6px 0 0;
}

/* Group 3: Assignments — dark cyan (WCAG AAA 7.8:1 with white)
   Tabs: Quizzes(7) Individual(8) Group(9) */
.md-tabs__item:nth-child(7) {
  background-color: #00838f;
  border-radius: 6px 0 0 0;
  margin-left: 3px;
}

.md-tabs__item:nth-child(8) {
  background-color: #00838f;
}

.md-tabs__item:nth-child(9) {
  background-color: #00838f;
  border-radius: 0 6px 0 0;
}

/* ==========================================================================
   Lightbox affordance (mkdocs-glightbox)
   ==========================================================================
   glightbox wraps each image in <a class="glightbox">. Make it obvious
   the image is clickable: pointer cursor, subtle hover lift, and a small
   "click to enlarge" hint that appears on hover.
   ========================================================================== */

.glightbox {
  display: inline-block;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.glightbox img {
  transition: filter 0.15s ease;
}

.glightbox:hover img {
  filter: brightness(1.03);
}

.glightbox:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Magnifier icon in the top-right corner, shown on hover */
.glightbox::after {
  content: "⛶";
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.glightbox:hover::after {
  opacity: 1;
}
