/*
 * CiviCRM event registration forms: tighter, cleaner spacing.
 * Loaded by mu-plugins/civi-event-form-styles.php. Every rule is scoped to
 * .crm-event-register-form-block, so other CiviCRM pages are untouched.
 * Mostly overrides Riverlea's front-end spacing variables (ext/riverlea/core/css/_variables.css).
 */
.crm-container.crm-public .crm-event-register-form-block {
  --crm-f-form-padding: 0.12rem;              /* space above/below each field (was 0.5rem) */
  --crm-f-label-gap: 0.1rem;                  /* label to input (was 0.5rem) */
  --crm-f-input-padding: 0.25rem 0.5rem;      /* inside each box (was 1.25rem 0.75rem) */
  --crm-f-input-font-size: 1rem;              /* (was 1.125rem) */
  --crm-f-fieldset-padding: 0;               /* no card padding (was 1rem) */
  --crm-f-fieldset-margin: 0 0 0.5rem 0;      /* gap between cards (was 1rem) */
  --crm-f-legend-size: 1rem;                  /* card headings (was 1.25rem) */
  --crm-f-legend-padding: 0 0 0.2rem 0;
  --crm-btn-padding-block: 0.45rem;           /* Continue button (was 0.75rem) */
}

/* Labels sit right above their boxes */
.crm-container.crm-public .crm-event-register-form-block .crm-section .label {
  line-height: 1.2;
  font-size: 0.9rem;
}
.crm-container.crm-public .crm-event-register-form-block .crm-section .label label {
  margin: 0;
}

/* Inputs: the theme adds its own margins and heights; keep them compact */
.crm-container.crm-public .crm-event-register-form-block :is(input[type="text"], input[type="email"], input[type="tel"], input[type="number"], select, textarea) {
  margin: 0;
  line-height: 1.35;
  min-height: 0;
  height: auto;
}
.crm-container.crm-public .crm-event-register-form-block .select2-container .select2-choice {
  min-height: 0;
  line-height: 1.6;
}
/* The Customizer's Additional CSS gives every CiviCRM input "padding: 1.5em 1em"
   with an ID selector (#crm-container.crm-public form input...); match it with an
   ID too, so the boxes here stay compact. */
#crm-container.crm-public .crm-event-register-form-block input:not([type="checkbox"]):not([type="submit"]):not([type="radio"]):not([type="hidden"]),
#crm-container.crm-public .crm-event-register-form-block textarea {
  padding: 0.25rem 0.5rem;
  height: auto;
  min-height: 0;
  font-size: 1rem;
  line-height: 1.3;
}
/* The same Customizer CSS also puts 18px above every label and 15px under every
   field; keep those compact here too. */
#crm-container.crm-public .crm-event-register-form-block .crm-section {
  margin-bottom: 0.35rem;
}
#crm-container.crm-public .crm-event-register-form-block .label:not(.hiddenElement) {
  padding-top: 0.15rem;
  padding-bottom: 0.1rem;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

/* Yes/No and other radio questions print their name as plain text in .label,
   not in a <label>, so they miss the Customizer's label style; copy it. */
#crm-container.crm-public .crm-event-register-form-block .label:not(.hiddenElement):not(:has(label)) {
  text-transform: uppercase;
  font-family: proxima-nova; /* same as the Customizer's label rule, so the same fallback font */
  font-size: 13px;
  letter-spacing: 1.5px;
}

/* Field names in bold (radio-option labels like Yes/No stay normal) */
#crm-container.crm-public .crm-event-register-form-block .label:not(.hiddenElement),
#crm-container.crm-public .crm-event-register-form-block .label:not(.hiddenElement) label {
  font-weight: 700;
}

/* Section headings ("Your Registration Info", "About the Teen"): the site's usual
   font and size, in copper to match the Weekly Letter. */
#crm-container.crm-public .crm-event-register-form-block legend {
  color: #b87333;
}

/* Review/Continue button in dark copper, darker on hover */
#crm-container.crm-public .crm-event-register-form-block .crm-submit-buttons button.crm-form-submit {
  background: #94562a;
  border-color: #94562a;
  color: #fff;
}
#crm-container.crm-public .crm-event-register-form-block .crm-submit-buttons button.crm-form-submit:hover,
#crm-container.crm-public .crm-event-register-form-block .crm-submit-buttons button.crm-form-submit:focus {
  background: #7a4622;
  border-color: #7a4622;
  color: #fff;
}
#crm-container.crm-public .crm-event-register-form-block .crm-submit-buttons button.crm-form-submit i {
  color: inherit;
}

