/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* Variables */

:root {
  /* Smooth scroll jumps
  @see https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior */
  scroll-behavior: smooth;
}

.react {
  --theme-background-color: white;
  --theme-accent-color: #eee;
  --theme-dark-color: #555;
  --theme-header-height: 86px;

  /* Colors */
  --terracotta: #f6895a;
  --spanish-tile: #f37443;
  --logo-orange: #f15d22;
  --chili-pepper: #da5425;
  --paprika: #c94e25;
  --red-clay: #b84826;
  --rice-paper: #f7f3f1;
  --milk-tea: #eeeae5;
  --khaki-pants: #d1c7bd;
  --portobello: #888079;
  --porto-mink: #615e57;
  --mink: #403a37;

  /* Font */
  --bold: 700;

  /* Table */
  --table-cell-border: 1px solid var(--theme-accent-color);
}

/* Elements */

/* TODO. Evaluate in target site theme */
.react hr {
  margin: 1em 0;
}

.react input {
  font-size: inherit;
  color: inherit;
}

/* TODO. Evaluate in target site theme */
/* Allows hidden to override display property,
such as display: flex;
See https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/hidden#the_hidden_state */
.react [hidden] {
  display: none !important;
}

/* Reset Layout: TODO. Evaluate in target site theme */
.entry-title.main_title {
  display: none;
}

.container {
  padding-top: 1em !important;
}

.react details {
  cursor: pointer;
}

/* Components */

.react .institution-badge {
  display: inline-block;
  padding: 0 0.3em;
  background: var(--theme-dark-color);
  color: var(--theme-background-color);
  border-radius: 5px;
  margin: 0.1em 0;
  margin-right: 0.3em;
}

