/* ==========================================================================
   1. 팝업 전체 레이아웃 (Wrapper & Centering)
   ========================================================================== */
.popup-wrapper {
  z-index: 1111;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.popup-wrapper.visible {
  display: flex;
}

.popup-wrapper .popup {
  position: relative;
  width: 726px;
  height: 430px;
  margin: 0;
}

.popup-wrapper .rectangle {
  position: absolute;
  top: -9px;
  left: -9px;
  width: 738px;
  height: 448px;
}

/* ==========================================================================
   2. 팝업 내부 콘텐츠 (Content Styles)
   ========================================================================== */
.popup-wrapper .text-wrapper {
  position: absolute;
  top: 31px;
  left: 0;
  right: 0;
  margin: auto;
  font-weight: 700;
  font-size: 24px;
  text-align: center;
  white-space: nowrap;
  transition: font-size 0.3s ease;
}

.popup-wrapper .line {
  position: absolute;
  top: 78px;
  left: 0;
  width: 100%;
  height: 1px;
}

.popup-wrapper .box {
  position: absolute;
  top: 104px;
  left: 0;
  right: 0;
  margin: auto;
  width: 397px;
  font-weight: 400;
  color: var(--darkgray);
  font-size: .9375rem;
  text-align: center;
}

.popup-wrapper .by-continuing-you {
  position: absolute;
  top: 355px;
  left: 0;
  right: 0;
  margin: auto;
  width: 648px;
  text-align: center;
  font-weight: 400;
  font-size: .9375rem;
  line-height: 24px;
}

.popup-wrapper .by-continuing-you a {
  font-weight: 700;
  text-decoration: underline;
}

/* ==========================================================================
   3. 버튼 스타일 (Buttons)
   ========================================================================== */

/* --- 닫기 버튼 --- */
.popup-wrapper .bt-close {
  all: unset;
  box-sizing: border-box;
  position: absolute;
  top: 1px;
  left: 647px;
  width: 72px;
  height: 72px;
  cursor: pointer;
  transition: all 0.4s ease;
}

/* --- Connect Wallet 버튼 --- */
.popup-wrapper button.bt-long {
  all: unset;
  box-sizing: border-box;
  position: absolute;
  top: 141px;
  left: 40px;
  display: inline-flex;
  height: 63px;
  width: 640px;
  cursor: pointer;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.popup-wrapper button.bt-long:hover,
.popup-wrapper button.bt-long:active {
  transform: translateY(-2px);
}

.popup-wrapper button.bt-long .bg-style {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  position: relative;
  width: 100%;
  height: 100%;
  padding: 20px;
  border-radius: 63px;
  box-shadow: 0px 4px 4px #00000040;
  transition: box-shadow 0.2s ease;
  background: linear-gradient(92deg, #FF8000 1.65%, #FFAF5F 49.8%, #FF8000 97.95%);
}

.popup-wrapper button.bt-long:hover .bg-style {
  box-shadow: 0px 8px 8px #00000040;
}

.popup-wrapper .bt-long .bg-style .radiusLine {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 99%;
  height: 95%;
  border: 1px solid var(--font-default);
  border-radius: 63px;
}

.popup-wrapper .bt-long .bg-style .l,
.popup-wrapper .bt-long .bg-style .r {
  position: absolute;
  top: 44%;
  transform: translateY(-50%);
  width: 8.071px;
  height: 8.071px;
  flex-shrink: 0;
}

.popup-wrapper .bt-long .bg-style .l {
  left: 0;
}

.popup-wrapper .bt-long .bg-style .r {
  right: 0;
}

.popup-wrapper .bt-long .text {
  display: flex;
  width: 100%;
  min-width: 200px;
  height: 100%;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
  gap: 10px;
}
@media (max-width: 390.98px) {
  .popup-wrapper .bt-long .text {
    gap: 5px;
  }
}

.popup-wrapper .connect-wallet {
  font-weight: 700;
  color: var(--font-default);
  font-size: 22px;
  white-space: nowrap;
}
@media (max-width: 390.98px) {
  .popup-wrapper .connect-wallet {
    font-size: 18px;
  }
}

/* --- 소셜 로그인 버튼 --- */
.popup-wrapper .view-2 {
  display: flex;  align-items: center;   justify-content: center;
  gap: 50px;
  position: absolute;
  top: 185px; /*235px*/
  left: 50%;
  transform: translateX(-50%);
}


.popup-wrapper .frame-wrapper {
  position: relative;
  width: 90px;
  height: 90px;
}

.popup-wrapper .frame-wrapper button {
  all: unset;
  box-sizing: border-box;
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  border-radius: 100px;
  border: 1px solid #d0d0d0;
  box-shadow: 0px 4px 4px #00000040;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.popup-wrapper .frame-wrapper button:hover {
  transform: translateY(-2px);
  box-shadow: 0px 6px 8px #00000040;
}

.popup-wrapper .frame-wrapper button img {
  object-fit: contain;
}

/* 개별 배경색 */
.popup-wrapper button.frame { /* Google */
  background-color: #ffffff;
}
.popup-wrapper button.apple-wrapper { /* Apple */
  background-color: #090909;
}
.popup-wrapper button.monochrome-facebook-wrapper { /* Facebook */
  background-color: #3875ea;
}
.popup-wrapper button.mail-wrapper { /* Email */
  background-color: var(--orange);
}

@media (max-width: 768.98px) {

  .popup-wrapper .view,
  .popup-wrapper .popup {
    width: 100%;
    min-width: 320px;
    background-color: var(--font-default);
    border-radius: 2rem;
  }

  .popup-wrapper img.rectangle {
    display: none;
  }
  .popup-wrapper .line {
    width: 100%;
    object-fit: cover;
  }
  .popup-wrapper .bt-close {
    left: auto;
    right:0;
  }
  .popup-wrapper h1.text-wrapper {
    width: 90%;
    font-size: 19px;
    white-space: wrap;
  }
  .popup-wrapper button.bt-long {
    left: 5%;
    width: 90%;
  }
  @media (max-width: 390.98px) {
    .popup-wrapper button.bt-long {
      top: 150px;
    }
  }

  .popup-wrapper button.bt-long:hover,
  .popup-wrapper button.bt-long:active {
    left: 5%;
    transform: none !important;
  }
  .popup-wrapper .box,
  .popup-wrapper .by-continuing-you {
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    white-space: wrap;
  }
  .popup-wrapper .by-continuing-you {
    top: auto;
    bottom: 5%;
  }
  .popup-wrapper .view-2 {
    width: 90%;
    gap: 1rem;
  }

}

@media (max-width: 500px) {

  .popup-wrapper .bt-close {
    top: -30px;
    right: -20px;
  }

  .popup-wrapper .frame-wrapper {
    width: 65px;
    height: 65px;
    transition: width 0.4s ease, height 0.4s ease;
  }
  .popup-wrapper .frame-wrapper button img {
    width: 60%;
  }

}

@media (max-width: 390.98px) {
  .popup-wrapper .view-2 {
    gap: 8px;
  }
}

@media (max-width: 320.98px) {
  .popup-wrapper .bt-close {
    top: -35px;
    right: -10px;
  }
}

/* ==========================================================================
   4. 지갑 팝업
   ========================================================================== */

.popup-wrapper.wallet {
  align-items: flex-start;
  justify-content: flex-start;
  min-width: 320px;
}

.popup-wrapper.wallet .box {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 754px;
  height: 542px;
  margin: 0;
}
@media (max-width: 768.98px) {
  .popup-wrapper.wallet .box {
    width: 94%;
    transform: translate(-50%, -55%);
  }
}
@media (max-width: 390.98px) {
  .popup-wrapper.wallet .box {
    width: 100%;
  }
}

.popup-wrapper.wallet .bt-close {
  top: 8px;
  left: auto;
  right: 10px;
}
@media (max-width: 768.98px) {
  .popup-wrapper.wallet .bt-close {
    top: 0;
    right: 0;
  }
}

.popup-wrapper.wallet .box .popup {
  display: flex;
  width: 100%;
  height: 542px;
}
@media (max-width: 768.98px) {
  .popup-wrapper.wallet .box .popup {
    height: 100%;
  }
}

.popup-wrapper.wallet .box img.rectangle {
  z-index: 0;
  top:0;
  left: 0;
  width: 754px;
  height: 542px;
  object-fit: contain;
}
@media (max-width: 768.98px) {
  .popup-wrapper.wallet .box img.rectangle {
    display: block;
    width: 100%;
    object-fit: contain;
  }
}

.popup-wrapper.wallet .flex-wrap {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 542px;
  padding: 10px;
  position: absolute;
  top: 0;
  left: 0;
}
@media (max-width: 768.98px) {
  .popup-wrapper.wallet .flex-wrap {
    flex-direction: column;
    height: auto;
    padding: 0 0 25px;
    border-radius: 30px;
    background-color: var(--font-default);
  }
}

.popup-wrapper.wallet .flex-wrap .div-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 30px;
  position: relative;
  width: 100%;
  max-width: 262px;
  height: 100%;
  background-color: #fffcf2;
  border-radius: 30px 0px 0px 30px;
  border-right-width: 1px;
  border-right-style: solid;
  border-color: #0000000d;
  padding: 36px 15px 0;
}
@media (max-width: 768.98px) {
  .popup-wrapper.wallet .flex-wrap .div-left {
    gap: 10px;
    max-width: none;
    border-radius: 30px 30px 0px 0px;
    padding: 15px 15px 0;
    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.4);
  }
}
@media (max-width: 390.98px) {
  .popup-wrapper.wallet .flex-wrap .div-left {
    padding: 15px 10px 0;
  }
}

.popup-wrapper.wallet .div-left h1 {
  width: 209px;
  padding: 0 0 0 20px;
  text-align: left;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0;
  line-height: 24px;
  white-space: nowrap;
}
@media (max-width: 768.98px) {
  .popup-wrapper.wallet .div-left h1 {
    width: 100%;
    padding: 10px 0;
    text-align: center;
  }
}

.popup-wrapper.wallet .div-left button.bt-wallet {
  display: flex;
  flex-direction: row;
  width: 229px;
  height: 51px;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border-radius: 10px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(130deg, rgba(0, 14, 44, 1) 0%, rgba(97, 97, 97, 1) 87%);
}
@media (max-width: 768.98px) {
  .popup-wrapper.wallet .div-left button.bt-wallet {
    gap: 10px;
    width: auto;
    max-width: none;
    padding: 10px;
    border-radius: 10px 10px 0 0;
    border-bottom: 0;
  }
}
@media (max-width: 390.98px) {
  .popup-wrapper.wallet .div-left button.bt-wallet {
    gap: 5px;
    height: 45px;
    padding: 5px 8px;
  }
}

.popup-wrapper.wallet .div-left button.bt-wallet::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.popup-wrapper.wallet .div-left button.bt-wallet:hover::before {
  opacity: 1;
}

.popup-wrapper.wallet .div-left img.wemixplay {
  position: relative;
  width: 30px;
  height: 30px;
  aspect-ratio: 1;
  object-fit: cover;
}
@media (max-width: 390.98px) {
  .popup-wrapper.wallet .div-left img.wemixplay {
    width: 25px;
    height: 25px;
  }
}

.popup-wrapper.wallet .div-left .coin-platform {
  width: 120px;
  font-weight: 700;
  font-size: 16px;
  position: relative;
  color: var(--font-default);
  letter-spacing: -0.3px;
  line-height: 24px;
}
@media (max-width: 768.98px) {
  .popup-wrapper.wallet .div-left .coin-platform {
    width: auto;
  }
}
@media (max-width: 390.98px) {
  .popup-wrapper.wallet .div-left .coin-platform {
    font-size: 14px;
  }
}

.popup-wrapper.wallet .div-left .caret-right {
  position: relative;
  width: 24px;
  height: 24px;
  aspect-ratio: 1;
  transition: rotate 0.3s ease-in-out;
}
@media (max-width: 768.98px) {
  .popup-wrapper.wallet .div-left .caret-right {
    rotate: 90deg;
  }
}
@media (max-width: 390.98px) {
  .popup-wrapper.wallet .div-left .caret-right {
    width: 16px;
    height: 16px;
  }
}

.popup-wrapper.wallet .div-left .notice {
  width: 152px;
  height: 20px;
  position: absolute;
  left: 33px;
  bottom: 28px;
}

@media (max-width: 768.98px) {
  .popup-wrapper.wallet .div-left .notice {
    left: auto;
    bottom: 5px;
    right: 10px;
  }
}
@media (max-width: 390.98px) {
  .popup-wrapper.wallet .div-left .notice {
    right: 0px;
  }
}

.popup-wrapper.wallet .div-left .notice a {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  cursor: pointer;
}

.popup-wrapper.wallet .div-left p.QR {
  font-weight: 500;
  font-size: .875rem;
  text-align: center;
  letter-spacing: -0.3px;
  line-height: 1rem;
  text-decoration: underline;
  white-space: nowrap;
}
@media (max-width: 390.98px) {
  .popup-wrapper.wallet .div-left p.QR {
    font-size: 12px;
  }
}

.popup-wrapper.wallet .div-left .arrow-square-out {
  position: relative;
  width: 20px;
  height: 20px;
  aspect-ratio: 1;
}

.popup-wrapper.wallet .flex-wrap .contents {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: 474px;
  height: 524px;
  padding: 33px 30px 0;
}
@media (max-width: 768.98px) {
  .popup-wrapper.wallet .flex-wrap .contents {
    max-width: none;
    height: 100%;
    padding: 20px 15px 0;
  }
}

.popup-wrapper.wallet .contents button.down-wemix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 15px;
  position: relative;
  flex: 0 0 auto;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(0, 14, 44, 1) 0%, rgba(0, 0, 0, 1) 89%);
}

