/*
  MuckList signup, shared by finalbuild2.com and muckworks.finalbuild2.com
  (both site configs copy it to assets/css/mucklist.css). Markup comes from
  mucklistForm() in shared/muckworks.mjs.

  Phones: the sign art, with a normal field and button under it.
  760px and up: the banner art, with the real field and button laid exactly
  over the painted ones. Positions are % of the 2078x757 banner; the painted
  placeholder text was removed from the art so typed text never overlaps it.
*/

/* Explicit width: inside a grid cell, auto margins would shrink the form. */
.mucklist {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

/* finalbuild2.com: the form closes the Muckworks band. */
.mucklist-wrap {
  padding-bottom: clamp(56px, 9vw, 120px);
}

.mucklist-sign {
  width: min(100%, 520px);
  margin: 0 auto;
}

.mucklist-banner {
  display: none;
}

.mucklist-board {
  display: grid;
  gap: 10px;
  width: min(100%, 520px);
  margin: 16px auto 0;
}

.mucklist-email {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: #fcede0;
  color: #2a2018;
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 600;
}

.mucklist-email::placeholder {
  color: #7a6a58;
  opacity: 1;
}

.mucklist-email:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 100px #fcede0 inset;
  -webkit-text-fill-color: #2a2018;
}

.mucklist-submit {
  min-height: 54px;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  background: #e94506;
  color: #fff;
  font: inherit;
  font-size: 1.125rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.mucklist-submit::after {
  content: " \2192";
  content: " \2192" / "";
}

.mucklist-submit:hover {
  background: #f75207;
}

.mucklist-email:focus-visible,
.mucklist-submit:focus-visible {
  outline: 3px solid var(--hazard);
  outline-offset: 3px;
}

.mucklist-note {
  max-width: 64ch;
  margin: 14px auto 0;
  color: var(--mud-soft);
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: center;
}

.mucklist-note a {
  color: var(--mud-text);
}

/* Turnstile: invisible unless Cloudflare wants an interaction, then centered. */
.mucklist-check {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

/* Honeypot: off screen for people, still filled in by naive bots. */
.mucklist-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (min-width: 760px) {
  .mucklist-sign {
    display: none;
  }

  .mucklist-board {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    container-type: inline-size;
  }

  .mucklist-banner {
    display: block;
    width: 100%;
  }

  .mucklist-email {
    position: absolute;
    top: 69%;
    left: 32.4%;
    width: 25.2%;
    height: 11.4%;
    min-height: 0;
    padding: 0 0.8cqw;
    border-radius: 0.6cqw;
    background: transparent;
    font-size: 2.2cqw;
  }

  .mucklist-submit {
    position: absolute;
    top: 66.6%;
    left: 60.15%;
    width: 20.6%;
    height: 15.9%;
    min-height: 0;
    padding: 0;
    border-radius: 1.2cqw;
    background: transparent;
  }

  /* The label is painted on the art; keep the text for screen readers. */
  .mucklist-submit::after {
    content: none;
  }

  .mucklist-submit-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .mucklist-submit:hover {
    background: rgb(255 236 200 / 0.16);
  }

  .mucklist-submit:active {
    background: rgb(0 0 0 / 0.08);
  }

  .mucklist-email:focus-visible,
  .mucklist-submit:focus-visible {
    outline: 0.3cqw solid #2a2018;
    outline-offset: 0.2cqw;
  }
}
