/* Personal student panels: scoped visual improvements only.
   No data, storage, account, or interaction behavior is changed. */

#student-space .gs-note-form {
  display: grid;
  gap: .9rem;
  padding: clamp(1rem, 2.5vw, 1.35rem);
  border: 1px solid #dceae0;
  border-radius: 18px;
  background: linear-gradient(145deg, #f4faf5, #fff 75%);
  box-shadow: 0 7px 20px rgba(24, 82, 52, .05);
}

#student-space .gs-note-form label {
  display: grid;
  gap: .45rem;
  color: #315b43;
  font-weight: 700;
}

#student-space .gs-note-form input,
#student-space .gs-note-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: .75rem .85rem;
  border: 1px solid #cbded0;
  border-radius: 11px;
  background: #fff;
  color: #203b2b;
  font: inherit;
  line-height: 1.65;
}

#student-space .gs-note-form textarea {
  min-height: 112px;
  resize: vertical;
}

#student-space .gs-note-form input:focus-visible,
#student-space .gs-note-form textarea:focus-visible,
#student-space .gs-note-form button:focus-visible,
#student-space .gs-note-delete:focus-visible,
#student-space .favorite-item a:focus-visible,
#student-space .favorite-item .btn-remove-fav:focus-visible,
#student-space .btn-retry-mistakes:focus-visible {
  outline: 3px solid #78b994;
  outline-offset: 3px;
}

#student-space .gs-note-form button {
  justify-self: start;
  min-height: 42px;
  padding: .65rem 1.1rem;
  border: 1px solid #24734a;
  border-radius: 11px;
  background: #287b50;
  color: #fff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

#student-space .gs-notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
  margin-top: 1.1rem;
}

#student-space .gs-note-card {
  min-width: 0;
  padding: 1rem;
  border: 1px solid #e1ece5;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(24, 82, 52, .05);
  transition: transform .18s ease, box-shadow .18s ease;
}

#student-space .gs-note-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(24, 82, 52, .09);
}

#student-space .gs-note-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

#student-space .gs-note-heading strong,
#student-space .gs-note-card p {
  min-width: 0;
  overflow-wrap: anywhere;
}

#student-space .gs-note-card p {
  color: #526c5d;
  line-height: 1.8;
}

#student-space .gs-note-card small {
  display: block;
  margin-top: .75rem;
  color: #718579;
  font-size: .8rem;
}

#student-space .gs-note-delete {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #f0d9d4;
  border-radius: 10px;
  background: #fff7f5;
  color: #a34e42;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}

#student-space .gs-note-delete:hover,
#student-space .favorite-item .btn-remove-fav:hover {
  border-color: #e8b8ae;
  background: #ffebe7;
}

#student-space .favorites-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: .85rem;
  padding: clamp(.85rem, 2.4vw, 1.5rem);
  border: 1px solid #e2ece5;
  border-radius: 20px;
  background: linear-gradient(155deg, #fff 0%, #f5faf6 100%);
}

#student-space .favorite-item {
  display: flex;
  align-items: center;
  gap: .8rem;
  min-width: 0;
  margin: 0;
  padding: .85rem;
  border: 1px solid #e1ebe4;
  border-radius: 15px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 5px 14px rgba(25, 75, 49, .045);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

#student-space .favorite-item:hover {
  transform: translateY(-2px);
  border-color: #c7dfcf;
  box-shadow: 0 9px 18px rgba(25, 75, 49, .08);
}

#student-space .favorite-item > a {
  flex: 1 1 auto;
  min-width: 0;
  color: #245b3d;
  font-weight: 750;
  line-height: 1.6;
  overflow-wrap: anywhere;
  text-decoration: none;
}

#student-space .favorite-item > a:hover {
  color: #13754b;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#student-space .favorite-item .btn-remove-fav {
  flex: 0 0 auto;
  min-height: 38px;
  padding: .48rem .7rem;
  border: 1px solid #f0d8d3;
  border-radius: 10px;
  background: #fff7f5;
  color: #a34e42;
  font: inherit;
  font-size: .8rem;
  font-weight: 750;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}

#student-space .mistakes-list {
  display: grid;
  gap: 1.15rem;
  padding: clamp(.85rem, 2.4vw, 1.5rem);
  border: 1px solid #e3eee7;
  border-radius: 20px;
  background: linear-gradient(155deg, #fff 0%, #f5faf6 100%);
}

#student-space .mistake-quiz-group {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dce9e0;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(25, 75, 49, .055);
}

#student-space .mistake-quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  padding: .9rem 1rem;
  border-bottom: 1px solid #e5eee8;
  background: #f4faf5;
  color: #245b3d;
  font-weight: 800;
}

#student-space .gs-mistake-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .75rem 1rem;
  color: #526c5d;
}

#student-space .gs-mistake-progress strong {
  color: #205d40;
  font-size: .95rem;
  font-variant-numeric: tabular-nums;
}

#student-space .mistake-item {
  position: relative;
  min-width: 0;
  margin: .75rem;
  padding: 1rem;
  border: 1px solid #f0dfd9;
  border-inline-start: 4px solid #d97861;
  border-radius: 14px;
  background: linear-gradient(110deg, #fff9f7, #fff 75%);
  transition: border-color .18s ease, box-shadow .18s ease;
}

#student-space .mistake-question {
  margin-bottom: .65rem;
  color: #293f32;
  font-weight: 750;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

#student-space .mistake-details {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .75rem;
  color: #718579;
  font-size: .8rem;
}

#student-space .mistake-quiz {
  padding: .25rem .5rem;
  border-radius: 7px;
  background: #edf5ef;
  color: #426a50;
  font-weight: 750;
}

#student-space .mistake-answers {
  display: grid;
  gap: .5rem;
}

#student-space .mistake-wrong,
#student-space .mistake-correct {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  padding: .65rem .75rem;
  border-radius: 10px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  font-size: .88rem;
}

#student-space .mistake-wrong {
  border: 1px solid #f0d8d3;
  background: #fff5f2;
  color: #914b40;
}

#student-space .mistake-correct {
  border: 1px solid #cfe5d5;
  background: #f1faf3;
  color: #286341;
}

#student-space .btn-retry-mistakes {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: .45rem .8rem;
  border: 1px solid #b9d8c3;
  border-radius: 10px;
  background: #edf7f0;
  color: #245b3d;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

#student-space .no-data {
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  #student-space .gs-note-form button {
    width: 100%;
    justify-self: stretch;
  }

  #student-space .favorite-item {
    align-items: stretch;
    flex-direction: column;
  }

  #student-space .favorite-item .btn-remove-fav {
    align-self: flex-start;
  }

  #student-space .mistake-item {
    margin: .55rem;
    padding: .8rem;
  }

  #student-space .mistake-quiz-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  #student-space .gs-note-card,
  #student-space .favorite-item,
  #student-space .mistake-item {
    transition: none;
  }

  #student-space .gs-note-card:hover,
  #student-space .favorite-item:hover {
    transform: none;
  }
}
