/**
 * USCF Membership form (adapted from CSS for Quick Membership webform)
 */

:root {
  --qm-blue: #0293D3;        /* theme $light-blue */
  --qm-blue-dark: #003F6C;   /* theme $dark-blue */
  --qm-blue-bg: #e3f4fc;
  --qm-blue-ink: #003F6C;
  --qm-soft-bg: #f7fafc;      /* membership-form.css */
  --qm-soft-border: #e2e8f0;  /* membership-form.css */
  --qm-soft-ink: #2d3748;     /* membership-form.css */
  --qm-soft-muted: #4a5568;   /* membership-form.css */
  --qm-field-border: #cbd5e0;
  --qm-line: #e2e8f0;
  --qm-muted: #6f7276;
  --qm-ink: #1f2225;
}

/* ---- Register / log in call-out ---- */

.uscfwf-callout {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  border: 2px solid var(--qm-blue);
  background: var(--qm-blue-bg);
  border-radius: 8px;
  padding: 1.25rem 1.4rem;
  margin: 0 0 1.75rem;
}

.uscfwf-callout__icon {
  flex: none;
  color: var(--qm-blue-ink);
  line-height: 1;
}

.uscfwf-callout__body {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  min-width: 0;
}

.uscfwf-callout__title {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--qm-blue-ink);
}

.uscfwf-callout__text {
  margin: 0;
  color: var(--qm-blue-ink);
  line-height: 1.5;
}

.uscfwf-callout a.uscfwf-callout__cta {
  text-transform: none;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: .35rem;
  padding: 10px;
  min-height: 40px;
  min-width: 145px;
  border: none;
  border-radius: 5px;
  background-color: var(--qm-blue);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

.uscfwf-callout a.uscfwf-callout__cta:hover,
.uscfwf-callout a.uscfwf-callout__cta:focus {
  background-color: var(--qm-blue-dark);
  color: #fff;
  text-decoration: none;
}

.uscfwf-callout a.uscfwf-callout__cta:focus-visible {
  outline: 2px solid var(--qm-blue-dark);
  outline-offset: 2px;
}

/* ---- "or renew quickly below" rule ---- */

.uscfwf-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 1.5rem;
  color: var(--qm-muted);
}

.uscfwf-divider::before,
.uscfwf-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--qm-line);
}

/* ---- step labels ---- */

.uscfwf-steplabel {
  margin: 0 0 .5rem;
  color: var(--qm-muted);
  font-size: .95rem;
}

/* ---- the Member ID box ---- */

.uscfwf-idbox {
  border: 1px solid var(--qm-soft-border);
  border-radius: 8px;
  padding: 1.15rem 1.25rem 1.25rem;
  background: var(--qm-soft-bg);
  color: var(--qm-soft-ink);
  display: flex;
  gap: .75rem 1.25rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

/* Field and button share a row; the member detail drops below both. */
.uscfwf-idbox .uscfwf-idfield {
  flex: 0 1 22rem;
  min-width: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/*
 * Webform wraps a markup element in `div.form-item-<key>`, so THAT is the flex
 * child; targeting the inner #quick-membership-member does nothing.
 */
.qm-idbox > .form-item-quick-membership-member {
  flex: 1 0 100%;
  margin: 0;
  padding: 0;
}

/* Before a lookup the region is an empty div; do not let it reserve a row. */
#uscfwf-member:empty {
  display: none;
}

.uscfwf-idbox label {
  display: block;
  margin-bottom: .45rem;
  font-weight: 400;
  color: var(--qm-ink);
}

.uscfwf-idbox input[type="text"] {
  display: block;
  width: 100%;
  /* The theme's input-text mixin sets margin-bottom: 1em and height: 45px on
     every text input. That margin makes the field wrapper taller than the input,
     so flex-end aligned the wrapper's bottom instead of the input's. The theme
     rule is nested and outranks a plain override here, hence !important, scoped
     to this panel only. */
  margin-bottom: 0 !important;
  height: 45px;
  padding: .65rem .8rem;
  border: 1px solid var(--qm-field-border);
  border-radius: 6px;
  font-size: 1rem;
  background: #fff;
  color: var(--qm-ink);
}

.uscfwf-idbox .uscfwf-search {
  text-transform: none;
  flex: none;
  /* input[type=submit] carries a UA margin of 8px on every side. Under
     align-items: flex-end flex aligns MARGIN-box edges, so that margin offset
     the button from the input no matter how the heights matched. */
  margin: 0;
  padding: 10px;
  /* Same fixed height as the input above, so the row is exactly flush. */
  height: 45px;
  min-height: 45px;
  min-width: 145px;
  border: none;
  border-radius: 5px;
  background-color: var(--qm-blue);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}


