@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  padding: 1rem;
  font-family: Inter, Arial, sans-serif;
  background: #f5f7fb;
  color: #111827;
  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(88, 28, 135, 0.35),
      transparent 40%
    ),
    radial-gradient(
      circle at 80% 30%,
      rgba(30, 64, 175, 0.35),
      transparent 45%
    ),
    radial-gradient(
      circle at 50% 80%,
      rgba(14, 165, 233, 0.25),
      transparent 50%
    ),
    #fefefe;
}

main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

main.create form {
  display: flex;
  flex-direction: column;

  gap: 1rem;
}

main.create .time-section {
  background: #fff;

  border: 1px solid #e5e7eb;
  border-radius: 16px;

  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.05),
    0 8px 24px rgba(0, 0, 0, 0.04);
}

main.create .time-section__title {
  padding: 1.5rem;

  font-size: 2rem;
  font-weight: 700;

  color: #111827;
}

main.create .form-content {
  display: grid;
  grid-template-columns: 220px 1fr;

  gap: 2rem;

  padding: 1.5rem;

  border-top: 1px solid #e5e7eb;

  align-items: start;
}

main.create .form-content__label {
  display: flex;
  height: 30px;
  font-weight: 500;
  color: #111827;
  padding-top: 0.75rem;
}

main.create .form-content__label .icon {
  height: 100%;
}

main.create :is(select, textarea) {
  width: 100%;

  border: 1px solid #d1d5db;
  border-radius: 10px;

  background: white;

  font-size: 1rem;

  transition: 0.2s ease;
}

main.create :is(select:focus, textarea:focus) {
  outline: none;
  border-color: #2563eb;

  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

main.create select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  padding: 0.9rem 3rem 0.9rem 1rem;

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23666' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px;
}

main.create textarea {
  min-height: 110px;
  padding: 0.9rem 1rem;
  resize: vertical;
  font-family: inherit;
}

main.create .radio-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 48px;
}

main.create .radio-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;

  cursor: pointer;
  font-weight: 500;
}

main.create .radio-group input[type="radio"] {
  width: 18px;
  height: 18px;
}

main.create .btn--primary {
  width: 100%;

  background: #2563eb;
  color: white;

  border: none;
  border-radius: 16px;

  padding: 1rem 1.5rem;

  font-size: 1rem;
  font-weight: 600;
}

main.show section {
  background: #f5f7fb;
  border-radius: 7px;
  padding: 12px;
}

aside {
  grid-area: aside;
  display: none;
  flex-direction: column;
  gap: 2rem;
  flex: 0 1 250px;
  min-width: 250px;
  padding: 1rem;

  /* border: 1px solid #e5e7eb; */
  border-radius: 7px;
}

aside section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

aside h3 {
  font-size: 12px;
}

aside .fa-angle-right {
  grid-area: arrow;
  grid-auto-rows: max-content;
  display: grid;
  align-self: center;
}

.aside-report-card__link {
  text-decoration: none;
  color: #111827;
}

.aside-report-card {
  position: relative;
  border-radius: 7px;
  overflow: hidden;
}

.aside-report-card::before {
  content: "";
  position: absolute;
  inset: 0;

  background:
    linear-gradient(to top left, var(--mood-color), transparent 70%),
    linear-gradient(to bottom right, var(--energy-color), transparent 75%);
}

.aside-report-card__content {
  position: relative;
  margin: 12px; /* border tykkelse */
  border-radius: 7px;
  background: #f5f7fb;

  display: grid;
  grid-template-areas:
    "icon date ."
    ". energy arrow"
    ". mood edit";
  grid-template-columns: 1fr 5fr 0.5fr;

  padding: 0.5rem;
}

.aside-report-card p {
  line-height: 20px;
  font-size: 12px;
  align-self: center;
}

.energy {
  grid-area: energy;
}

.mood {
  grid-area: mood;
}

.energy,
.mood {
  display: flex;
  gap: 0.5rem;
}

