/* Hide the Canvas setup checklist button */
a#course_setup_checklist_btn {
    display: none !important;
}

/* =========================================================================
   Dashboard launchpad
   Markup and placement come from the root theme JS (module 2, v1.0.18+).
   One ruleset for both the new and classic dashboards: the JS mounts the
   panel inside each dashboard's own padded content area, so no per-dashboard
   rules are needed here.

   Panel values mirror Canvas's widget cards (InstUI View: padding "medium",
   borderRadius "large", shadow "above"). Text uses Canvas's brand font
   color variable, so it matches the page and follows the Theme Editor.
   Grid columns respond to the panel's own width (container query), not the
   viewport, so the classic dashboard's right sidebar doesn't matter.
   ========================================================================= */

#content #lane-dashboard-launchpad {
  /* 0.5rem sides = the margin Canvas puts around each widget card */
  margin: 1rem 0.5rem;
}

#content #lane-dashboard-launchpad,
#content #lane-dashboard-launchpad * {
  box-sizing: border-box;
}

#content #lane-dashboard-launchpad .lane-launchpad__panel {
  background: #ffffff;
  /* Transparent border: invisible normally, drawn in Windows High Contrast
     mode, where box-shadow is removed */
  border: 1px solid transparent;
  border-radius: 0.5rem;
  box-shadow: 0 0.1875rem 0.375rem rgba(0, 0, 0, 0.1),
    0 0.1875rem 0.375rem rgba(0, 0, 0, 0.15);
  container-type: inline-size;
  padding: 1.5rem;
}

/* 1 column, then 2x2, then 4 across. Never 3 + 1. */
#content #lane-dashboard-launchpad .lane-launchpad__grid {
  display: grid;
  gap: 1rem 1.5rem;
  grid-template-columns: minmax(0, 1fr);
}

@container (min-width: 24rem) {
  #content #lane-dashboard-launchpad .lane-launchpad__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container (min-width: 48rem) {
  #content #lane-dashboard-launchpad .lane-launchpad__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

#content #lane-dashboard-launchpad .lane-launchpad__card {
  color: inherit;
  display: block;
  min-width: 0;
  text-decoration: none;
}

/* Outline button, sized and shaped like Canvas's own buttons (1px border,
   0.25rem radius). 2.75rem = 44px, a comfortable touch target. */
#content #lane-dashboard-launchpad .lane-launchpad__button {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--lane-accent, #00529b);
  border-radius: 0.25rem;
  color: var(--lane-accent, #00529b);
  display: flex;
  font-size: 1rem;
  font-weight: 700;
  gap: 0.375rem;
  justify-content: center;
  line-height: 1.25;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  text-align: center;
  transition: background-color 0.15s ease;
}

#content #lane-dashboard-launchpad .lane-launchpad__label {
  min-width: 0;
}

#content #lane-dashboard-launchpad .lane-launchpad__icon {
  flex: 0 0 auto;
  font-size: 1.25rem;
  line-height: 1;
}

#content #lane-dashboard-launchpad .lane-launchpad__icon--google {
  font-size: 1rem;
  font-weight: 800;
}

#content #lane-dashboard-launchpad .lane-launchpad__description {
  color: var(--ic-brand-font-color-dark, #273540);
  font-size: 0.875rem;
  line-height: 1.4;
  margin: 0.5rem 0 0;
}

#content #lane-dashboard-launchpad .lane-launchpad__card:hover .lane-launchpad__button {
  background: var(--lane-accent-soft, rgba(0, 82, 155, 0.1));
}

/* Focus ring on the button, as outline (box-shadow rings disappear in
   Windows High Contrast mode) */
#content #lane-dashboard-launchpad .lane-launchpad__card:focus {
  outline: none;
}

#content #lane-dashboard-launchpad .lane-launchpad__card:focus-visible .lane-launchpad__button {
  outline: 2px solid var(--ic-brand-primary, #00529b);
  outline-offset: 2px;
}

/* Accents. Each keeps >= 4.5:1 text contrast on white and on its own
   10% hover tint (WCAG 1.4.3). */
#content #lane-dashboard-launchpad .lane-launchpad__card[data-accent="red"] {
  --lane-accent: #b40909;
  --lane-accent-soft: rgba(180, 9, 9, 0.1);
}

#content #lane-dashboard-launchpad .lane-launchpad__card[data-accent="orange"] {
  /* Darkened from #ac5d1c, which measured 4.0:1 on its hover tint */
  --lane-accent: #9e5519;
  --lane-accent-soft: rgba(158, 85, 25, 0.1);
}

#content #lane-dashboard-launchpad .lane-launchpad__card[data-accent="blue"] {
  --lane-accent: #053a6a;
  --lane-accent-soft: rgba(5, 58, 106, 0.1);
}

#content #lane-dashboard-launchpad .lane-launchpad__card[data-accent="green"] {
  --lane-accent: #00493b;
  --lane-accent-soft: rgba(0, 73, 59, 0.1);
}

/* Phones: Canvas drops the margin around widget cards below 640px */
@media (max-width: 639px) {
  #content #lane-dashboard-launchpad {
    margin-left: 0;
    margin-right: 0;
  }
}

/* =========================================================================
   Course Settings hold
   Pairs with root theme JS module 6 (v1.0.20+). Canvas runs the theme JS
   after the page is on screen, so the JS alone can't hide the course
   Settings link before users see it. This CSS loads before the page is
   drawn, so it can.

   On course pages, the Settings link starts invisible, with its space kept
   so nothing shifts. When module 6 decides, it adds lane-settings-decided
   to <html>: the link then shows, or stays hidden for the roles it hides.
   If the JS never runs, the link appears after 3s anyway.

   Scoped to course pages: account pages also have a Settings link with
   this class, and module 6 doesn't run there.
   ========================================================================= */

body[class*="context-course_"] #section-tabs a.settings {
  animation: lane-settings-hold 0s 3s both;
}

html.lane-settings-decided body[class*="context-course_"] #section-tabs a.settings {
  animation: none;
}

@keyframes lane-settings-hold {
  from { visibility: hidden; }
  to { visibility: visible; }
}
