/* Contact Form Container */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Form Styling */
.contact-form .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Hide screen reader response */
.contact-form .screen-reader-response {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Form Paragraphs */
.contact-form p {
  margin: 0;
  width: 100%;
}

/* Input Fields and Textarea */
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: #333;
  background-color: #e1e4e8;
  border: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
  outline: none;
  background-color: #ffffff;
  border-color: #e1e4e8 !important;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.contact-form input[type="text"]::placeholder,
.contact-form input[type="email"]::placeholder,
.contact-form textarea::placeholder {
  color: #999;
}

/* Textarea Specific */
.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

/* Checkbox Consent */
.contact-form input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 0.5rem;
  cursor: pointer;
}

.contact-form p:has(input[type="checkbox"]) {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
}

.contact-form p:has(input[type="checkbox"]) .wpcf7-list-item {
  margin: 0 !important;
}

.contact-form p a {
  color: #b3b470;
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-form p a:hover {
  text-decoration: underline;
}

/* Submit Button */
.contact-form input[type="submit"] {
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  background: #5d5179;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(74, 144, 226, 0.2);
  position: relative;
}

.contact-form input[type="submit"]:hover:not(:disabled) {
  background: #818181;
  box-shadow: 0 6px 12px rgba(74, 144, 226, 0.3);
}

.contact-form input[type="submit"]:active:not(:disabled) {
  box-shadow: 0 2px 4px rgba(74, 144, 226, 0.2);
}

.contact-form input[type="submit"]:disabled {
  background: #5d5179;
  cursor: not-allowed;
  box-shadow: none;
}

/* Spinner */
.contact-form .wpcf7-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-left: 10px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

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

/* Response Output */
.contact-form .wpcf7-response-output {
  margin-top: 1rem;
  padding: 1rem;
  font-size: 0.9rem;
}

.contact-form .wpcf7-response-output.wpcf7-validation-errors {
  background-color: #fff3cd;
  border: 1px solid #ffc107;
  color: #856404;
}

.contact-form .wpcf7-response-output.wpcf7-mail-sent-ok {
  background-color: #d4edda;
  border: 1px solid #28a745;
  color: #155724;
}

/* Error States */
.contact-form .wpcf7-not-valid {
  border-color: #dc3545 !important;
}

.contact-form .wpcf7-not-valid-tip {
  color: #dc3545;
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: block;
}

/* Hidden Fields */
.contact-form .hidden-fields-container {
  display: none;
}

/* Responsive Design */
@media (max-width: 640px) {
  .contact-form {
    padding: 1.5rem;
  }

  .contact-form input[type="text"],
  .contact-form input[type="email"],
  .contact-form textarea {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}
