/**
 * ERAU Leads - storefront form styling.
 * Intentionally light: inherits the theme's fonts and CTA buttons, adds only
 * layout + spacing. Scoped under .erauleads-* / .erau-* so nothing else moves.
 */
:root {
  --erau-purple: #5b28c4;
  --erau-ink: #2b2b3a;
  --erau-muted: #6b6b7b;
  --erau-border: #e0e0e0;          /* slim grey, like product cards */
  --erau-border-focus: #9a9a9a;    /* neutral grey on focus, no colour */
  --erau-error: #c0392b;
  --erau-error-bg: #fdecea;
  --erau-success: #1e7e46;
  --erau-success-bg: #e8f7ee;
}

/* Wrapper for the embeddable widget (home hook / {widget ...}) */
.erauleads-wrap {
  max-width: 760px;
  margin: 24px auto;
  padding: 0 15px;
}

.erauleads-card {
  background: #fff;
  border: 1px solid var(--erau-border);
  border-radius: 4px;
  padding: 26px 28px;
}

.erauleads-title {
  margin: 0 0 6px;
  color: var(--erau-ink);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
}
.erauleads-intro {
  margin: 0 0 24px;
  color: var(--erau-muted);
}

/* Field grid */
.erauleads-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
}
.erauleads-field { display: flex; flex-direction: column; min-width: 0; }
.erauleads-field--full { grid-column: 1 / -1; }

.erauleads-label {
  display: block;
  width: 100%;
  margin: 0 0 7px;
  /* override themes that right-align form labels */
  text-align: left !important;
  font-weight: 600;
  color: var(--erau-ink);
  font-size: 0.92rem;
}
.erauleads-req { color: var(--erau-purple); margin-left: 2px; }

.erauleads-form input[type="text"],
.erauleads-form input[type="email"],
.erauleads-form input[type="tel"],
.erauleads-form input[type="number"],
.erauleads-form select,
.erauleads-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--erau-border);
  border-radius: 4px;
  background: #fff;
  color: var(--erau-ink);
  font: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
}
.erauleads-form textarea { resize: vertical; min-height: 120px; }
.erauleads-form input:focus,
.erauleads-form select:focus,
.erauleads-form textarea:focus {
  outline: none;
  border-color: var(--erau-border-focus);
}

.erauleads-radio {
  display: flex;
  gap: 26px;
  align-items: center;
  /* match the height of a text input so the row lines up with its neighbour */
  min-height: 43px;
}
.erauleads-radio label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-weight: 500;
  color: var(--erau-ink);
  cursor: pointer;
  text-align: left !important;
}
.erauleads-radio input[type="radio"] { margin: 0; }

/* Honeypot */
.erauleads-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}

.erauleads-recaptcha { margin-top: 4px; }

/* Actions: use the theme's own button, no custom look */
.erauleads-actions { margin-top: 24px; }

/* Alerts */
.erauleads-alert { border-radius: 6px; padding: 13px 16px; margin-bottom: 18px; }
.erauleads-alert ul { margin: 0; padding-left: 18px; }
.erauleads-alert--error { background: var(--erau-error-bg); color: var(--erau-error); border: 1px solid #f3c6c0; }
.erauleads-alert--success { background: var(--erau-success-bg); color: var(--erau-success); border: 1px solid #bfe6cd; font-weight: 600; }

@media (max-width: 640px) {
  .erauleads-grid { grid-template-columns: 1fr; }
  .erauleads-card { padding: 20px 18px; }
  .erauleads-title { font-size: 1.3rem; }
}

/* ==================================================================== *
 *  Contact page : info sidebar (left) + form (right)
 * ==================================================================== */
.erau-contact-page {
  /* fill the theme's content area so the left edge and width match other pages;
     no own max-width/centring, no top margin (breadcrumb already spaces it) */
  margin: 0 0 40px;
  padding: 0;
}

/* The generic theme <h1> is centred at max-width 900px; left-align it on this
   page so it lines up with the breadcrumb like every other page's heading. */
body#module-erauleads-form .page-heading {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.erau-contact {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

/* Let the shared form fill its column */
.erau-contact .erauleads-wrap { max-width: none; margin: 0; padding: 0; }

/* Sidebar: plain theme-style info box, no heavy styling */
.erau-side-card {
  background: #fff;
  border: 1px solid var(--erau-border);
  border-radius: 4px;
  overflow: hidden;
}
.erau-side-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--erau-border);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--erau-ink);
}
.erau-side-body {
  padding: 18px;
  color: var(--erau-ink);
  font-size: 0.92rem;
  line-height: 1.75;
}
/* Inherit the theme's link colour; no underline, greyish on hover like the theme */
.erau-side-body a { text-decoration: none; }
.erau-side-body a:hover { color: #5d5d5d; text-decoration: none; }
/* Optional structured rows if admin uses the .erau-side-row markup */
.erau-side-row { padding: 10px 0; border-bottom: 1px dashed var(--erau-border); }
.erau-side-row:first-child { padding-top: 0; }
.erau-side-row:last-child { border-bottom: none; padding-bottom: 0; }
.erau-side-mut { color: var(--erau-muted); }

@media (max-width: 900px) {
  .erau-contact { grid-template-columns: 1fr; gap: 20px; }
}

/* Privacy note under the button (v1.0.1) */
.erauleads-privacy { margin: 14px 0 0; font-size: 13px; line-height: 1.5; opacity: .75; }
.erauleads-privacy a { text-decoration: underline; }
