/* ========================================================
   9. GIFT BOX & MODAL — BLUE WATERCOLOR THEME
   ======================================================== */
.gift-section {
  position: relative;
  padding: 14px 14px 16px;
  text-align: center;
  overflow: hidden;
  margin-bottom: 10px !important;
  /* Gradient mượt nhẹ nhàng không che background watercolor */
  background: linear-gradient(to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.15) 30%,
    rgba(255, 255, 255, 0.25) 60%,
    rgba(255, 255, 255, 0.3) 100%
  );
}





.gift-inner-wrap {
  position: relative;
  z-index: 2;
  max-width: 540px;
  margin: 0 auto;
  text-align: center;
}

.gift-heading-main {
  font-family: var(--font-title);
  font-size: clamp(1.15rem, 3.2vw, 1.55rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--primary-navy);
  text-transform: uppercase;
  margin: 4px 0 6px;
  line-height: 1.2;
}

/* Delicate Gold Outline Heart Divider */
.gift-heart-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 6px auto;
  max-width: 220px;
}

.gift-heart-divider .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(185, 148, 105, 0.65), transparent);
}

.gift-heart-divider .heart-symbol {
  font-size: 1.05rem;
  color: #a8845c;
  line-height: 1;
  transform: scale(1.15);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.gift-heart-divider-top {
  margin-bottom: 4px;
  display: none; /* Ẩn divider phía trên */
}

.gift-heart-divider-bottom {
  margin-top: 14px;
  margin-bottom: 14px;
}

.gift-box-trigger {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 10px 14px;
  margin: 6px auto 0;
  width: 100%;
  max-width: 280px;
  background: none;
  border: none;
  outline: none;
  overflow: visible;
}

/* Artistic calligraphy script text */
.gift-deco-script {
  position: absolute;
  font-family: var(--font-script);
  color: #487299;
  line-height: 1.25;
  opacity: 0.85;
  pointer-events: none;
  z-index: 2;
  transition: transform 0.3s ease;
  user-select: none;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.95);
}

.gift-script-left-top {
  font-size: 0.95rem;
  top: 18%;
  left: 10px;
  transform: rotate(-8deg);
  text-align: left;
}

.gift-script-left-bot {
  font-size: 0.92rem;
  bottom: 22%;
  left: 12px;
  transform: rotate(-6deg);
  text-align: left;
}

.gift-script-right-top {
  font-size: 0.95rem;
  top: 18%;
  right: 10px;
  transform: rotate(7deg);
  text-align: right;
}

/* Small cute icons */
.gift-deco-sparkle {
  position: absolute;
  color: #caa04c;
  font-size: 0.85rem;
  pointer-events: none;
  z-index: 3;
  text-shadow: 0 0 6px rgba(230, 185, 95, 0.6);
}

.sparkle-left-top {
  top: 26%;
  left: 42px;
  animation: twinkleSparkle 2.8s ease-in-out infinite;
}

.sparkle-right-mid {
  top: 45%;
  right: 38px;
  animation: twinkleSparkle 3.0s ease-in-out infinite 1.2s;
}

.gift-deco-petal {
  position: absolute;
  pointer-events: none;
  z-index: 3;
  opacity: 0.8;
  filter: drop-shadow(0 2px 4px rgba(45, 80, 115, 0.15));
}

.petal-left-mid {
  top: 48%;
  left: 36px;
  animation: petalSway 4.2s ease-in-out infinite;
}

.petal-right-bot {
  bottom: 22%;
  right: 36px;
  animation: petalSway 4.8s ease-in-out infinite 0.8s;
}

@keyframes twinkleSparkle {
  0%, 100% {
    opacity: 0.35;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.25) rotate(15deg);
  }
}

@keyframes petalSway {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(4px, -6px) rotate(8deg);
  }
}

/* Main Box Visual & Movement */
.gift-box-visual {
  position: relative;
  width: min(180px, 48vw);
  max-width: 195px;
  margin: 0 auto;
  animation: giftFloat 4.2s ease-in-out infinite, giftGlow 3.5s ease-in-out infinite alternate;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
}

.gift-box-img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.35s ease;
}

.gift-box-trigger:hover .gift-box-visual {
  transform: scale(1.06) translateY(-8px);
  animation-play-state: paused;
}

.gift-open-prompt {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: #2b5177;
  margin-top: 14px;
  letter-spacing: 0.06em;
  animation: promptPulse 2.4s ease-in-out infinite;
  transition: color 0.2s ease, transform 0.2s ease;
}

.gift-box-trigger:hover .gift-open-prompt {
  color: #123153;
  transform: scale(1.08);
}

