/**
 * Contact Form 7 Styles for Brainforest Theme
 * Clean, modern styling with yellow button
 */

/* Form Container */
.wpcf7-form {
  max-width: 800px;
  margin: 0 auto;
}

/* Form Fields */
.wpcf7-form p {
  margin-bottom: 1.5rem;
}

.wpcf7-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #333;
  font-size: 0.95rem;
}

.wpcf7-form .wpcf7-form-control-wrap {
  display: block;
  margin-top: 0.5rem;
}

/* Text Inputs */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="date"],
.wpcf7-form textarea,
.wpcf7-form select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e5e5;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background-color: #fff;
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form input[type="date"]:focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus {
  outline: none;
  border-color: var(--wp--preset--color--orange-300);
  box-shadow: 0 0 0 3px rgba(255, 169, 10, 0.1);
}

.wpcf7-form textarea {
  min-height: 120px;
  resize: vertical;
}

/* Select Dropdown */
.wpcf7-form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
  padding-right: 2.5rem;
}

/* File Upload */
.wpcf7-form input[type="file"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px dashed #e5e5e5;
  border-radius: 4px;
  background-color: #f9f9f9;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.wpcf7-form input[type="file"]:hover {
  border-color: var(--wp--preset--color--orange-300);
  background-color: #fffbf0;
}

.wpcf7-form input[type="file"]:focus {
  outline: none;
  border-color: var(--wp--preset--color--orange-300);
  box-shadow: 0 0 0 3px rgba(255, 169, 10, 0.1);
}

/* Checkbox */
.wpcf7-form input[type="checkbox"] {
  width: auto;
  margin-right: 0.5rem;
  cursor: pointer;
  accent-color: var(--wp--preset--color--orange-300);
}

.wpcf7-form .wpcf7-checkbox label,
.wpcf7-form .wpcf7-acceptance label {
  font-weight: 400;
  display: flex;
  align-items: flex-start;
  cursor: pointer;
}

.wpcf7-form .wpcf7-checkbox input[type="checkbox"],
.wpcf7-form .wpcf7-acceptance input[type="checkbox"] {
  margin-top: 0.25rem;
  flex-shrink: 0;
}

/* Submit Button - Orange 300 background, Orange 950 text */
.wpcf7-form input[type="submit"],
.wpcf7-form .wpcf7-submit,
.wpcf7-form .wp-block-button__link.has-orange-300-background-color,
.wpcf7-form .wp-block-button__link.has-orange-950-color.has-orange-300-background-color {
  background-color: var(--wp--preset--color--orange-300) !important;
  color: var(--wp--preset--color--orange-950) !important;
  border: none;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wpcf7-form input[type="submit"]:hover,
.wpcf7-form .wpcf7-submit:hover,
.wpcf7-form .wp-block-button__link.has-orange-300-background-color:hover,
.wpcf7-form .wp-block-button__link.has-orange-950-color.has-orange-300-background-color:hover {
  background-color: var(--wp--preset--color--orange-200) !important; /* Lighter orange on hover */
  color: var(--wp--preset--color--orange-950) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.wpcf7-form input[type="submit"]:active,
.wpcf7-form .wpcf7-submit:active,
.wpcf7-form .wp-block-button__link.has-orange-300-background-color:active,
.wpcf7-form .wp-block-button__link.has-orange-950-color.has-orange-300-background-color:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Validation Messages */
.wpcf7-form .wpcf7-not-valid-tip {
  color: #d32f2f;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: block;
}

.wpcf7-form .wpcf7-not-valid {
  border-color: #d32f2f !important;
}

.wpcf7-form .wpcf7-validation-errors,
.wpcf7-form .wpcf7-mail-sent-ng,
.wpcf7-form .wpcf7-mail-sent-ok {
  padding: 1.25rem 1.5rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  display: block;
  border-width: 2px;
  border-style: solid;
}

.wpcf7-form .wpcf7-validation-errors,
.wpcf7-form .wpcf7-mail-sent-ng {
  background-color: #ffebee;
  color: #c62828;
  border-color: #ef5350;
  box-shadow: 0 2px 4px rgba(211, 47, 47, 0.1);
}

.wpcf7-form .wpcf7-mail-sent-ok {
  background-color: #e8f5e9;
  color: #1b5e20;
  border-color: #66bb6a;
  box-shadow: 0 2px 4px rgba(46, 125, 50, 0.1);
  position: relative;
  padding-left: 3rem;
}

.wpcf7-form .wpcf7-mail-sent-ok::before {
  content: "✓";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: bold;
  color: #2e7d32;
  line-height: 1;
}

/* Spinner */
.wpcf7-form .ajax-loader {
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* Responsive */
@media (max-width: 768px) {
  .wpcf7-form input[type="submit"],
  .wpcf7-form .wpcf7-submit {
    width: 100%;
    padding: 1rem;
  }
}

/* Field Groups */
.wpcf7-form .wpcf7-form-control-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 768px) {
  .wpcf7-form .wpcf7-form-control-group {
    grid-template-columns: 1fr;
  }
}
