/* =========================================================
   pages/resources.css
   ---------------------------------------------------------
   Student resources, parent resources and global resources
   admin styles.
   ========================================================= */


/* =========================================================
   STUDENT RESOURCES — APP VIEW
   ========================================================= */

body.nn-student-view .nn-student-resources--app {
  display: grid;
  gap: 24px;
  width: min(100%, 1120px);
  max-width: none;
  margin: 0 auto;
  padding: 0 24px 72px;
  background: transparent;
  color: #111827;
  font-family: inherit;
}

body.nn-student-view .nn-student-resources__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: #087780;
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
}

body.nn-student-view .nn-student-resources__back:hover,
body.nn-student-view .nn-student-resources__back:focus-visible {
  color: #075f66;
  text-decoration: none;
}

body.nn-student-view .nn-student-resources__back i {
  width: auto;
  height: auto;
  font-size: 0.76rem;
  transform: none;
}

body.nn-student-view .nn-student-resources--app .nn-student-resources__head {
  display: block;
  margin: 0;
}

body.nn-student-view .nn-student-resources--app .nn-student-resources__head h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.85rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

body.nn-student-view .nn-student-resources--app .nn-student-resources__head p {
  margin: 9px 0 0;
  color: #64748b;
  font-size: 1rem;
  line-height: 1.4;
  opacity: 1;
}


/* Shortcuts */

.nn-student-resources__shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.nn-student-resources__shortcuts > a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 76px;
  padding: 15px 16px;
  border: 1px solid #e0e5eb;
  border-radius: 10px;
  background: #fff;
  color: #111827;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.nn-student-resources__shortcuts > a:hover,
.nn-student-resources__shortcuts > a:focus-visible {
  transform: translateY(-1px);
  color: #111827;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.045);
}

.nn-student-resources__shortcuts > a > i {
  justify-self: end;
  color: #94a3b8;
  font-size: 0.68rem;
}

.nn-student-resources__shortcutIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
}

.nn-student-resources__shortcuts strong,
.nn-student-resources__shortcuts small {
  display: block;
}

.nn-student-resources__shortcuts strong {
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 800;
}

.nn-student-resources__shortcuts small {
  margin-top: 3px;
  color: #64748b;
  font-size: 0.74rem;
}

.nn-student-resources__shortcuts .is-practice {
  border-color: #cee7dc;
}

.nn-student-resources__shortcuts .is-practice .nn-student-resources__shortcutIcon {
  background: #e8f6ef;
  color: #16845f;
}

.nn-student-resources__shortcuts .is-milestones {
  border-color: #f0dfb9;
}

.nn-student-resources__shortcuts .is-milestones .nn-student-resources__shortcutIcon {
  background: #fff2d8;
  color: #b86c00;
}

.nn-student-resources__shortcuts .is-lessons {
  border-color: #eadfc6;
}

.nn-student-resources__shortcuts .is-lessons .nn-student-resources__shortcutIcon {
  background: #fff7e7;
  color: #a76700;
}

.nn-student-resources__shortcuts .is-dashboard {
  border-color: #cfe7e7;
}

.nn-student-resources__shortcuts .is-dashboard .nn-student-resources__shortcutIcon {
  background: #edf8f8;
  color: #087780;
}


/* Filters */

.nn-student-resources__filterPanel {
  padding: 15px 16px;
  border: 1px solid #e0e5eb;
  border-radius: 10px;
  background: #fff;
}

body.nn-student-view .nn-student-resources--app .nn-student-resources__filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}

body.nn-student-view .nn-student-resources--app .nn-student-resources__filters button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #dce3e9;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

body.nn-student-view .nn-student-resources--app .nn-student-resources__filters button:hover {
  border-color: #b9c8d3;
  background: #f8fafc;
  color: #0f172a;
}

body.nn-student-view .nn-student-resources--app .nn-student-resources__filters button.is-active {
  border-color: #0f9fa8;
  background: #effafa;
  color: #087780;
}

.nn-student-resources__filters [data-filter="pdf"] i {
  color: #dc2626;
}

.nn-student-resources__filters [data-filter="youtube"] i {
  color: #dc2626;
}

.nn-student-resources__filters [data-filter="groovescribe"] i {
  color: #0f9fa8;
}

.nn-student-resources__filters [data-filter="image"] i {
  color: #7c3aed;
}

.nn-student-resources__filters [data-filter="audio"] i {
  color: #16845f;
}

.nn-student-resources__filters [data-filter="link"] i {
  color: #2563eb;
}


/* Libraries */

