/* SOA PD Hub - Course Listing
   Asset Injector CSS rule: "SOA PD Hub Course Listing"
   Condition -> Pages -> Return true on: /soa-pd-hub/course-listing
   All selectors are scoped under .soa-cl so nothing leaks into the theme. */

.soa-cl {
  --soa-maroon: #8A1538;
  --soa-maroon-dark: #6F002D;
  --soa-border: #DEE2E6;
  --soa-muted: #6C757D;
  --soa-text: #212529;
  --soa-surface-muted: #F8F9FA;
  font-family: "Libre Franklin", Arial, sans-serif;
  color: var(--soa-text);
}

.soa-cl__sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Toolbar ---------- */

.soa-cl__toolbar { margin-bottom: 16px; }

.soa-cl__search { position: relative; }

.soa-cl__search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--soa-muted);
  font-size: 15px;
  pointer-events: none;
}

.soa-cl__search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  font-size: 16px;
  font-family: inherit;
  line-height: 1.5;
  color: var(--soa-text);
  background: #FFFFFF;
  border: 1px solid var(--soa-border);
  border-radius: 4px;
  appearance: none;
}

.soa-cl__search-input:focus {
  outline: none;
  border-color: var(--soa-maroon);
  box-shadow: 0 0 0 3px rgba(138, 21, 56, 0.15);
}

/* ---------- Result count ---------- */

.soa-cl__count {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--soa-muted);
}

.soa-cl__count:empty { display: none; }

/* ---------- Cards ---------- */

.soa-cl__list { display: flex; flex-direction: column; gap: 16px; }

.soa-cl__card {
  position: relative;
  display: block;
  width: 100%;
  padding: 24px 56px 24px 24px;
  text-align: left;
  font-family: inherit;
  background: #FFFFFF;
  border: 1px solid var(--soa-border);
  border-radius: 0;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.soa-cl__card:hover,
.soa-cl__card:focus-visible {
  border-color: var(--soa-maroon);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.soa-cl__card:focus-visible { outline: 2px solid var(--soa-maroon); outline-offset: 2px; }

.soa-cl__card-chevron {
  position: absolute;
  top: 24px;
  right: 24px;
  color: var(--soa-muted);
  font-size: 16px;
}

.soa-cl__card:hover .soa-cl__card-chevron { color: var(--soa-maroon); }

.soa-cl .soa-cl__card-title {
  margin: 0 0 8px;
  font-family: "Oswald", "Libre Franklin", Arial, sans-serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.25;
  color: var(--soa-text);
}

.soa-cl__card-blurb {
  margin: 0 0 16px;
  /*
  font-size: 15px;
  line-height: 1.5;
  color: var(--soa-muted);
  */
}

.soa-cl__card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 14px;
  color: var(--soa-muted);
}

.soa-cl__card-meta span { display: inline-flex; align-items: center; gap: 8px; }

.soa-cl__card-meta i { color: var(--soa-muted); font-size: 14px; }

/* ---------- Empty / error state ---------- */

.soa-cl__state {
  margin: 0;
  padding: 24px;
  font-size: 15px;
  color: var(--soa-muted);
  background: var(--soa-surface-muted);
  border: 1px solid var(--soa-border);
}

.soa-cl__state[hidden] { display: none; }

/* ---------- Modal header (Bootstrap 5 modal, mockup styling) ----------
   Only the header is styled; body and footer keep the theme's Bootstrap defaults.
   Selectors are scoped to .soa-cl-modal and use 2-3 classes so they beat the
   theme's body.body-soa heading rules. */

.soa-cl-modal .modal-header {
  align-items: flex-start;
  gap: 16px;
  padding: 32px;
  background: #8A1538;
  color: #FFFFFF;
  border-bottom: 0;
}

.soa-cl-modal .modal-header .soa-cl-modal__title {
  margin: 0 0 12px;
  font-family: "Oswald", "Libre Franklin", Arial, sans-serif;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.25;
  color: #FFFFFF;
}

.soa-cl-modal .modal-header .soa-cl-modal__blurb {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.soa-cl-modal .modal-header .soa-cl-modal__chips { margin-top: 16px; }

/* Bootstrap's .bg-secondary sets its background with !important, so this has to as well. */
.soa-cl-modal .modal-header .soa-cl-modal__chip {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: #FFFFFF;
  background-color: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 0;
}

/* White close icon; same filter Bootstrap's .btn-close-white uses. */
.soa-cl-modal .modal-header .btn-close {
  flex-shrink: 0;
  margin: 0;
  filter: invert(1) grayscale(100%) brightness(200%);
  opacity: 0.8;
}

.soa-cl-modal .modal-header .btn-close:hover,
.soa-cl-modal .modal-header .btn-close:focus { opacity: 1; }

/* ---------- Mobile ---------- */

@media (max-width: 767px) {
  .soa-cl__card { padding: 20px 44px 20px 20px; }
  .soa-cl__card-chevron { top: 20px; right: 16px; }
  .soa-cl .soa-cl__card-title { font-size: 19px; }
  .soa-cl-modal .modal-header { padding: 24px 20px; }
  .soa-cl-modal .modal-header .soa-cl-modal__title { font-size: 22px; }
}
