/* Mobile unified status and confirmation dialog */
.spray-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1000000;
  display: flex;
  align-items: center;
  width: calc(100vw - 32px);
  max-width: 480px;
  max-height: calc(100vh - 32px);
  box-sizing: border-box;
  padding: 16px 44px 16px 16px;
  overflow-y: auto;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
  color: #333;
  transform: translate(-50%, -50%);
  -webkit-overflow-scrolling: touch;
}


/* Checkout field errors stay at the top so the active input remains visible. */
.spray-dialog--top {
  top: 10px;
  top: calc(env(safe-area-inset-top) + 10px);
  align-items: center;
  max-height: calc(100vh - 20px);
  padding-top: 13px;
  padding-bottom: 13px;
  transform: translateX(-50%);
}

.spray-dialog__close {
  position: absolute;
  top: 7px;
  right: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #8a8a8a;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.spray-dialog__close:active {
  background: #f1f1f1;
  color: #333;
}

.spray-dialog__close:focus {
  outline: 1px solid #b8b8b8;
  outline-offset: 1px;
}

.spray-dialog__close svg {
  display: block;
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.spray-dialog__icon {
  flex: 0 0 auto;
  display: block;
  width: 32px;
  height: 32px;
  margin-right: 12px;
}

.spray-dialog__icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.spray-dialog--error .spray-dialog__icon {
  color: #ff5722;
}

.spray-dialog--ok .spray-dialog__icon {
  color: #12b93a;
}

.spray-dialog__icon-mark {
  fill: #fff;
}

.spray-dialog__content {
  flex: 1 1 auto;
  min-width: 0;
}

.spray-dialog__message {
  display: block;
  color: #333;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.55;
  white-space: pre-line;
  word-break: break-word;
}

.spray-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.spray-dialog__button {
  min-width: 76px;
  height: 38px;
  box-sizing: border-box;
  padding: 0 16px;
  border: 1px solid #d8d8d8;
  border-radius: 5px;
  background: #fff;
  color: #555;
  font: inherit;
  font-size: 14px;
  line-height: 36px;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.spray-dialog__button--confirm {
  border-color: #e4393c;
  background: #e4393c;
  color: #fff;
}

.spray-dialog--confirm {
  align-items: flex-start;
  padding-right: 16px;
}

.spray-dialog--confirm .spray-dialog__icon {
  margin-top: 2px;
}

@media (max-width: 360px) {
  .spray-dialog {
    width: calc(100vw - 24px);
    padding-left: 14px;
  }

  .spray-dialog__icon {
    width: 28px;
    height: 28px;
    margin-right: 10px;
  }

  .spray-dialog__message {
    font-size: 14px;
  }
}

@media (max-height: 420px) and (orientation: landscape) {
  .spray-dialog {
    top: 12px;
    max-height: calc(100vh - 24px);
    transform: translateX(-50%);
  }
}
