/* V119 — Gift Code modal on /#/main */

#co-gift-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.48rem;
  padding-bottom: calc(0.48rem + env(safe-area-inset-bottom, 0px));
  background: rgba(0, 0, 0, 0.42);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
}

#co-gift-modal.is-on {
  opacity: 1;
  pointer-events: auto;
}

.co-gift-modal__card {
  position: relative;
  width: 100%;
  max-width: 8.6rem;
  padding: 0.64rem 0.58rem 0.58rem;
  border-radius: 0.56rem;
  background: #2b2b2b;
  box-shadow: none;
  transform: scale(0.96);
  transition: transform 0.2s ease-out;
}

#co-gift-modal.is-on .co-gift-modal__card {
  transform: scale(1);
}

.co-gift-modal__head {
  position: relative;
  min-height: 0.72rem;
  margin-bottom: 0.48rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.co-gift-modal__title {
  margin: 0;
  color: #fff;
  font-size: 0.58667rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.co-gift-modal__x {
  position: absolute;
  top: 50%;
  right: -0.12rem;
  width: 1.06667rem;
  height: 1.06667rem;
  margin-top: -0.53333rem;
  border: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  font-size: 0.64rem;
  line-height: 1;
  cursor: pointer;
}

.co-gift-modal__input {
  display: block;
  width: 100%;
  height: 1.22667rem;
  padding: 0.32rem 0.4rem;
  border: 0.04rem solid #64d17d;
  border-radius: 0.32rem;
  background: #232323;
  color: #fff;
  font-size: 0.4rem;
  text-align: center;
  outline: none;
  box-sizing: border-box;
}

.co-gift-modal__input::placeholder {
  color: #8a8a8a;
}

.co-gift-modal__err {
  min-height: 0.4rem;
  margin: 0.16rem 0 0;
  color: #ef5350;
  font-size: 0.32rem;
  text-align: center;
  line-height: 1.3;
}

.co-gift-modal__go {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 1.38667rem;
  margin-top: 0.32rem;
  border: 0;
  border-radius: 0.34667rem;
  background: linear-gradient(180deg, #b8ffc4 0%, #7aee96 42%, #3fd66a 100%);
  color: #111;
  font-size: 0.45333rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0.16rem 0.56rem rgba(63, 214, 106, 0.45);
}

.co-gift-modal__go:disabled {
  opacity: 0.5;
  cursor: default;
  box-shadow: none;
}

.co-gift-modal__spin {
  width: 0.48rem;
  height: 0.48rem;
  border: 0.05333rem solid rgba(0, 0, 0, 0.2);
  border-top-color: #111;
  border-radius: 50%;
  animation: co-gift-spin 0.7s linear infinite;
}

@keyframes co-gift-spin {
  to { transform: rotate(360deg); }
}

.co-gift-modal__toast {
  position: absolute;
  left: 50%;
  bottom: 0.32rem;
  transform: translateX(-50%);
  padding: 0.16rem 0.4rem;
  border-radius: 0.8rem;
  background: rgba(36, 36, 36, 0.95);
  color: #6ee78a;
  font-size: 0.34667rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
}
