/* contact.css - Contact form styles */

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes float-delayed {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
}

@keyframes float-slow {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out;
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-left {
  animation: slideInLeft 0.6s ease-out;
}

.animate-fade-in-right {
  animation: slideInRight 0.6s ease-out;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float-delayed 4s ease-in-out infinite;
  animation-delay: 1s;
}

.animate-float-slow {
  animation: float-slow 5s ease-in-out infinite;
  animation-delay: 2s;
}

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

/* Floating Labels */
.floating-label-group {
  position: relative;
}

.floating-label-group label {
  position: absolute;
  left: 16px;
  top: 16px;
  transition: all 0.2s ease;
  pointer-events: none;
  background: transparent;
}

.floating-label-group input:focus + label,
.floating-label-group input:not(:placeholder-shown) + label,
.floating-label-group select:focus + label,
.floating-label-group select:not([value=""]) + label,
.floating-label-group textarea:focus + label,
.floating-label-group textarea:not(:placeholder-shown) + label {
  top: 8px;
  font-size: 0.75rem;
  color: #3b82f6;
}

/* Custom scrollbar for textarea */
textarea::-webkit-scrollbar {
  width: 6px;
}

textarea::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

textarea::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

textarea::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Focus visible for better accessibility */
.focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Smooth transitions for form elements */
input,
select,
textarea {
  transition: all 0.2s ease-in-out;
}

/* Custom select arrow positioning */
select {
  background-position: right 1rem center;
  background-repeat: no-repeat;
  background-size: 1rem;
}

/* Enhanced button hover effects */
#submitBtn {
  position: relative;
  overflow: hidden;
}

#submitBtn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

#submitBtn:hover::before {
  left: 100%;
}

/* Mobile optimizations */
@media (max-width: 640px) {
  .animate-fade-in-up {
    animation-duration: 0.4s;
  }

  .floating-label-group input,
  .floating-label-group select,
  .floating-label-group textarea {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* Select options styling */
select option {
  background: white !important;
  color: #374151 !important; /* gray-700 */
}

@media (prefers-color-scheme: dark) {
  select option {
    background: #1f2937 !important; /* gray-800 */
    color: #e5e7eb !important; /* gray-200 */
  }
}

.animate-slide-in-left {
  animation: slideInLeftContact 0.7s ease-out 0.3s forwards;
  opacity: 0;
  transform: translateX(-20px);
}

.animate-slide-in-right {
  animation: slideInRightContact 0.7s ease-out 0.3s forwards;
  opacity: 0;
  transform: translateX(20px);
}

.animate-slide-in-right-delay {
  animation: slideInRightContact 0.7s ease-out 0.5s forwards;
  opacity: 0;
  transform: translateX(20px);
}

.focus\:animate-pulse-button:focus {
  animation: pulseButton 0.3s ease-in-out;
}

@keyframes slideInLeftContact {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRightContact {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.animate-field-reveal {
  animation: fieldReveal 0.5s ease-out forwards;
  opacity: 0;
  transform: translateY(10px);
}

@keyframes fieldReveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}