/* ===== Non-CF7 form overrides (search + comments) ===== */

/* Search field (404, widgets, header/search templates) */
:where(.content-area, .site-main, .error-404, .search-no-results)
  :where(form.search-form) label,
:where(.content-area, .site-main, .error-404, .search-no-results)
  :where(form.search-form) .search-field {
  color: #111;
}

:where(.content-area, .site-main, .error-404, .search-no-results)
  :where(form.search-form) .search-field {
  background: #fff;
  border: 1px solid rgba(0,0,0,.25);
  padding: .55rem .7rem;
  line-height: 1.2;
  border-radius: 4px;
}

:where(.content-area, .site-main, .error-404, .search-no-results)
  :where(form.search-form) .search-field::placeholder {
  color: #666;
  opacity: 1; /* Firefox */
}

:where(.content-area, .site-main, .error-404, .search-no-results)
  :where(form.search-form) .search-field:focus {
  outline: 2px solid #00ccff;
  outline-offset: 1px;
  border-color: #00ccff;
}

/* Submit buttons for search + comments */
:where(form.search-form) .search-submit,
:where(#commentform) #submit {
  color: #111;
  background: #f5f5f5;
  border: 1px solid rgba(0,0,0,.25);
  padding: .55rem .9rem;
  border-radius: 4px;
  cursor: pointer;
}
:where(form.search-form) .search-submit:hover,
:where(#commentform) #submit:hover {
  background: #e9e9e9;
}

/* Comment form – labels + fields */
:where(.comments-area) :where(.comment-form) label {
  color: #111;
}

:where(.comments-area) :where(.comment-form) input[type="text"],
:where(.comments-area) :where(.comment-form) input[type="email"],
:where(.comments-area) :where(.comment-form) input[type="url"],
:where(.comments-area) :where(.comment-form) textarea {
  color: #111;
  background: #fff;
  border: 1px solid rgba(0,0,0,.25);
  border-radius: 4px;
  padding: .6rem .7rem;
  line-height: 1.35;
  width: 100%;
  max-width: 100%;
}

:where(.comments-area) :where(.comment-form) input::placeholder,
:where(.comments-area) :where(.comment-form) textarea::placeholder {
  color: #666;
}

/* Focus states */
:where(.comments-area) :where(.comment-form) input[type="text"]:focus,
:where(.comments-area) :where(.comment-form) input[type="email"]:focus,
:where(.comments-area) :where(.comment-form) input[type="url"]:focus,
:where(.comments-area) :where(.comment-form) textarea:focus {
  outline: 2px solid #00ccff;
  outline-offset: 1px;
  border-color: #00ccff;
}

/* Explicitly leave CF7 alone */
.wpcf7-form input,
.wpcf7-form textarea,
.wpcf7-form select,
.wpcf7-form label,
.wpcf7-form .wpcf7-submit {
  /* CF7 keeps using its own stylesheet */
}