/* See https://www.a11yproject.com/posts/how-to-hide-content/ */
.react .visually-hidden:not(:focus):not(:active) {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.react .sorted-asc::after {
  /* Unicode wasn't working " ⬆️"; */
  content: " \2B06\FE0F";
}

.react .sorted-desc::after {
  /* Unicode wasn't working " ⬇️"; */
  content: " \2B07\FE0F";
}

.react thead.hide-headers {
  display: none;
}

.react .menu-nav>ul {
  display: flex;
  flex-wrap: wrap;
  column-gap: 25px;
  padding: 0 0 0.2em 0 !important;
}

.react nav ul,
.react table ul,
.react .no-bullet-list {
  list-style-type: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Inset all left-aligned children */
.react .course-bundle-selector .substitution-inset {
  display: flex;
  flex-direction: column;
  justify-content: start;
  padding-left: 2em;
}

.react .explanation {
  padding: 0.5em 0.75em;
  border: 1px solid transparent;
}

.react .explanation[open] {
  margin: 0.5em 0;
  border-color: var(--theme-dark-color);
  background: #f6f6f6;
  border-radius: 10px;
}

.react .explanation > * {
  margin-top: 0;
  margin-bottom: 0;
}

.react .course-bundle-selector input[type="text"],
.react .course-bundle-selector input[type="number"],
.react .course-bundle-selector textarea,
.react .issue-form textarea {
  display: block;
}

.react .course-bundle-selector input[type="text"],
.react .course-bundle-selector textarea,
.react .issue-form textarea {
  width: 100%;
}

/* TODO. Evaluate in target site theme */
/* Copy Divi Styles */
.react input[type="number"],
.react input[type="search"] {
  background-color: #fff;
  border: 1px solid #bbb;
  padding: 2px;
  color: #4e4e4e;
}

.react .role-requirement th[scope="row"] {
  /* Align row headings left */
  text-align: left;
  /* Sticky Row Heading row */
  position: sticky;
  left: 0;
  border-right: var(--table-cell-border);
}

/* Set up table borders to be compatible with sticky headings */

/* Reset */
.react .role-requirement thead,
.react .role-requirement tbody,
.react .role-requirement tr,
.react .role-requirement th,
.react .role-requirement td {
  border: 0;
}

.react .role-requirement {
  border-collapse: separate;
  border-spacing: 0;
  border-top: var(--table-cell-border);
}

/* End Reset */

/* Bottom border on column heading */
.react .role-requirement th[scope="col"] {
  border-bottom: var(--table-cell-border);
}

/* But don't show a bottom border on the empty top, left corner cell */
.react .role-requirement th[scope="col"]:nth-of-type(1) {
  border-bottom: 0;
}

/* End table borders for sticky headings */

/* Make column headings sticky */
.react .role-requirement th[scope="col"] {
  position: sticky;
  top: var(--theme-header-height);
}

/* Align column headings & checkboxes center */
.react .role-requirement td,
.react .role-requirement thead th {
  text-align: center;
}

/* Zebra-Stripe Table Rows */
.react .role-requirement tr:nth-of-type(even) th,
.react .role-requirement tr:nth-of-type(even) td {
  background: var(--theme-accent-color);
}

.react .role-requirement tr:nth-of-type(odd) th,
.react .role-requirement tr:nth-of-type(odd) td {
  background: var(--theme-background-color);
}

.react .radio-cell {
  /* This is a small number designed to limit the width of a <td>.
  Not sure what the best way to do it is, since the table affects
  the layout .*/
  width: 20px;
}

.react .form-parameters {
  background: var(--theme-accent-color);
}

.react .form-parameters,
.react .planned-requirement {
  border: 2px solid var(--theme-dark-color);
  border-radius: 10px;
  padding: 1em;
}

.react .form-parameters-options {
  display: flex;
  flex-wrap: wrap;
}

/* Utilities */
.invisible {
  visibility: hidden;
}

.visible {
  visibility: visible;
}

.capitalize {
  text-transform: capitalize;
}

@media screen and (max-width: 600px) {
  .react .form-parameters-options {
    flex-direction: column;
  }
}

.react .archived-table-row {
  background: var(--theme-accent-color);
  font-style: italic;
}

.react .domain-name {
  color: var(--logo-orange);
}

.react .planned-completed-form-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.react .planned-completed-form-layout p {
  margin: 0;
  padding: 0;
}

.react .planned-completed-form label {
  font-weight: 700;
}

.react .planned-completed-form button {
  margin-top: 1em;
}

.react .planned-completed-form input:disabled {
  text-decoration: line-through;
  opacity: 0.5;
}

/* Invalid items. Either by class, HTML validation, or aria-invalid */
.react .invalid,
.react input:invalid:not([type="radio"], [type="checkbox"]),
.react [aria-invalid]:not([aria-invalid="false"]) {
  /* outline: 2px solid red; */
  box-shadow: 0 0 8px hsla(0deg, 100%, 65.15%, 0.8);
}

.react .planned-completed-input-group input[type="text"] {
  min-width: 14ch;
  /* looks good in print mode */
}

.react .planned-requirement .title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  justify-content: space-between;
  padding-bottom: 0.25em;
}

.react .planned-requirement .title-row button {
    flex-shrink: 0;
}

.react .planned-requirement .title-row h1,
.react .planned-requirement .title-row h2,
.react .planned-requirement .title-row h3,
.react .planned-requirement .title-row h4,
.react .planned-requirement .title-row h5,
.react .planned-requirement .title-row h6 {
  padding: 0;
  margin: 0;
}

.react .archived-info {
    margin: 0.5em 0;
}

.react .planned-requirement-course-bundle {
  margin-bottom: 1em;
}

/* TODO. Evaluate in target site theme */
.react .planned-requirement-course-bundle>* {
  margin-bottom: 1em;
  padding: 0;
}

.react .course-bundle-list ul {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.react .course-bundle-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.react .course-bundle-selector-radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.react .course-bundle-selector-group {
  margin-bottom: 1em;
}

.react .course-bundle-selector-radio-label>* {
  margin-top: 0;
  margin-bottom: 0;
}

.react .button-bar {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.react .training-plan-section {
  margin-bottom: 1em;
}

.react .training-plan-section.approval p {
  padding: 0;
}

.react .training-plan-section.approval .checkbox-group {
  padding-bottom: 1em;
}

.react .training-plan-metadata {
  padding-bottom: 0;
  margin-bottom: 0;
}

.react .training-plan-metadata.training-plan-status {
  margin: 0.5em 0;
}

.react .align-with-inline-block-text {
  vertical-align: text-bottom;
  margin-left: 10px;
}

/* Course Input Group */
.react p {
  margin: 0;
  padding: 0;
}

.react .course-input-group {
  display: flex;
  /* flex-wrap: wrap; */
  gap: 2px;
}

.react .course-input-group select,
.react .course-input-group input {
  /* Don't overflow container https://stackoverflow.com/questions/10672586/how-to-make-select-elements-shrink-to-max-width-percent-style-within-fieldset */
  width: 100%;
}

.react .course-input-group .search {
  flex: 1 0 15ch;
}

.react .course-input-group .input {
  flex: 100%;
}

.react .print-label {
  display: none;
}

/* End Course Input Group */

.react td.no-padding {
  padding: 0;
}

.react .planned-requirement {
  margin-bottom: 1em;
}

.react .planned-requirement-grid {
  max-width: 50em;
}

/* Indent Planned Requirement Cards in list view */
.react .planned-requirement-grid .planned-requirement {
  margin-left: 1.5em;
}

.react table table td,
.react table table th {
  padding-left: 0.2em;
  padding-right: 0.2em;
}

.react .center {
  text-align: center;
}

.react .only-print {
  display: none;
}

.react .issue-form {
  margin-top: 1em;
}

@media print {

  /* Variables */
  :root {
    --print-dark-color: black;
    /* body font-size is set in the @media print  below*/
    --print-line-height: 1.1rem;
  }

  /* Reset: Hide screen-only UI components */
  header,
  footer,
  .react nav,
  #sidebar,
  .react .planned-requirement button,
  .react .planned-requirement hr,
  notice-box {
    display: none !important;
  }

  /* Reset: Layout */
  .container,
  #left-area {
    width: 100% !important;
    padding: 0 !important;
  }

  html {
    max-width: 8.5in !important;
    margin: 0.25in !important;
    /* outline: 1px solid black !important; /* TODO Dev use only. Remove. */
  }

  /* Reset: Typography */
  body {
    font-size: 12px !important;
    color: var(--print-dark-color) !important;
  }

  ul,
  li {
    line-height: inherit !important;
  }

  h1 {
    font-size: 26px !important;
  }

  h1,
  .react .training-plan-metadata.role-name {
    color: var(--portobello);
    font-weight: 600 !important;
  }

  h1,
  h2 {
    color: var(--logo-orange) !important;
  }

  h2 {
    font-weight: var(--bold) !important;
  }

  h2,
  h3,
  h4 {
    color: black;
    font-size: 14px !important;
  }

  h5,
  h6 {
    color: black;
    font-size: 12px !important;
  }

  /* Utility class */

  .react .no-print {
    display: none;
  }

  .react .print-center {
    text-align: center;
  }

  /* Components */

  .react .button-bar {
    display: none;
  }

  .react .training-plan-metadata {
    margin: 0;
  }

  .react .planned-requirement {
    /* Typography */
    border: none;
    margin: 0;
    padding: 0;
    /* Layout */
    display: contents;
    grid-template-columns: 1fr 2fr 1fr 1fr;
    /* display: flex;
    align-items: baseline;
    justify-content: space-between; */
  }

  /* Layout */

  .react .planned-requirement-grid {
    max-width: none;
    /* Undo the max width  */
    display: grid;
    grid-template-columns: 0.8fr 2fr min-content min-content;
    grid-template-rows: auto;
    align-items: baseline;
    row-gap: 0;
    column-gap: 5px;
    line-height: var(--print-line-height);
  }

  .react .domain-name,
  .react .topic-name {
    grid-column: 1 / -1;
    padding: 0;
  }

  .react .domain-name {
    margin-top: 1.5em;
  }

  .react .topic-name {
    margin-top: 0.5em;
  }

  /* Put the first Topic and the course, planned, & completed headings in the same row */
  .react .topic-name:first-of-type {
    grid-row: 2;
  }

  .react .print-label {
    grid-row: 2 / 3;
  }

  /* Position the Column headings */
  .react .print-label {
    display: inline;
    font-weight: var(--bold);
  }

  .react .print-course-label {
    grid-column: 2 / 3;
  }

  .react .print-planned-label {
    grid-column: 3 / 4;
  }

  .react .print-completed-label {
    grid-column: 4 / 5;
  }

  .react .planned-requirement-course-bundle,
  .react .planned-requirement-course-bundle * {
    margin-bottom: 0 !important;
  }

  .react .planned-completed-form,
  .react .planned-completed-form-layout {
    display: contents;
  }

  .react .course-bundle-list ul {
    padding: 0 !important;
    list-style-type: none !important;
    line-height: inherit;
  }

  /* Show inputs with typed-in content. Adjust to printed-input style. */
  .react .planned-requirement input[type="text"],
  .react .planned-requirement input[type="number"] {
    border: 0;
    border-bottom: 1px solid var(--print-dark-color);
    width: 96px;
    height: var(--print-line-height);
    color: inherit;
  }

  .react .institution-badge {
    display: inline;
    background: none;
    color: var(--print-dark-color);
    font-weight: var(--bold);
    margin: 0;
    padding: 0;
  }

  .react .title-row {
    margin: 0 !important;
    padding: 0 !important;
  }

  .react .approvals {
    display: flex;
    justify-content: space-between;
  }

  .react .approval-role {
    min-width: 150px;
    margin-top: 0.5em;
    border-top: 2px solid var(--print-dark-color);
  }

  .react .approval-description {
    padding-top: 1em;
    display: flex;
    flex-direction: column;
  }
}

/* 
@page {
  margin: 0.25in;
} */

/* Utilities */

.react .invisible {
  visibility: hidden;
}

.react .reduced-text {
  font-weight: 700;
  letter-spacing: 0.05em;
  font-size: 0.65rem;
}

.react .help-text {
  font-size: 0.7rem;
  font-weight: 600;
}

/* Context Badge */

.info-badge {
  display: inline-block;
  background: var(--theme-accent-color);
  color: var(--theme-dark-color);
  font-style: italic;
  padding: 0 5px;
  border-radius: 5px;
}

.react .table-fit-content {
  max-width: fit-content;
}

.react .bold {
  font-weight: var(--bold);
}

.react .italic {
  font-style: italic;
}