/* auth-modal2.css – responsive drawer/card, single visible close button */

#authModal2Overlay {
  background: transparent;
  backdrop-filter: none;
  z-index: 50;
}

#authModal2 {
  background: transparent;
  z-index: 50;
}

/* Improve spacing for all text inside the modal */
#authModal2 * {
  letter-spacing: 0.3px;
  word-spacing: 0.5px;
}

/* Mobile drawer */
#authModal2Drawer {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.8);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 70vh;
  overflow-y: auto;
  border-radius: 1.5rem 1.5rem 0 0;
  
  /* Stretched to the bottom edge to remove the black margin in PWA */
  bottom: 0 !important;
  margin-bottom: 0 !important;
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom)) !important;
}

/* PC card */
#authModal2Card {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 2rem;
}

/* Inputs shared */
#authModal2Drawer input,
#authModal2Card input {
  background: #1f2937;
  border-color: #4b5563;
  color: #f3f4f6;
  transition: all 0.3s ease;
  letter-spacing: 0.2px;
}

#authModal2Drawer input:focus,
#authModal2Card input:focus {
  border-color: #F57C00;
  box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.3);
  outline: none;
}

#authModal2Drawer input::placeholder,
#authModal2Card input::placeholder {
  color: #9ca3af;
  letter-spacing: 0.2px;
}

#authModal2Drawer button,
#authModal2Card button {
  transition: all 0.2s ease;
}

#authModal2Drawer button:active,
#authModal2Card button:active {
  transform: scale(0.95);
}

#authModal2Drawer .bg-\[#F57C00\],
#authModal2Card .bg-\[#F57C00\] {
  background-color: #F57C00;
}

#authModal2Drawer .bg-\[#F57C00\]:hover,
#authModal2Card .bg-\[#F57C00\]:hover {
  background-color: #E65100;
}

#authModal2Drawer .text-\[#F57C00\],
#authModal2Card .text-\[#F57C00\] {
  color: #F57C00;
}

#authModal2Drawer .text-\[#FFB74D\],
#authModal2Card .text-\[#FFB74D\] {
  color: #FFB74D;
}

/* Step transitions inside both containers */
#auth2Step0Drawer, #auth2Step1Drawer, #auth2Step2Drawer, #auth2Step3Drawer,
#auth2Step1Card, #auth2Step2Card, #auth2Step3Card {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#auth2Step0Drawer.hidden, #auth2Step1Drawer.hidden, #auth2Step2Drawer.hidden, #auth2Step3Drawer.hidden,
#auth2Step1Card.hidden, #auth2Step2Card.hidden, #auth2Step3Card.hidden {
  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;
  position: absolute;
  width: calc(100% - 3rem);
  left: 1.5rem;
}

#auth2Step0Drawer:not(.hidden), #auth2Step1Drawer:not(.hidden), #auth2Step2Drawer:not(.hidden), #auth2Step3Drawer:not(.hidden),
#auth2Step1Card:not(.hidden), #auth2Step2Card:not(.hidden), #auth2Step3Card:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
}

/* Background heading */
#auth2BackgroundText {
  transition: opacity 0.6s ease, transform 0.6s ease;
}

#auth2BackgroundText h1 {
  text-shadow: 0 0 40px rgba(0,0,0,0.8);
  animation: titlePulse 3s ease-in-out infinite;
  letter-spacing: 1px;
}

#auth2BackgroundText p {
  text-shadow: 0 0 20px rgba(0,0,0,0.6);
  letter-spacing: 0.5px;
}

@keyframes titlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.animation-delay-200 {
  animation-delay: 0.2s;
}

/* Welcome overlay layers */
#auth2WelcomeOverlay {
  z-index: 60;
  transition: opacity 0.7s ease;
}

#auth2WelcomeContent {
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

#auth2WelcomeContent h2 {
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: welcomePulse 2s ease-in-out infinite;
}

@keyframes welcomePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Single global close button */
#closeAuthModal2 {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  border-radius: 9999px;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  line-height: 1;
  color: #fff;
  transition: all 0.2s ease;
  z-index: 30;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#closeAuthModal2:hover {
  background: transparent;
  border-color: transparent;
  transform: scale(1.1);
}

@media (min-width: 640px) {
  #closeAuthModal2 {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 3rem;
  }
}

/* Responsive transitions layouts toggling */
@media (min-width: 1024px) {
  #authModal2Drawer {
    display: none !important;
  }
  #authModal2Card {
    display: block !important;
  }
}

@media (max-width: 1023px) {
  #authModal2Card {
    display: none !important;
  }
  #authModal2Drawer {
    display: block !important;
  }
}

/* Scrollbar for drawer component */
#authModal2Drawer::-webkit-scrollbar {
  width: 4px;
}
#authModal2Drawer::-webkit-scrollbar-track {
  background: transparent;
}
#authModal2Drawer::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

#authModal2Drawer label,
#authModal2Card label {
  margin-bottom: 0.25rem;
  display: inline-block;
}

#authModal2Drawer .space-y-3 > * + *,
#authModal2Card .space-y-3 > * + *,
#auth2Step0Drawer > * + * {
  margin-top: 0.75rem;
}

#authModal2Drawer .text-xs,
#authModal2Card .text-xs {
  letter-spacing: 0.2px;
}

#authModal2Drawer .text-center .text-xs,
#authModal2Card .text-center .text-xs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}