/* form.css - Enhanced Form Styling with Animations */

.form-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-xl);
  animation: fadeInDown 0.8s ease-out;
}

.logo-container1 {
  gap: var(--space-xl);
  display: flex;
  margin-bottom: var(--space-lg);
  animation: scaleIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-img1 {
  max-height: 80px;
}

.form-title {
  font-size: 2.2rem;
  margin-bottom: var(--space-xs);
  background: var(--primary-dark);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: textShine 3s ease-in-out infinite alternate;
}

.section-subtitle {
  color: var(--gray-600);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.form-container {
  background: var(--white);
  border-radius: var(--border-radius-xl);
  padding: var(--space-xl);
  border: 1px solid var(--border-light);
  position: relative;

  /* Multi-layered shadow */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.05),
    0 0 0 1px rgba(0, 0, 0, 0.02);

  /* Initial entrance animation */
  animation: fadeInUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.2s both,
    breathing 4s ease-in-out infinite;

  /* Smooth transitions */
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.5s ease, border-color 0.3s ease;
}

/* Enhanced hover effect */
.form-container:hover {
  transform: translateY(-7px) scale(1.02);
  box-shadow: 0 20px 25px -5px rgba(59, 130, 246, 0.25),
    0 10px 10px -5px rgba(59, 130, 246, 0.15),
    0 0 15px 2px rgba(104, 165, 255, 0.2);
  border-color: rgba(99, 179, 237, 0.4);
}

/* Interactive focus state */
.form-container:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 15px 20px -5px rgba(59, 130, 246, 0.3),
    0 0 12px 4px rgba(104, 165, 255, 0.25);
  border-color: rgba(99, 179, 237, 0.6);
}

.hidden-field {
    display: none;
}


/* Subtle breathing animation */
@keyframes breathing {
  0%,
  100% {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.05),
      0 0 0 1px rgba(0, 0, 0, 0.02);
  }

  50% {
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.05), 0 3px 6px rgba(0, 0, 0, 0.03),
      0 0 0 1px rgba(0, 0, 0, 0.03);
  }
}

/* Existing fadeInUp animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  perspective: 1200px;
}

/* Grid item animations */
.form-grid > * {
  --delay-factor: 0;
  position: relative;
  border-radius: var(--border-radius-md);
  background: var(--white);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  padding: var(--space-sm);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease, background 0.3s ease;

  /* Staggered animation */
  animation: fadeIn 0.6s ease-out calc(0.1s * var(--delay-factor)) both,
    float 6s ease-in-out infinite;
  animation-delay: calc(0.1s * var(--delay-factor)), 0s;
}

/* Individual item hover effects */
.form-grid > *:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.15),
    0 4px 8px rgba(59, 130, 246, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  background: rgba(249, 250, 251, 0.7);
  z-index: 2;
}

/* Sequential animation delays */
.form-grid > *:nth-child(1) {
  --delay-factor: 1;
}

.form-grid > *:nth-child(2) {
  --delay-factor: 2;
}

.form-grid > *:nth-child(3) {
  --delay-factor: 3;
}

.form-grid > *:nth-child(4) {
  --delay-factor: 4;
}

.form-grid > *:nth-child(5) {
  --delay-factor: 5;
}

.form-grid > *:nth-child(6) {
  --delay-factor: 6;
}

/* Keyframe animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) rotateX(15deg);
  }

  to {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.form-group {
  position: relative;
  margin-bottom: var(--space-md);
  animation: fadeIn 0.6s ease-out;
  animation-fill-mode: both;
}

@keyframes floatLabel {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--gray-700);
  transition: all 0.3s ease;
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background-color: var(--white);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.15);
  outline: none;
  transform: translateY(-2px);
}

.form-control::placeholder {
  color: var(--gray-400);
  transition: all 0.3s ease;
}

.form-control:focus::placeholder {
  opacity: 0.5;
  transform: translateX(5px);
}

.password-input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.password-toggle {
  position: absolute;
  right: 16px;
  cursor: pointer;
  color: var(--gray-500);
  transition: all 0.3s ease;
  z-index: 10;
}

.password-toggle:hover {
  color: var(--primary);
  transform: scale(1.1);
}

.reset-form-grid {
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.reset-password-container {
  max-width: 500px;
  width: 100%;
  margin: 20px auto;
  padding: 1.5rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 48px;
}

.form-actions {
  text-align: center;
  margin-top: var(--space-xl);
}

.btn-primary {
  padding: 14px 36px;
  font-size: 1.1rem;
  border-radius: 50px;
  box-shadow: var(--shadow-blue);
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 20px;
  height: 200%;
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(25deg);
  transition: all 0.6s;
}

.btn-primary:hover::after {
  left: 120%;
}

.alt-action {
  text-align: center;
  margin-top: var(--space-lg);
  color: var(--gray-600);
  font-size: 0.95rem;
}

.alt-action a {
  color: var(--primary);
  font-weight: 600;
  position: relative;
}

.alt-action a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.alt-action a:hover::after {
  width: 100%;
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes textShine {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 100% 50%;
  }
}

/* Form Group Animations */
.form-group:nth-child(1) {
  animation-delay: 0.1s;
}

.form-group:nth-child(2) {
  animation-delay: 0.2s;
}

.form-group:nth-child(3) {
  animation-delay: 0.3s;
}

.form-group:nth-child(4) {
  animation-delay: 0.4s;
}

.form-group:nth-child(5) {
  animation-delay: 0.5s;
}

.form-group:nth-child(6) {
  animation-delay: 0.6s;
}

.form-group:nth-child(7) {
  animation-delay: 0.7s;
}

.form-group:nth-child(8) {
  animation-delay: 0.8s;
}

.form-group:nth-child(9) {
  animation-delay: 0.9s;
}

.form-group:nth-child(10) {
  animation-delay: 1s;
}

.form-group:nth-child(11) {
  animation-delay: 1.1s;
}

.form-group:nth-child(12) {
  animation-delay: 1.2s;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .form-container {
    padding: var(--space-lg);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .logo-container1 {
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
  }

  .form-title {
    font-size: 1.8rem;
  }

  .reset-password-container {
    margin: 10px auto;
    padding: 1.5rem;
    position: static;
    top: auto;
    transform: none;
    width: 90%;
  }
}

@media (max-width: 480px) {
  .form-container {
    padding: var(--space-md);
  }

  .btn-primary {
    width: 100%;
  }

  .reset-password-container {
    margin: 0 auto;
    padding: 1.25rem;
    border-radius: 0;
    box-shadow: none;
    border: 1px solid var(--border-light);
    width: 95%;
    border-radius: 8px;
  }
}
