.btn-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.submission-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.submission-message {
  background-color: white;
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 500px;
  text-align: center;
  animation: slideIn 0.3s ease-in-out;
}

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

.success-icon {
  width: 60px;
  height: 60px;
  background-color: #10b981;
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  margin: 0 auto 1rem;
  font-weight: bold;
}

.error-icon {
  width: 60px;
  height: 60px;
  background-color: #ef4444;
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  margin: 0 auto 1rem;
  font-weight: bold;
}

.submission-message h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.submission-message p {
  color: #6b7280;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.close-btn {
  background-color: #2563eb;
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 0.375rem;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.close-btn:hover {
  background-color: #1e3a8a;
}

.submission-overlay.error .close-btn {
  background-color: #ef4444;
}

.submission-overlay.error .close-btn:hover {
  background-color: #dc2626;
}

.field-error {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}

.error-field {
  border-color: #ef4444 !important;
  background-color: #fef2f2;
}

.error-field:focus {
  ring-color: #ef4444 !important;
  border-color: #ef4444 !important;
}

.char-counter {
  font-size: 0.875rem;
  color: #6b7280;
  text-align: right;
  margin-top: 0.25rem;
  transition: color 0.2s ease;
}

.char-counter.error {
  color: #ef4444;
  font-weight: 600;
}

.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.error-details {
  font-size: 0.875rem;
  color: #9ca3af;
  margin-top: 0.5rem;
  font-style: italic;
}

input.error-field,
textarea.error-field {
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

#contactForm input:focus,
#contactForm textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

#contactForm input.error-field:focus,
#contactForm textarea.error-field:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}