.aside-report-card__title {
  grid-area: date;
}

.aside-report-card__icon {
  grid-area: icon;
  align-self: center;
  justify-self: center;
  height: 20px;
}
.aside-report-card__icon--energy,
.aside-report-card__icon--mood {
  height: 12px;
}
.aside-report-card__icon--energy svg,
.aside-report-card__icon--mood svg {
  width: 12px;
  height: 12px;
  display: inline-block;
  vertical-align: middle;
}

.test {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.report-card__title {
  padding: 1.5rem;

  font-size: 2rem;
  font-weight: 700;

  color: #111827;
}

.report-card__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-decoration: none;
  color: #111827;
  gap: 0.5rem;
}

.report-card__icon {
  height: 18px;
}

.report-card__link p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Mobile */

.custom-select {
  position: relative;
}

.selected-option {
  border: lightgrey 1px solid;
  border-radius: 7px;
  display: flex;
  align-items: center;
  cursor: pointer;
  width: 100%;
  padding: 0.9rem 3rem 0.9rem 1rem;
}

.selected-option.active {
  border-bottom-left-radius: 0px;
  border-bottom-right-radius: 0px;
}

.options {
  display: none;
  position: absolute;
  width: 100%;
  background: white;
  border: lightgrey 1px solid;
  border-top: 0px;
  border-bottom-left-radius: 7px;
  border-bottom-right-radius: 7px;
  z-index: 100;
}

.options.active {
  display: flex;
  flex-direction: column;
}

.option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  cursor: pointer;
}

.option:hover {
  background: #f5f5f5;
}

.custom-select .icon {
  height: 18px;
}

.custom-select .fa-angle-down {
  position: absolute;
  color: #777777;
  right: 1rem;
  top: 50%;
  font-size: 13px;
  transform: translateY(-50%);
}

canvas {
  width: 100%;
  max-height: 300px;
}

.btn.edit {
  grid-area: edit;
  line-height: 20px;
  font-size: 12px;
}

main.login form {
  display: flex;
  align-self: center;
  justify-self: center;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.05),
    0 8px 24px rgba(0, 0, 0, 0.04);
  padding: 12px;
  width: 50%;
}

input[type="text"],
input[type="password"],
button {
  width: 100%;
  padding: 10px;
}

@media (max-width: 768px) {
  main.create .form-content {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  main.create .form-content__label {
    height: 18px;
    padding-top: 0;
  }

  main.create .time-section__title {
    font-size: 1.5rem;
  }
}

@media only screen and (min-width: 1000px) {
  body {
    display: grid;
    grid-template-columns: 1fr 3fr 1fr;
    grid-template-areas: ". main aside";
    padding: 2rem;
    min-height: 100vh;
  }

  main {
    grid-area: main;
    display: grid;
    gap: 0.5rem;
  }

  main.show {
    /* repeat(4, 1fr) = 1fr 1fr 1fr 1fr */
    grid-template-columns: repeat(4, 1fr);
  }

  main.create .btn--primary {
    width: fit-content;
    cursor: pointer;

    transition: 0.2s ease;
  }

  main.create .btn--primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
  }

  main.create .btn--primary:active {
    transform: translateY(0);
  }

  aside {
    display: flex;
  }

  .statistik_date {
    grid-column: span 4;
  }

  .statistik_sleep-quality {
    grid-column: span 1;
  }

  .statistik_sleep-hours {
    grid-column: span 3;
  }

  .statistik_sleep-quality-note {
    grid-column: 1 / span 1;
  }

  .statistik_mood-chart {
    grid-column: 1 / span 3;
  }

  .statistik_mood {
    grid-column: span 1;
  }

  .statistik_energy-chart {
    grid-column: span 4;
  }

  .statistik_activity {
    grid-column: span 2;
  }

  .statistik_note {
    grid-column: span 2;
  }

  .statistik_back {
    grid-column: 1 / span 2;
  }
}