.nn-student-resource-library {
  overflow: hidden;
  border: 1px solid #e0e5eb;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.025);
}

.nn-student-resource-library__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 21px 22px 16px;
  border-bottom: 1px solid #e8ecf0;
}

.nn-student-resource-library__head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1.04rem;
  font-weight: 800;
}

.nn-student-resource-library__head p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 0.78rem;
}

.nn-student-resource-library__head > span {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
}

.nn-student-resource-groups {
  display: grid;
}

.nn-student-resource-group {
  padding: 0 20px 20px;
  border-bottom: 1px solid #e8ecf0;
}

.nn-student-resource-group:last-child {
  border-bottom: 0;
}

.nn-student-resource-group__head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 17px 2px 12px;
}

.nn-student-resource-group__dateIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #edf8f8;
  color: #087780;
}

.nn-student-resource-group__head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 800;
}

.nn-student-resource-group__head p {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 0.73rem;
}

.nn-student-resource-group__lessonLink {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #087780;
  font-size: 0.75rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.nn-student-resource-group__lessonLink:hover {
  text-decoration: underline;
}

.nn-student-resource-group.is-filtered-empty,
.nn-student-resource-library.is-filtered-empty {
  display: none;
}


/* Resource rows */

body.nn-student-view .nn-student-resources--app .nn-student-resources__list {
  display: grid;
  gap: 0;
}

body.nn-student-view .nn-student-resources--app .nn-student-resource-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 74px;
  padding: 11px 10px;
  border: 0;
  border-top: 1px solid #edf0f3;
  border-radius: 0;
  background: #fff;
}

body.nn-student-view .nn-student-resources--app .nn-student-resource-card:first-child {
  border-top: 1px solid #e5eaf0;
}

body.nn-student-view .nn-student-resources--app .nn-student-resource-card:hover {
  background: #fbfcfd;
}

body.nn-student-view .nn-student-resource-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  font-size: 1rem;
}

body.nn-student-view .nn-student-resource-card__icon--pdf {
  background: #fff0f0;
  color: #dc2626;
}

body.nn-student-view .nn-student-resource-card__icon--youtube {
  background: #fff0f0;
  color: #dc2626;
}

body.nn-student-view .nn-student-resource-card__icon--groovescribe {
  background: #edfafa;
  color: #0f9fa8;
}

body.nn-student-view .nn-student-resource-card__icon--image {
  background: #f5f0ff;
  color: #7c3aed;
}

body.nn-student-view .nn-student-resource-card__icon--audio {
  background: #edf8f3;
  color: #16845f;
}

body.nn-student-view .nn-student-resource-card__icon--link {
  background: #eef4ff;
  color: #2563eb;
}

body.nn-student-view .nn-student-resource-card__main {
  min-width: 0;
}

body.nn-student-view .nn-student-resource-card__main h3 {
  margin: 0;
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.3;
}

body.nn-student-view .nn-student-resource-card__main h3 a {
  color: inherit;
  text-decoration: none;
}

body.nn-student-view .nn-student-resource-card__main h3 a:hover {
  color: #087780;
}

.nn-student-resource-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 4px 0 0;
  color: #64748b;
  font-size: 0.72rem;
  line-height: 1.3;
}

.nn-student-resource-card__description {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 0.75rem;
  line-height: 1.4;
}

.nn-student-resource-card__source {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 0.72rem;
}

body.nn-student-view .nn-student-resource-card__lesson-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: #087780;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
}

body.nn-student-view .nn-student-resource-card__lesson-link:hover {
  text-decoration: underline;
}

body.nn-student-view .nn-student-resource-card__open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #9dd5d8;
  border-radius: 8px;
  background: #fff;
  color: #087780;
  font-size: 0.76rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

body.nn-student-view .nn-student-resource-card__open:hover,
body.nn-student-view .nn-student-resource-card__open:focus-visible {
  border-color: #0f9fa8;
  background: #effafa;
  color: #075f66;
}

body.nn-student-view .nn-student-resource-card.is-hidden {
  display: none;
}


/* General resources */

.nn-student-resource-library--general .nn-student-resources__list {
  padding: 0 20px 18px;
}

.nn-student-resource-library--general .nn-student-resource-card:first-child {
  border-top: 0;
}


/* Empty states */

body.nn-student-view .nn-student-resources--app .nn-student-resources__empty {
  margin: 20px;
  padding: 18px;
  border: 1px dashed #d8dfe6;
  border-radius: 10px;
  background: #fafbfc;
}

