/*
 * Lime form pages (eventawards.com.au /lime/): Amy's redesign, generalised (lime-devbox 2026-12-04).
 * Self-contained: nothing relies on the old Customizer "Additional CSS" block.
 *   PART 1, the FORMS: always on, for all four views (subscribe, download, update, unsubscribe), incl. the legacy update/unsubscribe HTML.
 *   PART 2, the PAGE layout (grid, intro, photo, full width, title hiding): only when the page sets a heading/intro/photo (.is-designed).
 * Colours: gold #e2ad3d (hover #f2c66b), form box #15191c, field #0d1012, borders #747a7f / #a4a9ad, focus #add6e2.
 * Breakpoints: 760px (stack), 380px (names stack).
 */

/* ======================= PART 1: forms (always) ======================= */

.ea-lime .ea-lime-form { color: #fff; min-width: 0; }
.ea-lime .ea-lime-form h1,
.ea-lime .ea-lime-form p,
.ea-lime .ea-lime-form label,
.ea-lime .ea-lime-form span,
.ea-lime .ea-lime-form li { color: #fff; }

.ea-lime .ea-lime-form form.afe-form {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(16px, 2.5vw, 32px);
  border: 1px solid #747a7f;
  background: #15191c;
  color: #fff;
}

/* Field layout used by the new subscribe/download HTML. */
.ea-lime .ea-signup-names {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.ea-lime .ea-signup-field { margin-bottom: 14px; }
.ea-lime .ea-signup-field label {
  display: block;
  margin-bottom: 5px;
}

/* Text fields, selects and textareas in every form (radios/checkboxes are left alone). */
.ea-lime .ea-lime-form form.afe-form input[type="text"],
.ea-lime .ea-lime-form form.afe-form input[type="email"],
.ea-lime .ea-lime-form form.afe-form input[type="tel"],
.ea-lime .ea-lime-form form.afe-form select,
.ea-lime .ea-lime-form form.afe-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #a4a9ad;
  border-radius: 0;
  background: #0d1012;
  color: #fff;
  font: inherit;
}
.ea-lime .ea-lime-form form.afe-form textarea { min-height: 84px; }
.ea-lime .ea-lime-form form.afe-form ::placeholder { color: #a4a9ad; opacity: 1; }

/* Legacy update form: its small grey-ish span labels sit above the fields. */
.ea-lime .ea-lime-form #lime-form-update span { display: inline-block; margin-bottom: 4px; }

/* Legacy unsubscribe form: radio rows. */
.ea-lime .ea-lime-form #lime-form-unsubscribe input[type="radio"] { accent-color: #e2ad3d; }

/*
 * Buttons: the submit and the update form's pre-fill button. The theme's .btn sets float/width/background/font with high specificity,
 * so this single rule keeps !important on just those properties.
 */
.generic-content-page .ea-lime .ea-lime-form input.btn[type="submit"],
.generic-content-page .ea-lime .ea-lime-form input.btn[type="button"] {
  display: block;
  float: none !important;
  box-sizing: border-box;
  width: 100% !important;
  max-width: none !important;
  height: auto;
  min-height: 48px;
  margin: 16px 0 0;
  padding: 12px 16px;
  border: 0;
  border-radius: 0;
  background: #e2ad3d !important;
  color: #101010 !important;
  font: 700 16px/1.25 'Avalon', sans-serif !important;
  text-align: center;
  text-transform: none !important;
  white-space: normal;
  cursor: pointer;
}
.generic-content-page .ea-lime .ea-lime-form input.btn[type="submit"]:hover,
.generic-content-page .ea-lime .ea-lime-form input.btn[type="button"]:hover { background: #f2c66b !important; }
.generic-content-page .ea-lime .ea-lime-form input.btn:disabled { opacity: 0.7; cursor: default; }

.ea-lime .ea-lime-form :focus-visible {
  outline: 2px solid #add6e2;
  outline-offset: 3px;
}

/* Validation messages (jquery.validate) and server errors stay readable on the dark box. */
.ea-lime .ea-lime-form label.error,
.ea-lime .ea-lime-form #errors,
.ea-lime .ea-lime-form #errors li { color: #f2c66b; }

@media (max-width: 380px) {
  .ea-lime .ea-signup-names {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}

/* ======================= PART 2: page layout (only with content) ======================= */

/* Full-width content column when the redesign is in use. */
.generic-right2-col .generic-content-col:has(.ea-lime.is-designed) {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}
.afe-container:has(.ea-lime.is-designed) { max-width: none; }

.ea-lime.is-designed {
  box-sizing: border-box;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 64px) clamp(16px, 4vw, 48px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  grid-template-areas: "intro form" "photo form";
  gap: 24px clamp(24px, 4vw, 48px);
  align-items: start;
  align-content: start;
  color: #fff;
}
.ea-lime.is-designed.has-intro:not(.has-photo) { grid-template-areas: "intro form"; }
.ea-lime.is-designed.has-photo:not(.has-intro) { grid-template-areas: "photo form"; }

.ea-lime.is-designed .ea-lime-intro { grid-area: intro; }
.ea-lime.is-designed .ea-lime-form { grid-area: form; }
.ea-lime.is-designed .ea-lime-photo-wrap { grid-area: photo; }

.ea-lime-intro h1 {
  margin: 0 0 12px;
  color: #fff;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.08;
}
.ea-lime-intro h1 .ea-hl { color: #e2ad3d; }
.ea-lime-intro p {
  margin: 0;
  color: #fff;
  font-size: clamp(16px, 1.6vw, 21px);
  line-height: 1.45;
}
.ea-lime-photo {
  display: block;
  width: 100%;
  height: auto;
}

/*
 * The form's own title (kept for the plain page) is hidden when the page sets a heading: ONLY an h1 that comes before the <form>.
 * After a submit, the success/error HTML replaces the wrapper's contents (no <form> any more), so its h1 ("Thank You") always shows.
 * Browsers without :has() just show the title as well.
 */
.ea-lime.has-heading .ea-lime-form > div > h1:has(~ form) { display: none; }

@media (max-width: 760px) {
  .ea-lime.is-designed,
  .ea-lime.is-designed.has-intro:not(.has-photo),
  .ea-lime.is-designed.has-photo:not(.has-intro) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "intro" "form" "photo";
  }
}
