/*
 * Learning Center (v1): bordered tabs, card grid and category headings.
 *
 * Matches the v2 Help Articles page (events-web src/app/help), so the tab strip
 * and cards look the same when people move between the v1 tabs and the v2 one.
 *
 * Brand colour: --lc-brand and --lc-brand-contrast (white or black, whichever
 * reads on the brand colour) are set per school by BrandStylesFactory.injectStyle.
 * Unbranded schools fall back to #8db037 with white, the default v1 primary.
 * The tint uses color-mix(); browsers without it keep the plain #f6f8f0 tint
 * declared on the line before.
 *
 * Plain CSS (like help-launcher.css), not part of the gulp sass build.
 */

/* ---- Tabs ------------------------------------------------------------- */

.setup-nav ul.lc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.setup-nav ul.lc-tabs:before,
.setup-nav ul.lc-tabs:after {
  display: none; /* Bootstrap clearfix pseudo-elements would become flex items */
}
.setup-nav ul.lc-tabs > li {
  float: none;
  margin: 0;
  background: transparent;
}
.setup-nav ul.lc-tabs > li > a {
  display: block;
  padding: 9px 16px;
  border: 1px solid #d6d6d6;
  border-radius: 4px;
  background-color: #fff;
  color: #444;
  font-size: 13px;
  line-height: 1.6;
  transition: border-color .15s, background-color .15s;
}
.setup-nav ul.lc-tabs > li > a:hover,
.setup-nav ul.lc-tabs > li > a:focus {
  border-color: var(--lc-brand, #8db037);
  background-color: #f6f8f0;
  background-color: color-mix(in srgb, var(--lc-brand, #8db037) 8%, #fff);
  color: #333;
}
.setup-nav ul.lc-tabs > li.active > a,
.setup-nav ul.lc-tabs > li.active > a:hover,
.setup-nav ul.lc-tabs > li.active > a:focus {
  /* background and text colour come from the .nav-pills active rule and,
     for branded schools, from BrandStylesFactory */
  border-color: var(--lc-brand, #8db037);
  background-color: var(--lc-brand, #8db037);
  color: #fff;
}

/* ---- Page text, filters and counts ------------------------------------ */

.lc-intro {
  max-width: 760px;
  margin: 6px 0 0;
  color: #666;
}
.lc-filters {
  margin-bottom: 8px;
}
@media (max-width: 991px) {
  .lc-filters > [class*="col-"] { margin-bottom: 10px; } /* filters stack below md */
}
.lc-label {
  display: block;
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: #666;
}
select.form-control.lc-control {
  width: 100%;
  height: 36px;
  border-color: #d6d6d6;
  border-radius: 4px;
}
.lc-count {
  margin: 4px 0 8px;
  font-size: 12px;
  color: #888;
}

/* ---- Category headings ------------------------------------------------ */

.lc-group {
  margin-bottom: 8px;
}
.lc-group-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 12px;
  font-size: 19px;
  font-weight: 400;
  color: #444;
}
.lc-group-name:before {
  content: '';
  flex: none;
  width: 4px;
  height: 22px;
  border-radius: 2px;
  background: var(--lc-brand, #8db037);
}
.lc-group-name a {
  color: inherit;
  cursor: pointer;
}
.lc-group-name a:hover,
.lc-group-name a:focus {
  color: var(--lc-brand, #8db037);
}
.lc-group-count {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: #888;
}
.lc-subgroup-name {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 4px 0 10px;
  font-size: 15px;
  font-weight: 500;
  color: #555;
}

/* ---- Card grid -------------------------------------------------------- */

.lc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 24px;
}
@media (max-width: 991px) {
  .lc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .lc-grid { grid-template-columns: minmax(0, 1fr); }
}

.lc-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background-color: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 6px;
  color: #666;
  transition: border-color .15s, background-color .15s;
}
.lc-card:hover,
.lc-card:focus-within {
  border-color: var(--lc-brand, #8db037);
  background-color: #f6f8f0;
  background-color: color-mix(in srgb, var(--lc-brand, #8db037) 8%, #fff);
}
a.lc-card,
a.lc-card:hover,
a.lc-card:focus {
  color: #666;
  text-decoration: none;
  cursor: pointer;
}
.lc-card:focus-visible {
  outline: 2px solid var(--lc-brand, #8db037);
  outline-offset: 2px;
}

.lc-card-media {
  position: relative;
  flex: none;
  background-color: #f5f5f5;
  border-bottom: 1px solid #e3e3e3;
}
.lc-card-media > img {
  display: block;
  width: 100%;
}
.lc-card-media--dark {
  background-color: #000;
}
/* Link and document cards: brand-colour panel with the icon in the brand's
   contrast colour (white on dark brands, black on light ones). */
.lc-card-media--brand {
  background-color: var(--lc-brand, #8db037);
  border-bottom-color: transparent;
}
.lc-card-media--brand .lc-card-icon.fa {
  color: var(--lc-brand-contrast, #fff);
}
.lc-card-media .watermark {
  position: absolute;
  right: 0;
  bottom: 0;
}
.lc-card-media .fit-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.lc-card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 16px;
  line-height: 44px;
  text-align: center;
  padding-left: 3px;
}
.lc-card-icon.fa {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  color: var(--lc-brand, #8db037);
  text-decoration: none;
}

.lc-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 14px 16px 16px;
}
.lc-card-type {
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: #888;
}
.lc-card-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: #333;
}
.lc-card-text {
  max-height: 6.4em; /* about four lines; longer text scrolls, as before */
  margin: 0;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.6;
  color: #666;
}
.lc-card-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
  font-weight: 500;
  color: var(--lc-brand, #8db037);
}
