/*
 * Modal (<dialog>, Stimulus `modal` controller): the WP JetPopup 2181 "Send letter to seller" look.
 * docs/design/components/popup.md: overlay #011B4E99, container 500px (100 % on mobile), white inner with
 * padding 50px 40px, close icon 24×24 at the top-right corner moved by translate(-33px, 25px).
 */
.modal {
  width: 500px;
  max-width: 100%;
  max-height: 100%;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  overflow: visible;
}
.modal::backdrop {
  background-color: var(--color-overlay-popup);
}

.modal__container {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  padding: 50px 40px;
  background-color: var(--color-white);
  overflow-y: auto;
}

.modal__close {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  transform: translateX(-33px) translateY(25px);
  transition: 0.2s;
}
.modal__close svg {
  display: block;
  width: 24px;
  height: 24px;
}

.modal__title {
  margin-bottom: 34px;
  font-size: 30px;
  line-height: 1.25em;
  letter-spacing: 0;
}

@media (max-width: 1024px) {
  .modal__title { font-size: 27px; }
}
@media (max-width: 767px) {
  .modal__title { font-size: 24px; }
}