.popup-wrapper.wallet .contents button.down-wemix:hover {
  filter: brightness(2);
}

.popup-wrapper.wallet .contents .down-wemix .text-wrapper-2 {
  width: fit-content;
  margin-top: -1px;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
  position: relative;
  color: var(--font-default);
  letter-spacing: -0.3px;
  line-height: 24px;
}

.popup-wrapper.wallet .contents .down-wemix .img {
  position: relative;
  width: 16px;
  height: 16px;
  aspect-ratio: 1;
}

.popup-wrapper.wallet .contents .qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 10px;
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 20px 10px;
  background-color: #0000001a;
  border-radius: 15px;
}
@media (max-width: 768.98px) {
  .popup-wrapper.wallet .contents .qr-box {
    max-width: none;
  }
}

.popup-wrapper.wallet .contents .qr-box .frame {
  display: flex;
  flex-direction: column;
  width: 282px;
  align-items: center;
  gap: 8px;
  position: relative;
  flex: 0 0 auto;
}

.popup-wrapper.wallet .qr-box .qrcode-wrapper {
  display: flex;
  width: 212px;
  height: 212px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 3px 9px;
  position: relative;
  background-color: #ffffff;
  border-radius: 10px;
  border: 1px solid;
  border-color: #0000001a;
}
@media (max-width: 768.98px) {
  .popup-wrapper.wallet .qr-box .qrcode-wrapper {
    width: 200px;
    height: 200px;
  }
}

