body.student-modal-open {
  overflow: hidden;
}

.student-modal {
  width: min(640px, calc(100% - 48px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  padding: 0;
  overflow: visible;
  color: #111827;
  background: transparent;
  border: 0;
}

.student-modal::backdrop {
  background: rgba(21, 47, 79, 0.85);
}

.student-modal:focus {
  outline: none;
}

.student-modal__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  width: 100%;
  padding: 44px 40px 40px;
  background: #fff;
  border: 1.5px solid var(--color-border, #e0e0e0);
  border-radius: var(--radius-md, 8px);
  box-shadow: 0 12px 32px rgba(21, 47, 79, 0.18);
}

.student-modal__panel::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 8px;
  background: linear-gradient(
    90deg,
    var(--color-blue, #00c4f3) 0 50%,
    var(--color-pink, #ee86a1) 50% 100%
  );
  border-radius: 7px 7px 0 0;
  content: "";
}

.student-modal--open-campus .student-modal__panel::before {
  background: var(--color-blue, #00c4f3);
}

.student-modal--request .student-modal__panel::before {
  background: var(--color-pink, #ee86a1);
}

.student-modal__title {
  width: 100%;
  margin: 0;
  color: var(--color-text, #333);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
}

.student-modal__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.student-modal__link {
  --school-color: var(--color-blue, #00c4f3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 12px 16px 12px 18px;
  overflow: hidden;
  color: var(--color-text, #333);
  background: #fff;
  border: 1.5px solid var(--color-border, #e0e0e0);
  border-left: 8px solid var(--school-color);
  border-radius: var(--radius-sm, 4px);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.student-modal__link:nth-child(1) {
  --school-color: var(--color-green, #8dc556);
}

.student-modal__link:nth-child(2) {
  --school-color: var(--color-purple, #8b6eb0);
}

.student-modal__link:nth-child(3) {
  --school-color: var(--color-orange, #f29838);
}

.student-modal__link:nth-child(4) {
  --school-color: var(--color-pink, #ee86a1);
}

.student-modal__link:nth-child(5) {
  --school-color: var(--color-teal, #51bebb);
}

.student-modal__link:hover,
.student-modal__link:focus-visible {
  color: #005ead;
  background: #f5fcff;
  border-color: var(--school-color);
  border-left-color: var(--school-color);
}

.student-modal__link img {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  opacity: 0.75;
}

.student-modal__link span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.student-modal__close-icon,
.student-modal__close-button {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text, #333);
  background: #fff;
  border: 1px solid var(--color-text, #333);
  border-radius: var(--radius-sm, 4px);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.student-modal__close-icon:hover,
.student-modal__close-icon:focus-visible,
.student-modal__close-button:hover {
  color: #005ead;
  background: #f5fcff;
  border-color: var(--color-blue, #00c4f3);
}

.student-modal__close-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: #fff;
  box-shadow: none;
  font-size: 20px;
  line-height: 1;
}

.student-modal__close-button {
  width: 200px;
  min-height: 50px;
  padding: 12px 24px;
  color: #fff;
  background: #005ead;
  border: 1px solid #005ead;
}

.student-modal__close-button:hover,
.student-modal__close-button:focus-visible {
  color: #fff;
  background: var(--color-blue, #00c4f3);
  border-color: var(--color-blue, #00c4f3);
}

@media (max-width: 800px) {
  .student-modal {
    width: min(100% - 32px, 640px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
  }

  .student-modal__panel {
    gap: 20px;
    padding: 72px 24px 28px;
  }

  .student-modal__close-icon {
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
}

@media (max-width: 420px) {
  .student-modal {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 24px);
  }

  .student-modal__panel {
    gap: 16px;
    padding: 68px 16px 20px;
    border-radius: var(--radius-md, 8px);
  }

  .student-modal__title {
    font-size: 22px;
  }

  .student-modal__links {
    gap: 10px;
  }

  .student-modal__link {
    min-height: 54px;
    padding: 10px 12px;
    border-left-width: 6px;
    font-size: 14px;
  }

  .student-modal__close-button {
    width: 100%;
    min-height: 50px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .student-modal__link,
  .student-modal__close-icon,
  .student-modal__close-button {
    transition: none;
  }
}