#crm-container.crm-public .crm-event-register-form-block .select2-container .select2-choice {
  height: auto;
  min-height: 0;
  padding: 0.25rem 0.5rem;
  font-size: 1rem;
  line-height: 1.3;
}
#crm-container.crm-public .crm-event-register-form-block select {
  height: auto;
  min-height: 0;
  padding: 0.2rem 0.45rem;
  font-size: 1rem;
  line-height: 1.3;
}

/* Yes/No and other radio/checkbox groups on one compact line */
.crm-container.crm-public .crm-event-register-form-block .crm-option-label-pair,
.crm-container.crm-public .crm-event-register-form-block .content label {
  margin-block: 0;
}
.crm-container.crm-public .crm-event-register-form-block .crm-multiple-checkbox-radio-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.25rem;
}
.crm-container.crm-public .crm-event-register-form-block .crm-option-label-pair {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.crm-container.crm-public .crm-event-register-form-block .crm-option-label-pair label {
  margin: 0;
  font-weight: normal;
}

/* Help text and descriptions */
.crm-container.crm-public .crm-event-register-form-block .description {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  line-height: 1.3;
}

/* Hide the empty placeholder sections CiviCRM always prints */
.crm-container.crm-public .crm-event-register-form-block .cms_user-section:not(:has(*)),
.crm-container.crm-public .crm-event-register-form-block .crm-public-form-item:empty {
  display: none;
}
.crm-container.crm-public .crm-event-register-form-block .clear {
  height: 0;
  margin: 0;
  padding: 0;
}

/* Intro text and the submit row */
.crm-container.crm-public .crm-event-register-form-block .crm-section.intro_text-section p:last-child {
  margin-bottom: 0;
}
/* Address suggestions under the street field on event and donate forms
   (script in mu-plugins/civi-event-form-styles.php) */
.crm-container .addr-suggest {
  position: absolute;
  z-index: 50;
  left: 0;
  right: 0;
  top: 100%;
  max-width: 32rem;
  margin: 2px 0 0;
  padding: 0.2rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}
.crm-container .addr-suggest li {
  margin: 0;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.3;
}
.crm-container .addr-suggest li span { color: #666; }
.crm-container .addr-suggest li:hover,
.crm-container .addr-suggest li[aria-selected="true"] { background: #f1f1f1; }

.crm-container.crm-public .crm-event-register-form-block .crm-submit-buttons {
  margin: 0.15rem 0 0;
  padding-block: 0.25rem;
}

/* ---------- Newsletter sign-up form (CiviCRM profile 18) ----------
   Tight and unboxed: no card padding or shadow, compact rows and inputs. */
#crm-container.crm-public:has(input[name="gid"][value="18"]) { padding: 0; margin: 0; }
#crm-container.crm-public:has(input[name="gid"][value="18"]) > .crm-title { display: none; } /* the post already has the title */
#crm-container.crm-public:has(input[name="gid"][value="18"]) #crm-main-content-wrapper { padding: 0; margin: 0; }
#crm-container.crm-public .crm-profile-name-Contact_us_18 #crm-profile-block {
  padding: 0; margin: 0; box-shadow: none; border: 0; background: transparent;
}
#crm-container.crm-public .crm-profile-name-Contact_us_18 .crm-section { margin: 0 0 6px; padding: 0; }
#crm-container.crm-public .crm-profile-name-Contact_us_18 .label:not(.hiddenElement) { padding: 0 0 2px; margin: 0; }
#crm-container.crm-public .crm-profile-name-Contact_us_18 input:not([type="checkbox"]):not([type="submit"]):not([type="radio"]):not([type="hidden"]) {
  padding: 6px 10px; height: auto; min-height: 0; font-size: 1rem; line-height: 1.35; margin: 0;
}
#crm-container.crm-public .crm-profile-name-Contact_us_18 .recaptcha-section,
#crm-container.crm-public form.CRM_Profile_Form_Edit .recaptcha-section { margin: 4px 0 6px; padding: 0; }
#crm-container.crm-public .crm-profile-name-Contact_us_18 .crm-submit-buttons { margin: 6px 0 0; padding: 0; }
#crm-container.crm-public .crm-profile-name-Contact_us_18 .crm-submit-buttons button { padding: 8px 20px; }
