/* --- OTP Page Specific Styles - English (LTR) --- */
.otp-group-wrapper {
  display: flex;
  flex-direction: column;
  /* ✅ CHANGED: Align items to the start (Left) */
  align-items: flex-start;
  width: fit-content;
  margin: 35px auto 10px auto;
  
  /* ✅ CHANGED: Ensure LTR direction */
  direction: ltr;
  text-align: left;
  
  position: relative;
}

.enter-code-label {
  font-family: "Rubik", sans-serif;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-secondary, #555);
  margin-bottom: 10px;
  
  /* ✅ CHANGED: Left padding/alignment */
  padding-left: 2px;
  padding-right: 0;
  text-align: left;
}

.otp-field-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  direction: ltr; /* Numbers are always LTR */
}

/* --- WRAPPER DESIGN --- */
.input-wrapper {
  position: relative;
  width: 50px;
  height: 60px;
  border-radius: 12px;
  background: #f8f9fa;
  border: 2px solid transparent;
  transition: border-color 0.2s ease;
  overflow: hidden;
}

/* Soft Wave Animation (When empty) */
@keyframes softWave {
  0% { background-color: #f8f9fa; }
  50% { background-color: #eaeff5; }
  100% { background-color: #f8f9fa; }
}

.input-wrapper:not(.filled) {
  animation: softWave 2.5s infinite ease-in-out;
}

/* Sequential Animation Delays */
.input-wrapper:nth-child(1) { animation-delay: 0s; }
.input-wrapper:nth-child(2) { animation-delay: 0.2s; }
.input-wrapper:nth-child(3) { animation-delay: 0.4s; }
.input-wrapper:nth-child(4) { animation-delay: 0.6s; }
.input-wrapper:nth-child(5) { animation-delay: 0.8s; }
.input-wrapper:nth-child(6) { animation-delay: 1s; }

/* Focused State */
.input-wrapper.focused {
  border-color: var(--primary, #ee9f0d);
  background: #fff;
}

/* Filled State */
.input-wrapper.filled {
  animation: none;
  background: #f8f9fa;
}

/* --- THE REAL INPUT (Invisible) --- */
.otp-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 10;
  cursor: pointer;
  color: transparent;
  caret-color: transparent;
  direction: ltr;
}

.otp-input:focus {
  outline: none;
}

/* --- THE ANIMATED NUMBER DISPLAY --- */
.otp-display {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Rubik", sans-serif;
  font-size: 24px;
  font-weight: 500;
  color: #14243b;
  pointer-events: none;
  z-index: 5;
  transform: translateY(100%);
  opacity: 0;
  direction: ltr;
}

/* --- SUPER FAST ANIMATIONS --- */
@keyframes slideUp {
  0% { transform: translateY(40px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes slideDown {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(40px); opacity: 0; }
}

.otp-display.animate-in {
  animation: slideUp 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.otp-display.animate-out {
  animation: slideDown 0.1s ease-in forwards;
}

/* --- NEW PREMIUM COMPACT PASTE BUTTON STYLES --- */
.paste-btn-container {
  width: 100%;
  display: flex;
  /* ✅ CHANGED: Align to start (Left) for English flow */
  justify-content: flex-start;
  margin-top: 12px;
  height: 32px;
  transition: all 0.4s ease;
  direction: ltr;
}

.premium-paste-btn {
  background: #fff;
  border: 1px solid rgba(238, 159, 13, 0.3);
  /* ✅ CHANGED: Padding adjusted for LTR (Text right, Icon left) */
  padding: 3px 12px 3px 3px; 
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 3px 10px rgba(238, 159, 13, 0.05);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  position: relative;
  flex-direction: row; /* Ensure icon is left, text is right */
}

.premium-paste-btn .icon-box {
  background: rgba(238, 159, 13, 0.1);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ee9f0d;
  font-size: 10px;
  transition: all 0.3s ease;
}

.premium-paste-btn .btn-text {
  font-family: "Rubik", sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: #14243b;
  letter-spacing: 0.2px;
  padding-top: 1px;
}

/* Hover Effect */
.premium-paste-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(238, 159, 13, 0.12);
  border-color: #ee9f0d;
}

.premium-paste-btn:hover .icon-box {
  background: #ee9f0d;
  color: #fff;
  /* Rotate slightly for effect */
  transform: rotate(-10deg);
}

.premium-paste-btn:active {
  transform: scale(0.96);
}

/* --- VANISH ANIMATION --- */
.premium-paste-btn.vanish {
  opacity: 0;
  transform: scale(0.7) translateY(5px);
  pointer-events: none;
}

.paste-btn-container.hidden {
  height: 0;
  margin-top: 0;
  opacity: 0;
  pointer-events: none;
}

/* --- RESEND & UI --- */
.resend-container {
  margin-top: 40px;
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.btn-timer-group {
  display: flex;
  align-items: center;
  /* ✅ CHANGED: Justify End keeps Resend button on the right (Standard LTR) */
  justify-content: flex-end; 
  gap: 15px;
  width: 100%;
  direction: ltr;
}

.resend-btn {
  background: rgba(238, 159, 13, 0.1);
  border: none;
  padding: 8px 18px;
  border-radius: 50px;
  color: #d48c0c;
  font-family: 'Rubik', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  height: 38px;
  direction: ltr;
}

.resend-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  /* Animation starting position */
  transform: translateX(100%); 
  transition: 0.5s;
}

.resend-btn:hover:not(:disabled) {
  background: #ee9f0d;
  color: #fff;
  /* ✅ CHANGED: Expand to the right to show icon */
  padding-right: 22px; 
  padding-left: 18px;
  box-shadow: 0 4px 12px rgba(238, 159, 13, 0.3);
}

.resend-btn:hover::before {
  transform: translateX(-100%); /* Slide to left */
}

.resend-btn .btn-icon {
  font-size: 12px;
  transition: transform 0.4s ease;
}

.resend-btn:hover .btn-icon {
  transform: rotate(-180deg);
}

.resend-btn:disabled {
  background: #f5f5f5;
  color: #999;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.7;
  pointer-events: auto;
}

.timer-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff4e0;
  padding: 6px 12px;
  border-radius: 8px;
  color: #d48c0c;
  font-size: 12px;
  font-weight: 500;
  border: 1px dashed #ee9f0d;
  height: 38px;
  direction: ltr;
}

.info-section {
  margin-top: 25px;
  padding: 15px;
  background: rgba(238, 159, 13, 0.08);
  border: 1px solid rgba(238, 159, 13, 0.2);
  border-radius: 12px;
  text-align: center;
}

.info-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  font-family: "Rubik", sans-serif;
  margin: 0;
}

.info-text strong {
  color: var(--primary-dark);
  font-weight: 600;
  display: block;
  margin-bottom: 5px;
}

/* --- RESPONSIVE FIX --- */
@media (max-width: 480px) {
  .input-wrapper {
    width: 42px;
    height: 52px;
  }
  .otp-display {
    font-size: 20px;
  }
  .btn-timer-group {
    /* Stack elements properly on mobile */
    flex-direction: column-reverse; 
    gap: 10px;
    align-items: center; /* Center align on mobile for better look */
  }
}