body.snappay-modal-open {
  overflow: hidden;
}

.snappay-offer-overlay,
.snappay-offer-overlay * {
  box-sizing: border-box;
}

.snappay-offer-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .4);
  font-family: "YekanBakh FaNum", Tahoma, sans-serif;
  line-height: 1.5;
}

.snappay-offer-overlay[hidden] {
  display: none;
}

.snappay-offer-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 470px;
  max-width: 100%;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 24px 80px 20px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
}

.snappay-offer-close {
  position: absolute;
  top: 18px;
  left: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111;
  cursor: pointer;
}

.snappay-offer-close:hover {
  opacity: .7;
}

.snappay-offer-close svg {
  width: 18px;
  height: 18px;
}

.snappay-offer-top {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 4px;
  margin-bottom: 24px;
}

.snappay-offer-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.snappay-offer-logo {
  height: 43px;
  width: auto;
  max-width: none;
  object-fit: contain;
  user-select: none;
}

.snappay-offer-heading {
  text-align: right;
}

.snappay-offer-title {
  margin: 0 0 5px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 900;
  color: #111;
  letter-spacing: -.5px;
  line-height: 1.3;
}

.snappay-offer-subtitle {
  margin: 6px 0 0;
  font-size: 14.7px;
  font-weight: 400;
  color: #8d8d8d;
  line-height: 1.4;
}

.snappay-offer-code-display {
  margin: 15px 0 38px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  color: #111;
  letter-spacing: 2px;
  user-select: all;
}

.snappay-offer-copy-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 10px;
  width: 100%;
  height: 46px;
  padding: 0 36px;
  margin: 0;
  border: 0;
  border-radius: 2px;
  background: var(--beige, #b99d6b);
  color: #111;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  cursor: pointer;
  transition: background-color .2s;
}

.snappay-offer-copy-btn:hover {
  background: #aa8d5c;
}

.snappay-offer-copy-btn:active {
  background: #9b7e50;
}

.snappay-offer-copy-icon {
  position: absolute;
  top: 14px;
  left: 13px;
  color: #40341f;
}

.snappay-offer-close:focus-visible,
.snappay-offer-copy-btn:focus-visible {
  outline: 2px solid #40341f;
  outline-offset: 3px;
}

.snappay-offer-hint {
  margin: 4px 0 0;
  text-align: center;
  font-size: 13px;
  font-weight: 400;
  color: #8d8d8d;
}

@media screen and (max-width: 768px) {
  .snappay-offer-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .snappay-offer-dialog {
    width: 100vw;
    max-width: 398px;
    max-height: 100dvh;
    padding: 22px 61px 28px;
    border-radius: 0;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, .1);
    animation: snappay-sheet-enter 1.5s cubic-bezier(.22, 1, .36, 1) both;
  }

  .snappay-offer-close {
    top: 14px;
    left: 14px;
    width: 30px;
    height: 30px;
  }

  .snappay-offer-close svg {
    width: 19px;
    height: 19px;
  }

  .snappay-offer-top {
    margin-top: 18px;
    margin-bottom: 34px;
  }

  .snappay-offer-logo {
    width: 65px;
    height: auto;
  }

  .snappay-offer-title {
    line-height: 1.45;
    white-space: nowrap;
  }

  .snappay-offer-subtitle {
    margin-top: 2px;
    white-space: nowrap;
  }

  .snappay-offer-code-display {
    margin: 2px 0 40px;
    font-size: 22px;
    letter-spacing: 1px;
  }

  .snappay-offer-copy-btn {
    height: 47px;
    border-radius: 3px;
  }

  .snappay-offer-hint {
    margin-top: 5px;
    white-space: nowrap;
  }
}

@media screen and (max-width: 420px) {
  .snappay-offer-dialog {
    width: 92vw;
    max-width: 390px;
    padding: 22px 40px 28px;
  }
}

@media screen and (max-width: 360px) {
  .snappay-offer-dialog {
    padding-right: 24px;
    padding-left: 24px;
  }

  .snappay-offer-hint {
    font-size: 11px;
  }
}

@keyframes snappay-sheet-enter {
  from { transform: translateY(105%); }
  to { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .snappay-offer-dialog {
    animation: none;
  }

  .snappay-offer-copy-btn {
    transition: none;
  }
}
