/* Contact Form Styles */
.form-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  font-family: "Arial", sans-serif;
  background: #f9f9f9;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.contact-form {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.contact-form h2 {
  text-align: center;
  color: #333;
  margin-bottom: 30px;
  font-size: 28px;
  font-weight: 600;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #555;
  font-size: 14px;
  text-align: left;
}

/* Name fields side by side */
.name-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 25px;
}

.name-fields .form-group {
  margin-bottom: 0;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e1e1e1;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
  background-color: #f5f5f5;
  color: #333;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #007cba;
  box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
  background-color: #ffffff;
}

.form-group input:invalid {
  border-color: #e74c3c;
}

/* Checkbox Styles */
.checkbox-label {
  font-weight: 600;
  color: #555;
  margin-bottom: 15px;
  display: block;
}

.checkbox-label::after {
  content: " (Optional)";
  font-weight: 400;
  color: #888;
  font-size: 12px;
}

.checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 12px;
  border: 2px solid #e1e1e1;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: normal;
  background-color: #f9f9f9;
  margin-bottom: 8px;
}

.checkbox-item:hover {
  background-color: #f0f8ff;
  border-color: #007cba;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.checkbox-item input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 24px;
  height: 24px;
  border: 3px solid #007cba;
  border-radius: 6px;
  margin-right: 12px;
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
  background-color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.checkbox-item:hover .checkmark {
  border-color: #005a8b;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.checkbox-item input[type="checkbox"]:checked + .checkmark {
  background-color: #007cba;
  border-color: #007cba;
  box-shadow: 0 2px 4px rgba(0, 124, 186, 0.3);
}

.checkbox-item input[type="checkbox"]:checked + .checkmark::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 16px;
}

.checkbox-item:active {
  transform: translateY(0);
}

/* Security Code Styles */
.security-code-container {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 10px;
}

.security-code-display {
  background: #ab6031;
  color: white;
  border-radius: 8px;
  padding: 15px 25px;
  font-family: "Courier New", monospace;
  font-size: 30px;
  font-weight: bold;
  letter-spacing: 4px;
  min-width: 140px;
  text-align: center;
  user-select: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.security-code-container input {
  flex: 1;
  max-width: 200px;
}

.refresh-btn {
  background: #233f55;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 12px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s ease;
}

.refresh-btn:hover {
  background: #005a8b;
}

/* Submit Button */
.submit-btn {
  width: 100%;
  background: #72a7da;
  color: white;
  border: none;
  padding: 15px;
  border-radius: 6px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
}

.submit-btn:hover:not(:disabled) {
  background: #005a8b;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.submit-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* reCAPTCHA Container */
#recaptcha-container {
  margin: 20px 0;
  text-align: center;
}

/* Message Container */
.message-container {
  margin-top: 20px;
  padding: 15px;
  border-radius: 6px;
  display: none;
}

.message-container.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.message-container.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
  .form-container {
    padding: 15px;
  }

  .contact-form {
    padding: 20px;
  }

  .name-fields {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .name-fields .form-group {
    margin-bottom: 25px;
  }

  .checkbox-group {
    grid-template-columns: 1fr;
  }

  .security-code-container {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .security-code-container input {
    max-width: none;
  }

  .security-code-display {
    font-size: 20px;
    padding: 12px 20px;
    min-width: auto;
  }
}

/* Error States */
.form-group.error input,
.form-group.error textarea {
  border-color: #e74c3c;
}

.form-group.error .error-message {
  color: #e74c3c;
  font-size: 12px;
  margin-top: 5px;
  display: block;
}

/* Loading State */
.submit-btn.loading {
  background: #6c757d;
  cursor: not-allowed;
}

.submit-btn.loading::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s ease-in-out infinite;
  margin-left: 10px;
}

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