/**
 * ============================================================================
 *  CERTIFICATE MODAL
 * ============================================================================
 *  Clicking the backdrop closes the modal; clicks inside the panel are
 *  stopped so they don't bubble up to the backdrop.
 * ============================================================================
 */

.nh-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(42, 32, 37, 0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.nh-modal__panel {
  background: #fff;
  max-width: 460px;
  width: 100%;
  border-radius: 24px;
  padding: clamp(22px, 4vw, 32px);
  position: relative;
  box-shadow: 0 40px 90px -30px rgba(42, 32, 37, 0.6);
}

.nh-modal__close {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--nh-blush);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--nh-ink-2);
}

.nh-modal__icon {
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: var(--nh-blush);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}

.nh-modal__title {
  font-family: var(--nh-serif);
  font-weight: 600;
  font-size: 23px;
  color: var(--nh-ink);
  margin-bottom: 4px;
}

.nh-modal__issuer {
  font-size: 13px;
  color: var(--nh-plum);
  font-weight: 600;
  margin-bottom: 16px;
}

.nh-modal__image {
  width: 100%;
  margin-bottom: 16px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--nh-blush);
  border: 1px solid rgba(58, 47, 52, 0.08);
  box-shadow: 0 10px 28px -18px rgba(42, 32, 37, 0.45);
}

.nh-modal__image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: clamp(220px, 46vw, 300px);
  object-fit: cover;
}

.nh-modal__desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--nh-muted);
}

/* Hidden state — the modal element is always in the DOM; we toggle this
   class so transitions/focus management stay simple. */
.nh-modal[hidden] {
  display: none;
}