.popup-wrapper.wallet .qr-box img.qrcode {
  position: relative;
  flex: 1;
  align-self: stretch;
  flex-grow: 1;
  object-fit: contain;
}

.popup-wrapper.wallet .qr-box .time {
  position: relative;
  align-self: stretch;
  font-weight: 700;
  color: #ff2a74;
  font-size: 16px;
  text-align: center;
  letter-spacing: -0.3px;
  line-height: 24px;
}

.popup-wrapper.wallet .qr-box .p {
  position: relative;
  align-self: stretch;
  font-weight: 500;
  color: #000;
  font-size: .875rem;
  text-align: center;
  letter-spacing: 0;
  line-height: 1rem;
}

.popup-wrapper.wallet .contents .list {
  display: inline-flex;
  align-items: center;
  position: relative;
  flex: 0 0 auto;
}

.popup-wrapper.wallet .contents .list .image {
  position: relative;
  width: 7.14px;
  height: 57.44px;
  margin-left: -0.5px;
}

.popup-wrapper.wallet .contents .list .frame-2 {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  margin-left: -5px;
  position: relative;
  flex: 0 0 auto;
}

.popup-wrapper.wallet .contents .list .text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  position: relative;
  flex: 0 0 auto;
  border-radius: 10px;
  overflow: hidden;
}

