/* ─── Checkout preview modal (front page) ─── */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: color-mix(in srgb, var(--text-color) 60%, transparent);
  backdrop-filter: blur(5px);

  &[hidden] {
    display: none;
  }
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow: auto;
  padding: 36px;
  border-radius: var(--r-lg);
  background: var(--paper);
  color: var(--ink);

  @media (prefers-reduced-motion: no-preference) {
    animation: es-modal-in 0.35s var(--ease);
  }

  ul {
    margin: 14px 0 18px 18px;
    display: grid;
    gap: 6px;
    list-style: disc;
  }

  p,
  li {
    color: var(--body-ink);
    font-size: 0.92rem;
  }

  a:not(.btn) {
    color: var(--signal-d);
    font-weight: 600;
  }

  .btn {
    width: 100%;
    margin-top: 22px;
  }
}

@keyframes es-modal-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.modal-x {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--chalk);
  font-size: 1.4rem;
  line-height: 1;
}

.preview {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--signal-soft);
  color: var(--signal-ink);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 1.8rem;
  font-weight: 800;
}

.m-price {
  font-family: var(--title-font);
  font-stretch: 118%;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--signal-d);
  margin: 6px 0;
}

.modal-links {
  margin-top: 12px;
}
