/* Reusable student confirmation and feedback surfaces. */

.student-feedback-dialog {
  width: min(100% - 32px, 480px);
  max-width: 480px;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #ded4c8;
  border-radius: 24px;
  background: #fffaf2;
  color: #173f37;
  box-shadow: 0 24px 65px rgba(17, 52, 45, 0.24);
}

.student-feedback-dialog[open] {
  animation: student-feedback-enter 180ms ease-out;
}

.student-feedback-dialog::backdrop {
  background: rgba(20, 37, 33, 0.58);
  backdrop-filter: blur(2px);
  animation: student-feedback-backdrop-enter 180ms ease-out;
}

.student-feedback-dialog__content {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 30px 30px 22px;
}

.student-feedback-dialog__icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: #f6ded8;
  color: #9d463e;
  font-size: 1.35rem;
}

.student-feedback-dialog__eyebrow {
  margin: 0 0 5px;
  color: #9d463e;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.student-feedback-dialog h2 {
  margin: 0 0 10px;
  color: #173f37;
  font-size: clamp(1.35rem, 4vw, 1.7rem);
  line-height: 1.25;
}

.student-feedback-dialog__content p:last-child {
  margin: 0;
  color: #665f57;
  font-size: 0.95rem;
  line-height: 1.65;
}

.student-feedback-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 30px 26px;
  border-top: 1px solid #e8ded2;
  background: rgba(245, 240, 231, 0.66);
}

.student-feedback-button {
  display: inline-flex;
  min-width: 128px;
  min-height: 46px;
  padding: 11px 18px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 13px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.student-feedback-button--cancel {
  border-color: #cfc5b9;
  background: #fffdf9;
  color: #173f37;
}

.student-feedback-dialog__icon--success {
  background: #dfeade;
  color: #286052;
}

.student-feedback-dialog__eyebrow--success {
  color: #397062;
}

.student-feedback-button--primary {
  border-color: #173f37;
  background: #173f37;
  color: #ffffff;
}

.student-feedback-button--primary:hover {
  border-color: #10342d;
  background: #10342d;
}

.student-feedback-button--secondary {
  border-color: #bdcbbf;
  background: #edf3ed;
  color: #173f37;
}

.student-feedback-button--secondary:hover {
  border-color: #8ea49b;
  background: #dfeade;
}

.student-feedback-button--cancel:hover {
  border-color: #8ea49b;
  background: #edf3ed;
}

.student-feedback-button--danger {
  border-color: #a94d45;
  background: #a94d45;
  color: #ffffff;
}

.student-feedback-button--danger:hover {
  border-color: #8c3933;
  background: #8c3933;
}

.student-feedback-button:hover {
  transform: translateY(-1px);
}

.student-feedback-button:focus-visible {
  outline: 3px solid #d28b55;
  outline-offset: 3px;
}

@keyframes student-feedback-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes student-feedback-backdrop-enter {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (max-width: 480px) {
  .student-feedback-dialog {
    width: min(100% - 24px, 420px);
    border-radius: 20px;
  }

  .student-feedback-dialog__content {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 13px;
    padding: 24px 20px 19px;
  }

  .student-feedback-dialog__icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }

  .student-feedback-dialog__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 16px 20px 20px;
  }

  .student-feedback-button {
    min-width: 0;
    min-height: 46px;
    padding-right: 12px;
    padding-left: 12px;
  }
}

@media (max-width: 360px) {
  .student-feedback-dialog__content {
    grid-template-columns: minmax(0, 1fr);
  }

  .student-feedback-dialog__actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .student-feedback-dialog[open],
  .student-feedback-dialog::backdrop {
    animation: none;
  }

  .student-feedback-button {
    transition: none;
  }
}