.popup-wrapper.wallet .contents .list .dot-outline {
  position: relative;
  width: 21px;
  height: 21px;
  aspect-ratio: 1;
}

.popup-wrapper.wallet .contents .list .text-wrapper-4 {
  position: relative;
  width: fit-content;
  font-weight: 500;
  font-size: 14px;
  text-align: center;
  letter-spacing: -0.3px;
  line-height: 12px;
  white-space: nowrap;
}

/* 성공 팝업(small) */
.popup-wrapper.small {
  top: 0;
}

.popup-wrapper.small .popup {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  position: relative;
  width: 100%;
  min-width: 403px;
  height: 265px;
  padding: 3px 16px 16px;
  border-radius: 30px;
  background-color: var(--font-default);
}
@media (max-width: 430.98px) {
  .popup-wrapper.small .view,
  .popup-wrapper.small .popup {
    min-width: auto;
  }
}

.popup-wrapper.small .popup-h1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  border-bottom: 1px solid rgba(0, 0, 0, 0.10);
}

.popup-wrapper.small h1.text-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  top: 0;
  width: 100%;
  height: 60px;
  position: static;
}

.popup-wrapper.small button.bt-close {
  left: auto;
  top: 11px;
  right: 13px;
  width: 44px;
  height: 44px;
  background: url(../img/popup/bt-close-normal.png) no-repeat;
  background-size: contain;
}

