/**
 * @file
 * External links confirmation modal.
 */

.hmp-external-modal {
  box-sizing: border-box;
  width: min(720px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: auto;
  color: #1a1a1a;
  background: #fff;
  border: 0;
  border-radius: 20px;
  font-family: "Teva Sans", Arial, sans-serif;
}

.hmp-external-modal::backdrop {
  background: rgb(0 0 0 / 50%);
}

.hmp-external-modal__surface {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
  padding: 44px 24px 32px;
}

.hmp-external-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 5px;
  cursor: pointer;
  background: transparent;
  border: 0;
  place-items: center;
}

.hmp-external-modal__close span {
  display: block;
  width: 22px;
  height: 22px;
  background: url("../icons/close.svg") center / 22px 22px no-repeat;
}

.hmp-external-modal__close:hover,
.hmp-external-modal__close:focus-visible {
  background: #f2f4f6;
  border-radius: 50%;
}

.hmp-external-modal__close:focus-visible,
.hmp-external-modal__button:focus-visible {
  outline: 3px solid #3a9141;
  outline-offset: 2px;
}

.hmp-external-modal__description {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  width: 100%;
  text-align: center;
}

.hmp-external-modal__title {
  width: 100%;
  margin: 0;
  color: #3a9141;
  font-size: 22px;
  font-weight: 700;
  line-height: 26px;
}

.hmp-external-modal__body {
  width: 100%;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;

  & hr {
    margin-block: 20px;
    border-block-start: 1px solid #BFBFBF;
    border-block-end: none;
  }
}

.hmp-external-modal__body p {
  margin: 0 0 8px;
}

.hmp-external-modal__body p:last-child {
  margin-bottom: 0;
}

.hmp-external-modal__prompt {
  margin: -12px 0 0;
  color: #1c3f6a;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
}

.hmp-external-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.hmp-external-modal__button {
  box-sizing: border-box;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 20px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: normal;
  white-space: nowrap;
  cursor: pointer;
  border: 1.5px solid #1c3f6a;
  border-radius: 999px;
}

.hmp-external-modal__button--cancel {
  color: #1c3f6a;
  background: #fff;
}

.hmp-external-modal__button--continue {
  color: #fff;
  background: #1c3f6a;
}

.hmp-external-modal__button:hover {
  filter: brightness(0.9);
}

.hmp-external-modal__continue-icon {
  display: block;
  width: 12px;
  height: 12px;
  background: url("../icons/continue-arrow.svg") center / 12px 12px no-repeat;
}

.hmp-external-modal-is-open {
  overflow: hidden;
}

@media (min-width: 768px) {
  .hmp-external-modal__surface {
    gap: 40px;
    padding: 48px 60px 40px;
  }

  .hmp-external-modal__close {
    top: 17px;
    right: 15px;
  }

  .hmp-external-modal__title {
    font-size: 24px;
  }

  .hmp-external-modal__body,
  .hmp-external-modal__prompt {
    font-size: 18px;
  }

  .hmp-external-modal__actions {
    flex-direction: row;
    justify-content: center;
    width: auto;
  }
}
