*,
*::before,
*::after {
  font-family: "Open Sans", sans-serif;
}

:root {
  --main-radius: 5px;
  --main-padding: 5px;
  --card-background: #fff;
  --childrens-dark-blue: rgb(1, 33, 105);
  --childrens-medium-blue: rgb(0, 156, 222);
  --childrens-light-blue: rgb(185, 217, 235);
  --childrens-red: rgb(223, 70, 97);
  --childrens-green: #71cc98;
  --childrens-purple: rgb(161, 90, 149);
}

.sticky {
  position: sticky;
  background: white;
  top: 0;
  border-radius: 0.5rem;
  z-index: 99;
}

.page-title.loading {
  animation-name: pulse;
  animation-duration: 1.5s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

.control-panel {
  margin: 1rem 1rem 0 1rem;
}

/* .area-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 1rem;
} */

/* DASHBOARD STYLES */

nav {
  font-family: Oswald, "Open Sans", sans-serif;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  grid-gap: 0.8rem;
}

.area-menu-container {
  display: flex;
}

.area-menu select {
  width: 100%;
}

.filters {
  display: flex;
  justify-content: space-evenly;
}

.filter {
  border: 1px solid var(--childrens-dark-blue);
  color: #aaa;
  border-radius: 0.25rem;
  flex-grow: 1;
  margin: 0 0.5em;
  text-align: center;
  user-select: none;
  cursor: pointer;
}

.filter.selected {
  color: white;
  background: var(--childrens-purple);
}

.filter:hover {
  /* background-color: var(--childrens-medium-blue); */
  color: var(--childrens-dark-blue);
}

.filter.selected:hover {
  color: white;
}

.search-wrapper {
  display: flex;
  align-items: center;
  width: 100%;
}

.filter-tags {
  grid-column-start: 1;
  grid-column-end: 4;
  /* display: none; */
  height: 1rem;
  visibility: hidden;
}

.search-wrapper > select {
  flex: 1 1 auto;
  margin-left: 4px;
}

.search-wrapper img {
  height: 30px;
  cursor: pointer;
}

#search {
  width: 100%;
}

.stats-container {
  font-family: Oswald, "Open Sans", sans-serif;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 1rem;
  margin: 1rem 0;
}

.stats {
  display: flex;
  flex-direction: column;
  /* border: 1px solid red; */
  background-color: rgb(39, 41, 80);
  border-radius: 0.5rem;
  /* text-align: center; */
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.2);
  user-select: none;
  justify-content: space-between;
  cursor: pointer;
}

.stats:hover,
.stats.selected {
  background-color: rgb(82, 86, 160);
}

.stats h3 {
  margin: 0.25rem 0.5rem;
  /* font-variant: small-caps; */
  color: #e0e1e6;
  font-weight: normal;
}

.metrics {
  display: flex;
  justify-content: space-between;
  margin: 0 1rem;
}

.status {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  margin: 0 0.5rem;
}

.status h2 {
  margin: 0;
  font-size: 2rem;
  font-variant: small-caps;
  color: #e0e1e6;
  min-width: 30px;
  /* border: 2px solid rgb(50, 63, 92); */
  text-align: center;
  padding: 0.5rem 1rem;
  line-height: 0.7em;
  /* border-radius: .5rem; */
  /* background: linear-gradient(270deg, rgba(1,33,105,1) 0%, rgba(9,9,121,1) 10%, rgba(185,217,235,0) 100%); */
}

.status p {
  margin: 0 0 0.5rem 0;
  font-variant: small-caps;
  color: #e0e1e6;
}

.status.new h2 {
  font-size: 3.5rem;
}

/* CARDS STYLES */

.hidden {
  display: none;
}

.badge-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-right: 0.25rem;
}
.badge-box .alt-badge {
  position: relative;
  user-select: none;
  display: flex;
  z-index: 0;
  color: white;
  font-size: 1em;
  font-family: "Oswald", "Open Sans", sans-serif;
}

.badge-box::before {
  content: "";
  position: absolute;
  left: 0px;
  right: 0;
  top: 0px;
  bottom: 0;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--childrens-gradient);
  border-radius: 40px;
}

.badge-box img {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
}

.badge-box img.hidden {
  display: none;
}

.crossover-group {
  display: flex;
  margin: var(--padding);
  font-size: 0.7rem;
}

.crossover-group .badge-box,
.crossover-group img {
  width: 40px;
  height: 40px;
}

.card-icon .badge-box,
.card-icon img {
  width: 60px;
  height: 60px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1rem;
  align-items: flex-start;
  margin: 0 1rem;
}

.card {
  --padding: 1rem;
  background: white;
  border: 1px solid #777;
  border-radius: 0.25rem;
  overflow: hidden;
}

.card.card-shadow {
  border: none;
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.2);
}

.card.crossover {
  background-color: bisque;
}

.card.share {
  background-image: url(../img/icon-star.svg);
  background-repeat: no-repeat;
  background-size: 100px;
  background-position: 97% 97%;
}

