/*
 * Kurs → Emnebeskrivelse (js/components/CourseCatalog.js, 1.44.0): the
 * parts of the published course description under the institution's
 * headings, each with its state and "Kopier"; the description and the
 * outcomes as they will read, the two new texts as fields.
 */

.cc-intro {
  margin-bottom: 0.5rem;
}

.cc-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.cc-status:empty {
  display: none;
}

/* Each part: its heading as on the institution's page, then the text */
.cc-block {
  border: 2px solid var(--bh-black, #111);
  padding: 0.6rem 0.75rem 0.75rem;
}

.cc-block + .cc-block {
  margin-top: 0.85rem;
}

.cc-block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.5rem;
}

.cc-heading {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--bh-navy, #1B2A4A);
}

.cc-state {
  color: #444;
}

.cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-left: auto;
}

.cc-actions .btn.cc-copied,
.cc-toolbar .btn.cc-copied,
.cc-plan .btn.cc-copied {
  border-color: #146c43;
  background: #146c43;
  color: #fff;
}

/* The description and the outcomes, as they will read */
.cc-preview {
  padding: 0.5rem 0.65rem;
  background: var(--bh-cream, #F5F0E6);
  border-left: 4px solid var(--bh-navy, #1B2A4A);
  overflow-wrap: anywhere;
}

.cc-preview > :last-child {
  margin-bottom: 0;
}

.cc-preview p {
  margin-bottom: 0.5rem;
}

.cc-preview ul {
  margin-bottom: 0.5rem;
  padding-left: 1.25rem;
}

.cc-empty {
  color: #444;
  font-style: italic;
}

/* The outcomes' lead-in: a suggestion or own words */
.cc-leadin {
  margin-bottom: 0.6rem;
}

.cc-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #444;
  margin-bottom: 0.15rem;
}

.cc-leadin-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.15rem;
}

.cc-leadin-fields .form-select {
  width: auto;
  max-width: 100%;
}

.cc-leadin-fields .form-control {
  flex: 1 1 16rem;
  min-width: 0;
}

.cc-leadin-fields [hidden],
.cc-fit[hidden] {
  display: none;
}

.cc-fit {
  margin: 0.35rem 0 0;
  padding: 0.3rem 0.5rem;
  background: #fff8e1;
  border-left: 4px solid #e0a800;
}

/* "Fra planen" (1.45.0): the plan's facts under a text, each with "+ Sett inn" */
.cc-plan {
  margin-top: 0.6rem;
  padding-top: 0.4rem;
  border-top: 1px dashed #888;
}

.cc-plan-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #444;
  cursor: pointer;
}

.cc-plan-intro {
  margin: 0.25rem 0 0.4rem;
}

.cc-plan-empty {
  margin: 0.25rem 0;
  color: #444;
  font-style: italic;
}

.cc-plan-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  margin: 0.6rem 0 0.2rem;
}

.cc-plan-sub {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--bh-navy, #1B2A4A);
}

.cc-plan-head .btn {
  margin-left: auto;
}

.cc-facts {
  list-style: none;
  margin: 0 0 0.4rem;
  padding: 0;
}

.cc-fact {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.35rem 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid #e3ddd0;
}

.cc-fact:last-child {
  border-bottom: 0;
}

.cc-fact-text {
  flex: 1 1 14rem;
  min-width: 0;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.cc-fact-label {
  display: block;
  font-weight: 700;
}

.cc-insert {
  flex: none;
  white-space: nowrap;
}

/* What doesn't add up in the assessments, or that it does */
.cc-checks {
  list-style: none;
  margin: 0 0 0.4rem;
  padding: 0;
}

.cc-check {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  padding: 0.35rem 0.5rem;
  border-left: 4px solid;
  font-size: 0.9rem;
}

.cc-check > i {
  margin-top: 0.2rem;
}

.cc-check ul {
  margin: 0.25rem 0;
  padding-left: 1.1rem;
}

.cc-check-warn {
  background: #fff8e1;
  border-color: #e0a800;
}

.cc-check-info {
  background: #eef2f8;
  border-color: var(--bh-navy, #1B2A4A);
}

.cc-check-ok {
  background: #e8f4ec;
  border-color: #146c43;
}

/* On a phone the buttons go under the heading */
@media (max-width: 575.98px) {
  .cc-actions {
    margin-left: 0;
    width: 100%;
  }
}
