/* ==========================================================================
   Account Engagement form styles — RGB Spectrum
   Referenced from the AE layout template as:
   <link rel="stylesheet" href="https://www.rgb.com/sites/default/files/ae-form-styles.css">

   Brand values from the live www.rgb.com theme (b5subtheme):
   Open Sans, cyan #00aeef buttons (pill, uppercase) hovering to navy #152973.

   NOTE: Pardot loads its own default form.css AFTER this file, so every
   selector here is anchored to #pardot-form (the id Pardot puts on the
   form element) — the ID outranks Pardot's class-based defaults no matter
   the load order.
   ========================================================================== */

:root {
  --rgb-font: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --rgb-brand: #00aeef;          /* primary button / accent color */
  --rgb-brand-hover: #152973;    /* button hover navy */
  --rgb-text: #212529;
  --rgb-label: #333333;
  --rgb-border: #cccccc;
  --rgb-border-focus: var(--rgb-brand);
  --rgb-error: #c0392b;
  --rgb-radius: 4px;
}

/* Reset the iframe body so the form sits flush.
   The parent page supplies surrounding whitespace. */
body {
  margin: 0;
  padding: 0;
  background: transparent;
  font-family: var(--rgb-font);
  color: var(--rgb-text);
  -webkit-font-smoothing: antialiased;
}

/* Pardot's form.css sets Tahoma 13px + margins on form.form — override */
#pardot-form {
  max-width: 640px;
  margin: 0;
  padding: 0;
  font-family: var(--rgb-font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--rgb-text);
}

/* --- Field rows ----------------------------------------------------- */
/* Pardot wraps each field in <p class="form-field ..."> */
#pardot-form p.form-field {
  max-width: 320px; /* field column, left-aligned with the disclaimer */
  margin: 0 0 1rem;
  padding: 0;
  clear: both;
}

/* Labels stack above their input (Pardot's default floats them left
   at 140px wide, right-aligned) and match the site's form labels */
#pardot-form p label.field-label {
  display: block;
  float: none;
  width: auto;
  text-align: left;
  background: none; /* Pardot's default gold-star required image */
  margin: 0 0 0.2rem 0;
  padding: 0;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--rgb-label);
  letter-spacing: 0.01em;
}

/* Required-field asterisk — single, brand cyan */
#pardot-form p.required label.field-label:after {
  content: " *";
  color: var(--rgb-brand);
  font-weight: 600;
}

/* --- Inputs --------------------------------------------------------- */
#pardot-form input[type="text"],
#pardot-form input[type="email"],
#pardot-form input[type="tel"],
#pardot-form input[type="url"],
#pardot-form input[type="number"],
#pardot-form input.text,
#pardot-form select,
#pardot-form textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 0.45rem 0.65rem;
  font-family: var(--rgb-font);
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--rgb-text);
  background: #fff;
  border: 1px solid var(--rgb-border);
  border-radius: var(--rgb-radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#pardot-form input:focus,
#pardot-form select:focus,
#pardot-form textarea:focus {
  outline: none;
  border-color: var(--rgb-border-focus);
  box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.2); /* match --rgb-brand */
}

#pardot-form textarea {
  min-height: 120px;
  resize: vertical;
}

/* --- Checkboxes / radios -------------------------------------------- */
#pardot-form .pd-checkbox .value,
#pardot-form .pd-radio .value {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-left: 0;
}

#pardot-form .pd-checkbox input,
#pardot-form .pd-radio input {
  width: auto;
  margin-top: 0.2rem;
}

/* --- Help / consent / description text ------------------------------ */
/* Pardot's default indents these 153px to clear its floated labels */
#pardot-form p span.description,
#pardot-form .description {
  display: block;
  margin: 0.35rem 0 0 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #666;
}

/* --- Submit button --------------------------------------------------- */
/* Pardot's default indents p.submit 160px; margin-bottom gives the
   below-form disclaimer breathing room */
#pardot-form p.submit {
  max-width: 320px;
  margin: 1.75rem 0 1.5rem;
  padding: 0;
  clear: both;
}

/* Matches the site's a.bttn.blu house button: cyan pill, uppercase */
#pardot-form p.submit input[type="submit"],
#pardot-form input.submit {
  display: inline-block;
  width: auto;
  margin: 0;
  padding: 10px 27px;
  font-family: var(--rgb-font);
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #fff;
  background: var(--rgb-brand);
  border: 1px solid var(--rgb-brand);
  border-radius: 25px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

#pardot-form p.submit input[type="submit"]:hover,
#pardot-form input.submit:hover {
  background: var(--rgb-brand-hover);
  border-color: var(--rgb-brand-hover);
}

#pardot-form p.submit input[type="submit"]:focus-visible {
  outline: 3px solid var(--rgb-brand);
  outline-offset: 2px;
}

/* --- Marketing disclaimer (bare <p> after the submit row) ------------ */
#pardot-form p.submit ~ p {
  margin: 0;
  padding: 0;
  font-size: 0.75rem;
  line-height: 1.6;
  color: #666;
}

#pardot-form p.submit ~ p a {
  color: var(--rgb-brand);
}

/* --- Errors ---------------------------------------------------------- */
/* Pardot's default pads span.error 166px left to clear floated labels */
#pardot-form span.error,
#pardot-form p.error,
#pardot-form .error {
  display: block;
  clear: both;
  padding-left: 0;
  margin-top: 0.3rem;
  color: var(--rgb-error);
  font-size: 0.8125rem;
  font-weight: 400;
}

#pardot-form p.form-field.error input,
#pardot-form p.form-field.error select {
  border-color: var(--rgb-error);
}

#pardot-form .errors {
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  background: #fdecea;
  border-left: 3px solid var(--rgb-error);
  color: var(--rgb-error);
  font-size: 0.875rem;
}

/* --- Thank-you content ------------------------------------------------ */
.thank-you,
form.form + div {
  font-family: var(--rgb-font);
  font-size: 1rem;
  line-height: 1.6;
}

/* --- Narrow screens --------------------------------------------------- */
@media (max-width: 480px) {
  #pardot-form p.submit input[type="submit"],
  #pardot-form input.submit {
    width: 100%;
  }
}
