/*assessments*/
.assessment-wrapper {
  position: relative;
  margin-bottom: 12px;
}

.assessment-container {
  width: 100%;
  padding: 40px 0;
  min-width: 0;
  box-sizing: border-box;
}

/* in line card */
.assessment-row-card {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 16px 20px;
  background-color: #fefeff; /*CARD COLOUR!!*/
  color: #383b42;
  border-radius: 8px;
}

.badge-subject {
  flex-shrink: 0;
}

.assessment-content {
  flex: 1;
  min-width: 0;
}

.assessment-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
  min-width: 0;
}

.assessment-details {
  display: flex;
  flex-direction: row;
  flex: 1;
  flex-wrap: wrap;
  gap: 8px;
}

.card-title {
  flex-grow: 1;
  min-width: 0;
  overflow-wrap: break-word;
  color: #2b3a67;
  font-weight: bold;
}

/* int / ext */
.type-badge p {
  color: #171c70;
  padding: 2px 6px;
  border-radius: 4px;
  width: auto;
  min-width: 40px;
}

input[type="date"] {
  border: none;
  background: transparent;
  color: transparent; /* hides aaaa */
  width: 32px; /* icon stays */
  font-size: 0px;
  padding: 0;
  cursor: pointer;
  outline: none;
}

.due input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 1;
  display: block;
  cursor: pointer;
  filter: none;
  font-size: 30px;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  margin: 0;
  padding: 0;
  cursor: pointer;
  font-size: 30px;
  opacity: 1;
  filter: none;
}

.card-data-field p {
  width: 60px;
  text-align: center;
  font-size: 14px;
  color: #404770cc;
}

/*IMPORTANT!!!!DUE DATE AND PRIORITY*/

.due-date-priority {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/*select*/

.priority select {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 5px;
  border: none;
  line-height: 1.6;
  padding: 1rem;

  cursor: pointer;
  font-weight: 700;
  font: inherit;

  background-color: #d6d6f5;
  color: #5b5c71;

  @supports (appearance: base-select) {
    &,
    &::picker(select) {
      appearance: base-select;
    }
  }

  &:open {
    background-color: #c1c1f5;
  }

  &::picker-icon {
    color: #787999;
  }

  option {
    background-color: #dbdbfc;
  }

  option:hover {
    background-color: #cfcff5;
  }
}

/* date input */
input[type="date"] {
  background: transparent;
  border: none;
  font-family: "Commissioner", sans-serif;
  font-weight: bold;
  font-size: 15px;
  outline: none;
  padding: 0;
  width: 89px;
  cursor: pointer;
  color: #5b5c71;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  margin: 0;
  padding: 0;
  cursor: pointer;
  opacity: 1;
  filter: none;
}

input[type="date"]::-webkit-datetime-edit-year-field {
  display: none !important;
}

input[type="date"]::-webkit-datetime-edit-text:last-of-type {
  display: none !important;
}

/* checkbox */
.completed-checkbox {
  appearance: none;
  position: static;
  right: -30px;
  top: 50%;
  transform: none;

  transition: transform 0.2s ease-out;
  width: 20px;
  height: 20px;
  border: 2px solid #98adfa;
  border-radius: 4px;
  cursor: pointer;
}

.completed-checkbox:hover {
  transform: scale(1.1);
}

.completed-checkbox:checked {
  appearance: none;
  border-color: #98adfa;
  border-radius: 4px;
  background-color: #98adfa;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8l3 3 7-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px;
  cursor: pointer;
}

.material-symbols-outlined {
  align-items: center;
  padding: 5px;
  color: #47477a;
}

/* subject */
.badge-subject p {
  padding: 8px 12px;
  text-align: center;
  border-radius: 6px;
  font-weight: bold;
  color: #0d116c;
  background-color: #a1beff;
  font-size: 16px;
}

/*takes the year field off*/
input[type="date"]::-webkit-datetime-edit-year-field {
  display: none !important;
}

input[type="date"]::-webkit-datetime-edit-text:last-of-type {
  display: none !important;
}

.save-button {
  background-color: #a1beff;
  color: #2b3a67;
  border: none;
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.save-button:hover {
  background-color: #98adfa;
}

#completed-assessments + .assessment-container .assessment-row-card {
  opacity: 0.65;
  background-color: #e1e1ed;
}

/*ASSESSMENT CARD*/

.assessment-row-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 30px;
  padding: 22px 24px;
  box-sizing: border-box;
}

/* LEFT SIDE */

.assessment-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.badge-subject {
  width: auto;
}

.badge-subject p {
  display: inline-block;
  margin: 0;
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 6px;
}

.assessment-content {
  width: 100%;
  min-width: 0;
}

.card-title h3 {
  margin: 0 0 10px;
}

/* RIGHT SIDE */

.due-date-priority {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 42px;
  grid-template-areas:
    "due actions"
    "priority actions";
  align-items: center;
  gap: 10px 16px;
  min-width: 250px;
}

.due {
  grid-area: due;
  display: flex;
  align-items: center;
  gap: 8px;
}

.due input[type="date"] {
  width: 150px;
  min-width: 0;
  padding: 7px 8px;
  border: 2px solid #a1beff;
  border-radius: 8px;
  background: #fff;
  color: #404770;
  font-family: "Commissioner", sans-serif;
  font-size: 12px;
}

.due .material-symbols-outlined {
  font-size: 19px;
  color: #7888bd;
}

.priority {
  grid-area: priority;
}

.priority-select {
  width: 100%;
  padding: 7px 12px;
  border: 1px solid #a1beff;
  border-radius: 20px;
  font-family: "Commissioner", sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

/* CHECKBOX + SAVE */

.card-actions {
  grid-area: actions;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.completed-checkbox {
  width: 17px;
  height: 17px;
  accent-color: #7888bd;
  cursor: pointer;
}

.save-button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: #a1beff;
  color: #2b3a67;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* COMPLETED CARDS */

#completed-assessments + .assessment-container .assessment-row-card {
  opacity: 0.7;
  background-color: #e1e1ed;
}