body.nn-student-view .nn-student-resources--app .nn-student-resources__empty h2 {
  margin: 0 0 5px;
  color: #1e293b;
  font-size: 0.86rem;
  font-weight: 800;
}

body.nn-student-view .nn-student-resources--app .nn-student-resources__empty p {
  margin: 0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.45;
}


/* =========================================================
   STUDENT RESOURCES RESPONSIVE
   ========================================================= */

@media (max-width: 920px) {
  .nn-student-resources__shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  body.nn-student-view .nn-student-resources--app {
    gap: 20px;
    padding: 0 14px 50px;
  }

  .nn-student-resources__shortcuts {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .nn-student-resources__shortcuts > a {
    min-height: 68px;
  }

  .nn-student-resources__filterPanel {
    padding: 12px;
  }

  body.nn-student-view .nn-student-resources--app .nn-student-resources__filters {
    flex-wrap: wrap;
    width: 100%;
  }

  .nn-student-resource-library__head {
    padding: 18px 16px 14px;
  }

  .nn-student-resource-group {
    padding: 0 14px 16px;
  }

  .nn-student-resource-group__head {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 11px;
  }

  .nn-student-resource-group__dateIcon {
    width: 38px;
    height: 38px;
  }

  .nn-student-resource-group__lessonLink {
    grid-column: 2;
    justify-self: start;
    margin-top: -3px;
  }

  body.nn-student-view .nn-student-resources--app .nn-student-resource-card {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 11px;
    padding: 12px 4px;
  }

  body.nn-student-view .nn-student-resource-card__icon {
    width: 40px;
    height: 40px;
  }

  body.nn-student-view .nn-student-resource-card__open {
    grid-column: 2;
    justify-self: start;
    margin-top: 3px;
  }

  .nn-student-resource-library--general .nn-student-resources__list {
    padding: 0 14px 14px;
  }
}


/* =========================================================
   PARENT RESOURCES
   ========================================================= */

.nn-parent-banner--resources {
  width: min(calc(100% - 48px), 1120px);
  margin: 0 auto 22px;
}

.nn-student-resources--parent {
  display: grid;
  gap: 24px;
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 0 24px 72px;
  color: #111827;
}

.nn-student-resources--parent .nn-student-resources__head {
  display: grid;
  gap: 7px;
}

.nn-student-resources--parent .nn-student-resources__head h1 {
  margin: 8px 0 0;
  color: #0f172a;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.nn-student-resources--parent .nn-student-resources__head > p {
  margin: 0;
  color: #64748b;
  font-size: 0.96rem;
  line-height: 1.5;
}

.nn-student-resource-section {
  display: grid;
  gap: 7px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #e0e5eb;
  border-radius: 10px;
  background: #fff;
}

.nn-student-resource-section > h2 {
  margin: 0;
  padding: 20px 20px 0;
  color: #0f172a;
  font-size: 1.03rem;
  font-weight: 800;
}

.nn-student-resource-section > p {
  margin: 0;
  padding: 0 20px 14px;
  color: #64748b;
  font-size: 0.8rem;
}

.nn-student-resources--parent .nn-student-resources__list {
  display: grid;
  gap: 0;
  padding: 0 16px 16px;
}

.nn-student-resources--parent .nn-student-resource-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 13px 4px;
  border: 0;
  border-top: 1px solid #edf0f3;
  border-radius: 0;
  background: #fff;
}

.nn-student-resources--parent .nn-student-resource-card:hover {
  background: #fbfcfd;
}

.nn-student-resources--parent .nn-student-resources__empty {
  margin: 0 16px 16px;
  padding: 18px;
  border: 1px dashed #d8dfe6;
  border-radius: 8px;
  background: #fafbfc;
}

.nn-student-resources--parent .nn-student-resources__empty h2 {
  margin: 0 0 5px;
  color: #1e293b;
  font-size: 0.88rem;
}

.nn-student-resources--parent .nn-student-resources__empty p {
  margin: 0;
  color: #64748b;
  font-size: 0.8rem;
}

.nn-student-resources--parent .nn-student-global-resources {
  padding-top: 0;
  border-top: 1px solid #e0e5eb;
}

.nn-student-resources--parent .nn-student-global-resources__head {
  display: grid;
  gap: 5px;
  padding: 20px 20px 14px;
}

.nn-student-resources--parent .nn-student-global-resources__head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1.03rem;
  font-weight: 800;
}

.nn-student-resources--parent .nn-student-global-resources__head p {
  margin: 0;
  color: #64748b;
  font-size: 0.8rem;
}

