:root {
  --modal-focus-color: #109cde;
}

.dialog-modal {
  background: #fff;
  border-radius: 6px;
  margin: auto;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: calc((100% - 6px) - 2em);
  max-height: calc((100% - 6px) - 2em);
  height: fit-content;
  width: 100%;
  user-select: text;
  visibility: visible;
  overflow: auto;
  z-index: 102;
}

.dialog-modal.commerce-frame {
  z-index: 103;
}

.modal-curtain.is-open {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgb(50 50 50 / 80%);
  z-index: 101;
}

.dialog-modal button.dialog-close {
  border: 3px solid transparent;
  position: absolute;
  padding: 0;
  cursor: pointer;
  background: none;
  border-radius: 50%;
  height: 26px;
  right: 5px;
  top: 5px;
  width: 26px;
  z-index: 1;
}

.dialog-close:focus-visible {
  outline: 2px solid var(--modal-focus-color);
}

.dialog-modal .section > .content {
  max-width: initial;
}

.dialog-modal > .fragment > .section > .content > *:last-child {
  margin-bottom: 0;
}

.dialog-modal > .fragment > .section > .content > *:first-child:not(h1, h2, h3, h4, h5, h6) {
  margin-top: 0;
}

.dialog-modal > .fragment > .section > .content > h1,
.dialog-modal > .fragment > .section > .content > h2,
.dialog-modal > .fragment > .section > .content > h3,
.dialog-modal > .fragment > .section > .content > h4,
.dialog-modal > .fragment > .section > .content > h5,
.dialog-modal > .fragment > .section > .content > h6 {
  margin: 12px;
}

.locale-modal{
  text-align: center;
  padding: 48px 32px 30px;
}

.locale-modal .text-wrapper {
  padding-top: 30px;
}

.locale-modal p {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.25rem;
  margin-bottom: 1ex;
}

.locale-modal a {
  font-size: .875rem;
  display: block;
  font-weight: 500;
  padding: 8px;
  cursor: pointer;
}

.locale-modal .world-icon {
  width: 3.429rem;
}

.region-selector > div > p,
.region-selector > div > ul li {
  line-height: 1.7;
}

.region-selector > div > p {
  font-size: 16px;
  margin-bottom: 0;
}

.region-selector-text {
  padding: 32px 32px 20px;
  font-size: 16px;
}

.region-selector-text > div > p {
  margin: 0 0 4px;
}

.region-selector-text > div > p:first-of-type {
  font-size: 24px;
}

.dialog-modal > .fragment > .section.region-selector-text > .content > p:last-of-type {
  margin-bottom: 0;
}

.region-selector > div > ul li > a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.region-selector {
  padding: 0 32px 32px;
  font-size: 14px;
}

.region-selector ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

/* stylelint-disable-next-line no-descending-specificity */
.region-selector .content {
  column-count: 1;
}

.commerce-modal-open {
  overflow: hidden;
}

@media (min-width: 600px) {
  .dialog-modal {
    max-width: 80vw;
    width: fit-content;
  }

  .region-selector .content {
    column-count: 3;
  }
}

@media (min-width: 1200px) {
  .region-selector .content {
    column-count: 5;
  }

  .dialog-modal#langnav {
    width: 1200px;
    max-width: calc((100% - 6px) - 2em);
  } 
}

@media (max-width: 1200px) {
  .dialog-modal.commerce-frame {
    width: 100%;
    max-width: 100%;
    max-height: 100%;
  }
}

@media (min-width: 1200px) {
  .dialog-modal.commerce-frame {
    width: 1024px;
    height: 850px;
  }

  .dialog-modal.commerce-frame .milo-iframe {
    padding-bottom: 0;
    height: 845px;
  }
}
