/* ==========================================================================
   Giấy Dập Nổi - Nâu (giay-dap-noi-nau) Exact Theme Styles & Animations
   ========================================================================== */

:where([data-testid="giay-dap-noi-nau-template"]) {
  --hhc-card-frame: url(/images/themes/giay-dap-noi-nau/card-portrait.webp);
  --hhc-accent: #7a5235;
  --hhc-script: "Pinyon Script", "Great Vibes", cursive;
}

@keyframes hhc-spin-cd {
  0% { transform: rotate(0); }
  to { transform: rotate(360deg); }
}

@keyframes hhc-dance {
  0%, to { height: 20%; }
  50% { height: 100%; }
}

.hhc-music-spin { animation: hhc-spin-cd 3s linear infinite; }
.hhc-music-dance-1 { animation: hhc-dance 0.4s ease-in-out infinite; animation-delay: 0s; }
.hhc-music-dance-2 { animation: hhc-dance 0.4s ease-in-out infinite; animation-delay: 0.1s; }
.hhc-music-dance-3 { animation: hhc-dance 0.4s ease-in-out infinite; animation-delay: 0.2s; }
.hhc-music-dance-4 { animation: hhc-dance 0.4s ease-in-out infinite; animation-delay: 0.3s; }

@keyframes hhc-seal-pulse {
  0%, to {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 4px 20px var(--shadow-color);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.06);
    box-shadow: 0 6px 35px var(--shadow-color);
  }
}

@keyframes hhc-shine {
  0% { left: -100%; }
  50%, to { left: 100%; }
}

@keyframes hhc-seal-break {
  0% {
    transform: translate(-50%, -50%) scale(1) rotate(0);
    opacity: 1;
    filter: brightness(1);
  }
  30% {
    transform: translate(-50%, -50%) scale(1.15) rotate(5deg);
    opacity: 0.9;
    filter: brightness(1.3);
  }
  60% {
    transform: translate(-50%, -50%) scale(1.05) rotate(-3deg);
    opacity: 0.5;
    filter: brightness(1.5);
  }
  to {
    transform: translate(-50%, -50%) scale(0) rotate(15deg);
    opacity: 0;
    filter: brightness(2);
  }
}

@keyframes hhc-seal-ring {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.8;
  }
  to {
    transform: translate(-50%, -50%) scale(2.5);
    opacity: 0;
  }
}

@keyframes hhc-envelope-away {
  0% {
    transform: translateY(0) rotate(0);
    opacity: 1;
  }
  15% {
    transform: translateY(10px) rotate(0.5deg);
    opacity: 1;
  }
  to {
    transform: translateY(-120vh) rotate(-2deg);
    opacity: 0;
  }
}

.hhc-intro-opening { pointer-events: none; }

@keyframes hhc-bounce-gentle {
  0%, to { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes hhc-ping-slow {
  0% { transform: scale(1); opacity: 0.6; }
  75%, to { transform: scale(1.8); opacity: 0; }
}

.hhc-music-bounce { animation: hhc-bounce-gentle 2s ease-in-out infinite; }
.hhc-music-ping { animation: hhc-ping-slow 1.5s cubic-bezier(0, 0, 0.2, 1) infinite; }

.hhc-panel {
  border-style: solid;
  border-width: 34px;
  border-image-source: var(--hhc-card-frame);
  border-image-slice: 126 fill;
  border-image-width: 34px;
  border-image-repeat: stretch;
  border-image-outset: 0;
}

@media (min-width: 768px) {
  .hhc-panel {
    border-width: 46px;
    border-image-width: 46px;
  }
}

.hhc-panel-mat { position: relative; }

.hhc-section-title {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1.35;
}

.hhc-hero-name {
  -webkit-text-stroke: 0.9px currentColor;
  paint-order: stroke fill;
}

@media (min-width: 768px) {
  .hhc-hero-name {
    -webkit-text-stroke-width: 1.2px;
  }
}

/* ==========================================================================
   Image Gift Envelope (Hộp Quà Mừng) Animations
   ========================================================================== */

@keyframes ienv-float {
  0%, to { translate: 0 0; }
  50% { translate: 0 -7px; }
}

@keyframes ienv-float-main {
  0%, to { translate: -15% 0; }
  50% { translate: -15% -7px; }
}

@keyframes ienv-shadow-pulse {
  0%, to { transform: scaleX(1); opacity: 0.28; }
  50% { transform: scaleX(0.9); opacity: 0.16; }
}

@keyframes ienv-sparkle-anim {
  0%, to { opacity: 0; transform: scale(0.4); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes ienv-hint-pulse {
  0%, to { opacity: 0.45; }
  50% { opacity: 1; }
}

@keyframes ienv-grow {
  0% { transform: scale(1); }
  to { transform: scale(1.12); }
}

@keyframes ienv-wave {
  0% { transform: scale(1.12) rotate(0); }
  20% { transform: scale(1.12) rotate(-6deg); }
  40% { transform: scale(1.12) rotate(4.5deg); }
  60% { transform: scale(1.12) rotate(-3deg); }
  80% { transform: scale(1.12) rotate(1.5deg); }
  to { transform: scale(1.12) rotate(0); }
}

@keyframes ienv-back-wave {
  0%, to { rotate: 0deg; }
  20% { rotate: -1deg; }
  40% { rotate: 2deg; }
  60% { rotate: -2.5deg; }
  80% { rotate: 1.5deg; }
}

.ienv-shadow { animation: ienv-shadow-pulse 3s ease-in-out infinite; }

.ienv-card {
  transition: transform 0.35s ease;
  transform-origin: 50% 92%;
  animation: ienv-float-main 3s ease-in-out infinite;
}

.ienv-back {
  transition: rotate 0.3s ease;
  animation: ienv-float 5.2s ease-in-out 0.5s infinite;
}

.group:hover .ienv-card,
.group:focus-visible .ienv-card {
  animation: ienv-float-main 3s ease-in-out infinite, ienv-grow 0.35s ease forwards, ienv-wave 1.1s ease-in-out 0.35s infinite;
}

.group:hover .ienv-back,
.group:focus-visible .ienv-back {
  animation: ienv-float 5.2s ease-in-out 0.5s infinite, ienv-back-wave 2.2s ease-in-out infinite;
}

.ienv-hint { animation: ienv-hint-pulse 2s ease-in-out infinite; }
.ienv-sparkle { animation: ienv-sparkle-anim 2s ease-in-out infinite; }
.ienv-sparkle-2 { animation: ienv-sparkle-anim 2s ease-in-out 0.6s infinite; }
.ienv-sparkle-3 { animation: ienv-sparkle-anim 2s ease-in-out 1.2s infinite; }
.ienv-sparkle-4 { animation: ienv-sparkle-anim 2s ease-in-out 1.7s infinite; }

/* Scrollbar hiding for gallery thumbnails */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }

/* Smooth fade-in */
@keyframes fadeInModal {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.modal-animate { animation: fadeInModal 0.22s ease-out; }