.gift-thankyou-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(0.95rem, 2.8vw, 1.08rem);
  color: #3b5f82;
  margin: 0 auto 4px;
  line-height: 1.6;
  max-width: 480px;
  text-align: center;
  padding: 0 16px;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* Keyframe Animations */
@keyframes giftFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-8px) rotate(-1.2deg);
  }
  50% {
    transform: translateY(-14px) rotate(0.6deg);
  }
  75% {
    transform: translateY(-6px) rotate(1.4deg);
  }
}

@keyframes giftGlow {
  0%, 100% {
    filter: drop-shadow(0 8px 24px rgba(45, 80, 115, 0.14));
  }
  50% {
    filter: drop-shadow(0 14px 34px rgba(65, 115, 175, 0.28));
  }
}

@keyframes promptPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.92;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
    color: #163a60;
  }
}



/* Modal Overlay & Box */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 38, 60, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.gift-modal-box {
  background: #ffffff;
  border-radius: 20px;
  width: min(540px, 94vw);
  max-height: calc(100dvh - 32px);
  margin: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(20, 45, 75, 0.28);
  border: 1px solid rgba(185, 210, 235, 0.8);
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-overlay.open .gift-modal-box {
  transform: scale(1);
}

.gift-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(185, 210, 235, 0.6);
  padding: 13px 20px;
  background: #f8fbff;
  flex-shrink: 0;
}

.gift-modal-title {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--primary-navy);
  text-transform: uppercase;
}

.gift-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f0f6fc;
  color: #4a7094;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: background 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.gift-modal-close:hover {
  background: var(--primary-navy);
  color: #ffffff;
}

.gift-modal-body {
  padding: 18px 20px 22px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.gift-cols-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.gift-person-card {
  background: #f6faff;
  border: 1px solid rgba(175, 205, 230, 0.8);
  border-radius: 14px;
  padding: 14px 10px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gift-person-title {
  display: none !important;
}

.gift-qr-card {
  width: 136px;
  height: 136px;
  margin: 0 auto 10px;
  background: #ffffff;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(185, 210, 235, 0.7);
  box-shadow: 0 4px 12px rgba(45, 80, 115, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gift-qr-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.gift-bank-info {
  margin-bottom: 9px;
}

.gift-bank-name {
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--primary-navy);
  margin-bottom: 2px;
}

.gift-bank-number {
  font-family: monospace;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--primary-blue);
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.gift-bank-owner {
  font-size: 0.74rem;
  color: #55799c;
  letter-spacing: 0.04em;
}

.gift-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 3px;
  width: 100%;
}

.btn-copy-acc,
.btn-save-qr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(45, 80, 115, 0.15);
}

.btn-copy-acc {
  background: #eaf1f8;
  border: 1px solid #c2d8eb;
  color: #2b557b;
}

.btn-save-qr {
  background: linear-gradient(135deg, #3d6890 0%, #264a6d 100%);
  border: 1px solid #264a6d;
  color: #ffffff;
}

.btn-copy-acc:hover {
  background: #2b557b;
  color: #ffffff;
  border-color: #2b557b;
  transform: translateY(-1px);
}

.btn-save-qr:hover {
  background: linear-gradient(135deg, #4f7ca8 0%, #305982 100%);
  transform: translateY(-1px);
}

.btn-copy-acc:active,
.btn-save-qr:active {
  transform: scale(0.96);
}

@media (max-width: 520px) {
  .gift-modal-box {
    width: 95%;
    max-height: calc(100dvh - 20px);
    border-radius: 14px;
  }

  .gift-modal-header {
    padding: 13px 18px;
  }

  .gift-modal-body {
    padding: 18px 16px 20px;
  }

  .gift-cols-container {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .gift-person-card {
    padding: 12px 10px 14px;
  }

  .gift-qr-card {
    width: 120px;
    height: 120px;
    padding: 7px;
    border-radius: 11px;
    margin-bottom: 7px;
  }

  .gift-bank-info {
    margin-bottom: 7px;
  }

  .gift-bank-name {
    font-size: 0.78rem;
    margin-bottom: 2px;
  }

  .gift-bank-number {
    font-size: 0.90rem;
    margin-bottom: 2px;
  }

  .gift-bank-owner {
    font-size: 0.74rem;
  }

  .gift-actions-row {
    gap: 7px;
  }

  .btn-copy-acc,
  .btn-save-qr {
    padding: 5px 13px;
    font-size: 0.73rem;
  }
}

@media (max-width: 360px) {
  .gift-qr-card {
    width: 108px;
    height: 108px;
    padding: 6px;
  }

  .gift-modal-body {
    padding: 14px 10px 16px;
  }

  .gift-cols-container {
    gap: 14px;
  }
}