.card.dropped {
  background-color: rgb(208, 208, 208);
  opacity: 0.6;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(246, 205, 129, 0.4),
    rgba(246, 205, 129, 0.4) 8px,
    rgba(255, 255, 255, 1) 0px,
    rgba(255, 255, 255, 1) 20px
  );
}

.card-status-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 2px;
  user-select: none;
}

.card-status-bar {
  font-size: 0.7rem;
  padding: 2px;
  text-align: center;
  color: white;
  background-color: rgba(133, 204, 152, 0.5);
}

.demographics-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 2px;
  margin-top: 4px;
  user-select: none;
}

.demographics-group > div {
  font-size: 0.7rem;
  padding: 2px;
  text-align: center;
  color: rgb(1, 33, 105);
  border: 1px solid rgba(1, 33, 105, 0.2);
  border-radius: 0.5rem;
  margin: 2px;
}

.demographics-group .status,
.demographics-group .status-date {
  display: none;
}

.card-status-group .active {
  background-color: rgba(1, 33, 105, 0.7);
}

.card-header {
  display: flex;
  font-size: 1.3rem;
  line-height: 1.5rem;
  padding: var(--padding);
  padding-bottom: 0;
  margin-bottom: 0.5rem;
  /* align-items: center; */
}

/* .card-header .card-icon img {
  width: 60px;
  margin-right: 1rem;
} */

.card-title .tags {
  font-size: 0.8rem;
  color: var(--childrens-purple);
}

.card-icon {
  margin-right: 1rem;
}

.crossover-group {
  display: flex;
  margin: var(--padding);
  font-size: 0.7rem;
}

.crossover-group img {
  width: 40px;
  height: 40px;
  padding-right: 0.5rem;
}

.card-header.card-image {
  padding: 0;
  overflow: hidden;
}

.card-header.card-image > img {
  display: block;
  width: 100%;
  max-height: 200px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  transition: 200ms transform ease-in-out;
}

.card:hover > .card-header.card-image > img {
  transform: scale(1.025);
}

.card-body {
  font-size: 0.9rem;
  padding: 0 var(--padding);
}

.card-body p {
  margin-bottom: 1.5rem;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding: 0 var(--padding);
  padding-top: 0;
  margin-bottom: var(--padding);
}

.card-footer .duedate h5 {
  margin: 0;
  font-size: 0.65rem;
}
.card-footer .duedate h4 {
  margin: 0;
  font-size: 0.8rem;
}

.solution-label {
  color: var(--childrens-medium-blue);
  border-top: 2px solid var(--childrens-medium-blue);
  padding-top: 0.2rem;
}

.duedate {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.duedate .overdue {
  color: var(--childrens-red);
  font-weight: bold;
}

.duedate h4 {
  color: #555;
  font-weight: normal;
}

.btn {
  --color: hsl(200, 50%, 50%);
  background: var(--color);
  color: white;
  border: none;
  font-size: 1rem;
  padding: 0.5em 0.75em;
  border-radius: 0.25em;
  cursor: pointer;
}

.btn:hover,
.btn:focus {
  background: var(--childrens-purple);
}

.btn.btn-outline {
  background: none;
  border: 1px solid var(--color);
  color: var(--color);
}

.btn.btn-outline:hover,
.btn.btn-outline:focus {
  background: hsl(200, 50%, 90%);
}

.btn + .btn {
  margin-left: 0.25rem;
}

@keyframes pulse {
  0% {
    color: rgb(255, 255, 255);
  }

  100% {
    color: var(--childrens-dark-blue);
  }
}

@media print {
  *,
  ::before,
  ::after {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 1em;
  }

  .banner-bar h1,
  .card-icon::before,
  .card-title,
  .demographics-group > div {
    font-family: "Lucida Sans", "Lucida Sans Regular", "Lucida Grande",
      "Lucida Sans Unicode", Geneva, Verdana, sans-serif;
  }

  .banner-bar img,
  .banner-bar .nav-buttons,
  .div.control-panel,
  .card-status-group,
  .reporter,
  .elapsed,
  .badge-box img,
  .card-footer,
  .badge-box,
  footer {
    display: none;
  }

  .demographics-group .status,
  .demographics-group .status-date {
    display: block;
  }

  header {
    background-color: white;
  }

  header .banner-bar h1 {
    color: black;
    margin: 1rem;
  }

  .card-icon[title]::before {
    content: attr(title);
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .card {
    display: grid;
    grid-template-columns: auto;
    break-inside: avoid;
  }

  .card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 1rem;
  }

  .card-body span {
    display: inline-block;
    border: none;
  }

  .card-header {
    display: block;
  }

  .card-icon {
    font-size: 1rem;
  }

  .card-title {
    font-size: 1.2rem;
  }

  .demographics-group > div {
    border: none;
    border-radius: 0;
    border-bottom: 1px solid lightgray;
  }

  .card.card-shadow {
    border: none;
    box-shadow: none;
  }

  .card.crossover,
  .card.dropped {
    background-color: white;
    background: none;
    opacity: 1;
  }
}