@media (max-width: 767px) {
  .nn-parent-banner--resources {
    width: calc(100% - 28px);
    margin-bottom: 18px;
  }

  .nn-student-resources--parent {
    gap: 18px;
    padding: 0 14px 50px;
  }

  .nn-student-resource-section > h2,
  .nn-student-resources--parent .nn-student-global-resources__head {
    padding-right: 16px;
    padding-left: 16px;
  }

  .nn-student-resource-section > p {
    padding-right: 16px;
    padding-left: 16px;
  }

  .nn-student-resources--parent .nn-student-resources__list {
    padding: 0 12px 12px;
  }

  .nn-student-resources--parent .nn-student-resource-card {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 11px;
    padding: 13px 4px;
  }

  .nn-student-resources--parent .nn-student-resource-card__open {
    grid-column: 2;
    justify-self: start;
  }
}

/* =========================================================
   STUDENT GLOBAL RESOURCES
   ========================================================= */

.nn-student-resources--app .nn-student-global-resources {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid #eeeeee;
}

.nn-student-resources--app .nn-student-global-resources__head {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
}

.nn-student-resources--app .nn-student-global-resources__head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
}

.nn-student-resources--app .nn-student-global-resources__head p {
  margin: 0;
  color: #666;
  font-size: 0.95rem;
  line-height: 1.35;
}

.nn-student-resources--app .nn-student-global-resources__list {
  display: grid;
  gap: 14px;
}

.nn-student-resources--app .nn-student-resource-card--global {
  background: #fff;
}

/* =========================================================
 33) GLOBAL RESOURCES ADMIN
   ========================================================= */

.nn-global-resources-admin {
  display: grid;
  gap: 16px;
}

.nn-global-resources-admin__hero h1 {
  margin: 0 0 6px;
}

.nn-global-resources-admin__hero p {
  margin: 0;
  color: var(--muted);
}

.nn-global-resources-admin__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.nn-global-resources-admin__head h2 {
  margin: 0 0 4px;
}

.nn-global-resources-admin__head p {
  margin: 0;
  color: var(--muted);
}

.nn-global-resource-form {
  display: grid;
  gap: 16px;
}

.nn-global-resource-form__grid,
.nn-global-resource-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.nn-global-resource-form__field,
.nn-global-resource-filters label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.nn-global-resource-form__field span,
.nn-global-resource-filters span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.nn-global-resource-form input,
.nn-global-resource-form select,
.nn-global-resource-form textarea,
.nn-global-resource-filters select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font-size: 15px;
  box-sizing: border-box;
}

.nn-global-resource-form textarea {
  min-height: 110px;
  padding-top: 10px;
  resize: vertical;
}

.nn-global-resource-form__field--wide {
  grid-column: span 2;
}

.nn-global-resource-form__field--full {
  grid-column: 1 / -1;
}

.nn-global-resource-form__check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  font-weight: 700;
}

.nn-global-resource-form__check input {
  width: auto;
  min-height: 0;
}

.nn-global-resource-form__actions {
  display: flex;
  justify-content: flex-end;
}

.nn-global-resource-filters {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.nn-global-resource-filters__actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nn-global-resource-list {
  display: grid;
}

.nn-global-resource-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.nn-global-resource-row:last-child {
  border-bottom: 0;
}

.nn-global-resource-row.is-hidden {
  opacity: 0.62;
}

.nn-global-resource-row__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 159, 168, 0.10);
  color: #0F9FA8;
}

.nn-global-resource-row__main {
  min-width: 0;
}

.nn-global-resource-row__main h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.nn-global-resource-row__meta,
.nn-global-resource-row__desc {
  margin: 0 0 5px;
  color: var(--muted);
  line-height: 1.4;
}

.nn-global-resource-row__url {
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
}

.nn-global-resource-row__actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nn-global-resource-row__actions form {
  margin: 0;
}

@media (max-width: 980px) {
  .nn-global-resource-form__grid,
  .nn-global-resource-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nn-global-resource-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .nn-global-resource-row__actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}

@media (max-width: 767px) {
  .nn-global-resources-admin__head {
    display: block;
  }

  .nn-global-resource-form__grid,
  .nn-global-resource-filters {
    grid-template-columns: 1fr;
  }

  .nn-global-resource-form__field--wide,
  .nn-global-resource-form__field--full {
    grid-column: auto;
  }

  .nn-global-resource-form__actions,
  .nn-global-resource-filters__actions,
  .nn-global-resource-row__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .nn-global-resource-form__actions .btn,
  .nn-global-resource-filters__actions .btn,
  .nn-global-resource-row__actions .btn {
    width: 100%;
    justify-content: center;
  }
}
