/*--------------------------------------------------
 *               Discount popup
 * ----------------------------------------------------*/
.popup-container {
  top: 0;
  left: 0;
  display: none;
  position: fixed;
  width: 100dvw;
  height: 100dvh;
  place-content: center;
  background: #00000055;
  backdrop-filter: blur(4px);
  z-index: 9999999999;
}

.popup-container.show {
  display: grid;
}

.popup-container.exit {
  opacity: 0;
  backdrop-filter: blur(0px);
  transition: all ease-in-out 0.6s;
}

.popup-container.exit .discount {
  animation: 0.45s cubic-bezier(0.46, 0, 0.66, 1) twist-and-go forwards;
}

@keyframes twist-and-go {
  0% {
    transform: scale(1) rotate(0);
  }
  10% {
    transform: scale(1.2) rotate(-15deg);
  }
  60% {
    transform: scale(0) rotate(45deg);
  }
  100% {
    transform: scale(0) rotate(280deg);
  }
}

@keyframes scale-down-fade-out {
  0% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
  100% {
    transform: scale(0.85) rotate(0);
    opacity: 0;
  }
}

/*--------------------------------------------------
 *               Popup card
 * ----------------------------------------------------*/

.ds-icon {
  max-width: 55px;
}

.discount {
  width: 600px;
  max-width: 500px;
  background: linear-gradient(226deg, rgb(242 143 190) 0%, rgb(226, 201, 240) 40%, rgb(125 235 255) 100%);
  border-radius: 18px;
  padding: 36px 44px;
  box-sizing: border-box;
  font-family: "Noto Sans JP","ヒラギノ角ゴ Pro W3","Hiragino Kaku Gothic Pro",メイリオ,Meiryo,"ＭＳ Ｐゴシック",sans-serif;
  position: relative;
  justify-self: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  border: 2px solid #6b0080;
}

.discount p {
  color: #1a1a1a;
  margin: 0;
}

/*--------------------------------------------------
 *               Title row (icon + heading)
 * ----------------------------------------------------*/
.discount .title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 22px;
}

.discount .title-row .ds-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 10px;
}

.discount h1.color-grad {
  font-family: "Noto Sans JP","ヒラギノ角ゴ Pro W3","Hiragino Kaku Gothic Pro",メイリオ,Meiryo,"ＭＳ Ｐゴシック",sans-serif !important;
  text-align: left !important;
  margin: 0 !important;
  padding: 0;
  line-height: 1.25 !important;
  font-size: 26px !important;
  font-weight: 700 !important;
  color: black;
  /* background: -webkit-linear-gradient(45deg, #03A9F4, #9C27B0 100%); */
  /* -webkit-background-clip: text; */
  /* background-clip: text; */
  /* -webkit-text-fill-color: transparent; */
}

/*--------------------------------------------------
 *               Message body
 * ----------------------------------------------------*/
.discount .message {
  text-align: center;
  font-size: 16px;
  line-height: 1.75;
  font-weight: 500;
  color: #1a1a1a;
  padding: 6px 0 24px;
}

.discount .message .limited {
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 6px;
}

.discount .message span {
  color: #9c27b0;
  font-weight: 700;
}

/*--------------------------------------------------
 *               Close button (top-right X)
 * ----------------------------------------------------*/
#close-popup {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  color: #1a1a1a;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

#close-popup:hover {
  opacity: 1;
}

#close-popup i {
  color: #1a1a1a;
  font-size: 18px;
}

/*--------------------------------------------------
 *               Copy button (SAVE10!)
 * ----------------------------------------------------*/
button#copy-button {
  width: 100%;
  padding: 0;
  position: relative;
  background: linear-gradient(90deg, #ffaad5 0%, #eb9eeb 100%);
  color: #1a1a1a;
  border: none;
  border-radius: 12px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  cursor: pointer;
  --anime-move-up: 0.2s cubic-bezier(1, 0.14, 0.12, 0.65) move-up forwards;
  border: 2px solid #52008030;
}

button#copy-button input {
  width: 100%;
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  border: none;
  outline: none;
  background: none;
  text-align: center;
  padding: 16px 60px;
  cursor: pointer;
  font-family: "Noto Sans JP","ヒラギノ角ゴ Pro W3","Hiragino Kaku Gothic Pro",メイリオ,Meiryo,"ＭＳ Ｐゴシック",sans-serif;
  box-sizing: border-box;
}

button#copy-button i {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  padding: 0 22px;
  background: rgb(255 255 255 / 14%);
  color: #1a1a1a;
  font-size: 20px;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

button#copy-button.copied:before {
  content: "コピーしました";
  position: absolute;
  top: 0;
  right: 10px;
  background: #5c81dc;
  color: #fff;
  padding: 6px 10px 8px;
  border-radius: 20px;
  font-size: 14px;
  animation: var(--anime-move-up);
  z-index: 2;
}

button#copy-button.copied:after {
  content: "";
  position: absolute;
  top: 36px;
  right: 28px;
  width: 15px;
  height: 11px;
  background: #5c81dc;
  clip-path: polygon(100% 0, 0 0, 50% 100%);
  animation: var(--anime-move-up);
  z-index: 2;
}

@keyframes move-up {
  0% {
    opacity: 0;
    transform: translateY(0px);
  }
  100% {
    opacity: 1;
    transform: translateY(-50px);
  }
}

/*--------------------------------------------------
 *               Note (under the button)
 * ----------------------------------------------------*/
.discount .note {
  text-align: center;
  font-size: 12px;
  color: #333;
  margin-top: 16px;
  padding: 0 10px;
}

/*--------------------------------------------------
 *               Mobile
 * ----------------------------------------------------*/
@media (max-width: 600px) {
  .discount {
    padding: 28px 22px 22px;
  }

  .discount .title-row {
    gap: 12px;
    margin-bottom: 16px;
  }

  .discount .title-row .ds-icon {
    width: 42px;
    height: 42px;
  }

  .discount h1.color-grad {
    font-size: 20px;
  }

  .discount .message {
    font-size: 14px;
    line-height: 1.7;
  }

  .discount .message .limited {
    font-size: 15px;
  }

  button#copy-button input {
    font-size: 18px;
    padding: 14px 50px;
  }

  button#copy-button i {
    padding: 0 18px;
    font-size: 18px;
  }
}
