/* ==========================================================================
   Venue Blog Comments — form layout
   First Name | Last Name
   Email      (full width)
   Comment    (full width)
   [Submit]   (full width)
   ========================================================================== */

.venue-blog-comments {
  box-sizing: border-box;
  width: 100%;
}

.venue-blog-comments form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 22px;
}

/* Each form field gets some breathing room */
.venue-blog-comments form .field {
  margin: 0;
}

/* Comment (textarea) field spans both columns */
.venue-blog-comments form .field:has(textarea) {
  grid-column: 1 / -1;
}

/* Email spans both columns (this form has no Website field to pair it with) */
.venue-blog-comments form .field:has(input[type="email"]) {
  grid-column: 1 / -1;
}

/* Submit + reCAPTCHA span both columns and center their contents.
   (Replaces the inline <style> that was being added to each venue page's <head>.) */
.venue-blog-comments form .hs-submit,
.venue-blog-comments form .actions,
.venue-blog-comments form .hs_recaptcha,
.venue-blog-comments form > input[type="submit"],
.venue-blog-comments form > button[type="submit"] {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
}

/* Fallback for older browsers without :has() — field order:
   1) First Name, 2) Last Name, 3) Email, 4) Comment → 3rd onward span full width */
@supports not (selector(:has(*))) {
  .venue-blog-comments form > .field:nth-child(n+3) {
    grid-column: 1 / -1;
  }
}

/* Fields styled like home.html .hero__search (white fill, 2px border, soft tinted
   shadow, blue focus ring). Border-radius is intentionally left to the current value. */
.venue-blog-comments form .field input[type="text"],
.venue-blog-comments form .field input[type="email"],
.venue-blog-comments form .field input[type="url"],
.venue-blog-comments form .field textarea {
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border: 2px solid #D8E2F2;
  padding: 12px 16px;
  font-family: 'Barlow', system-ui, sans-serif;
  font-size: 16px;
  color: #1A1A1A;
  box-shadow: 0 4px 16px rgba(12, 45, 107, 0.08);
  transition: border-color .2s, box-shadow .2s;
}
.venue-blog-comments form .field input[type="text"]::placeholder,
.venue-blog-comments form .field input[type="email"]::placeholder,
.venue-blog-comments form .field input[type="url"]::placeholder,
.venue-blog-comments form .field textarea::placeholder {
  color: #5C6478;
}
.venue-blog-comments form .field input:focus,
.venue-blog-comments form .field textarea:focus {
  outline: 0;
  border-color: #0062FF;
  box-shadow: 0 0 0 4px rgba(0, 98, 255, 0.16);
}

/* Validation error text in red */
.venue-blog-comments .hs-error-msg,
.venue-blog-comments .hs-error-msgs,
.venue-blog-comments label.hs-error-msg {
  color: #D32F2F;
}

/* On narrow screens, stack everything single-column */
@media (max-width: 640px) {
  .venue-blog-comments form {
    grid-template-columns: 1fr;
  }
}