.popup-wrapper.small button.bt-close:hover,
.popup-wrapper.small button.bt-close:active {
  background: url(../img/popup/bt-close-normal-reversal.png) no-repeat;
  background-size: contain;
}

.popup-wrapper.small button.bt-close img {
  width: 44px;
  height: 44px;
  object-fit: cover;
}

.popup-wrapper.small .ctt {
  font-size: 20px;
  font-weight: 400;
  line-height: 24px;
  padding: 26px 34px;
  box-sizing: border-box;
  word-break: keep-all;   /* 줄바꿈 좀 자연스럽게 */
}

.popup-wrapper.small button.bt-long {
  position: static;
  display: inline-flex;
  height: 60px;
  width: 100%;
  cursor: pointer;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  border-radius: 20px;
  background: linear-gradient(3deg, #FF904A 2.65%, #FF7118 97.35%);
  color: var(--font-default);
  font-size: 22px;
  font-weight: 800;
  text-transform: uppercase;
}

.popup-wrapper.small button.bt-long:hover,
.popup-wrapper.small button.bt-long:active {
  background: linear-gradient(3deg, #FF7118 97.35%, #FF904A 2.65%);
}

/* uid 입력 팝업 */
.popup-wrapper.uid .bt-close {
  left: 543px;
}
@media (max-width: 768.98px) {
  .popup-wrapper.uid .bt-close {
    left: auto;
  }
}

.popup-wrapper.uid .popup {
  width: 614px;
  height: 364px;
  border-radius: 30px;
  background-color: var(--font-default);
}
@media (max-width: 768.98px) {
  .popup-wrapper.uid .popup {
    width: 100%;
    height: 300px;
  }
}

.popup-wrapper.uid .popup img.rectangle {
  width: 634px;
  height: 381px;
  /* opacity: 0.6; */
  object-fit: cover;
}

.popup-wrapper.uid .input-all-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 11px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -30%);
  width: 100%;
  height: auto;
}
@media (max-width: 768.98px) {
  .popup-wrapper.uid .input-all-wrap {
    transform: translate(-50%, -20%);
  }
}

.popup-wrapper.uid .input-wrap {
  display: flex;
  width: 100%;
  max-width: 500px;
  height: 60px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin: 0 auto;
  background-color: #00000060;
  border-radius: 20px;
}
@media (max-width: 768.98px) {
  .popup-wrapper.uid .input-wrap {
    width: 90%;
    max-width: none;
  }
}

.popup-wrapper.uid .input-wrap input[type="text"].input-uid {
  position: relative;
  width: 100%;
  height: 40px;
  font-weight: 500;
  color: #ffffff;
  font-size: 24px;
  text-align: center;
  letter-spacing: -0.30px;
  line-height: 40px;
  white-space: nowrap;
  border: 0;
  background-color: transparent;
}

.popup-wrapper.uid .input-wrap input[type="text"]::placeholder {
  color: var(--font-default);
  font-size: 18px;
  font-weight: 400;
}

.popup-wrapper.uid .input-wrap input[type="text"]:focus {
  outline: none;
  border-radius: 10px;
  box-shadow: 0 0 7px 2px rgba(0, 0, 0, 0.3);
}

.popup-wrapper.uid button.bt-long {
  position: static;
  width: 500px;
}
@media (max-width: 768.98px) {
  .popup-wrapper.uid button.bt-long {
    width: 90%;
  }
}

.popup-wrapper.uid .bt-long .bg-style .radiusLine {
  border-radius: 20px;
}

.popup-wrapper.uid button.bt-long .bg-style {
  border-radius: 20px;
}

