.student-state {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 210px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px 24px;
  border: 1px dashed #cfc9bd;
  border-radius: 18px;
  background: linear-gradient(145deg, #fffefa 0%, #f8f5ee 100%);
  color: #24231f;
  text-align: center;
}

.student-state.is-compact {
  min-height: 148px;
  padding: 24px 18px;
}

.student-state-icon {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border: 1px solid #d8d1c4;
  border-radius: 50%;
  background: #fff;
  color: #686258;
}

.student-state.is-empty .student-state-icon::before {
  content: "";
  width: 17px;
  height: 12px;
  border: 2px solid currentColor;
  border-top-width: 5px;
  border-radius: 2px 2px 5px 5px;
  transform: translateY(2px);
}

.student-state.is-empty .student-state-icon::after {
  content: "";
  position: absolute;
  width: 11px;
  border-top: 2px solid currentColor;
  transform: translateY(-8px);
}

.student-state.is-loading .student-state-icon::before {
  content: "";
  width: 21px;
  height: 21px;
  border: 3px solid #dfd9cd;
  border-top-color: #c79a00;
  border-radius: 50%;
  animation: student-state-spin 0.8s linear infinite;
}

.student-state.is-error {
  border-style: solid;
  border-color: #e4b9af;
  background: linear-gradient(145deg, #fffdfa 0%, #fff3ef 100%);
}

.student-state.is-error .student-state-icon {
  border-color: #e3aea2;
  background: #fff7f4;
  color: #a13d2b;
}

.student-state.is-error .student-state-icon::before {
  content: "!";
  font-size: 23px;
  font-weight: 850;
  line-height: 1;
}

.student-state-copy {
  max-width: 560px;
}

.student-state-copy strong {
  display: block;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.student-state-copy p {
  margin: 7px 0 0;
  color: #6c675e;
  font-size: 14.5px;
  line-height: 1.55;
}

.student-state-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
}

.student-state .student-state-actions button {
  min-height: 44px !important;
  box-sizing: border-box;
  padding-inline: 18px;
  font-size: 12px !important;
  line-height: 1.2;
}

@keyframes student-state-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .student-state.is-loading .student-state-icon::before {
    animation: none;
  }
}

@media (max-width: 700px) {
  .student-state {
    min-height: 190px;
    padding: 28px 18px;
  }

  .student-state.is-compact {
    min-height: 145px;
    padding: 22px 16px;
  }

  .student-state-copy strong {
    font-size: 17px;
  }

  .student-state-copy p {
    font-size: 14px;
  }

  .student-state-actions {
    width: min(100%, 320px);
  }

  .student-state-actions button {
    width: 100%;
  }
}

html[data-egghead-theme="dark"] .student-state,
body.dark-mode .student-state {
  border-color: #514d45;
  background: linear-gradient(145deg, #24231f 0%, #1c1b18 100%);
  color: #f6f1e6;
}

html[data-egghead-theme="dark"] .student-state-icon,
body.dark-mode .student-state-icon {
  border-color: #5f594f;
  background: #2d2a25;
  color: #c9c1b4;
}

html[data-egghead-theme="dark"] .student-state-copy p,
body.dark-mode .student-state-copy p {
  color: #bdb5a8;
}

html[data-egghead-theme="dark"] .student-state.is-error,
body.dark-mode .student-state.is-error {
  border-color: #76483f;
  background: linear-gradient(145deg, #2b211e 0%, #231c1a 100%);
}

html[data-egghead-theme="dark"] .student-state.is-error .student-state-icon,
body.dark-mode .student-state.is-error .student-state-icon {
  border-color: #805046;
  background: #35231f;
  color: #f0a795;
}
