/*
 * Vendor-facing pages. Ported from the site's register.css and thanks.css, keeping the
 * same conventions (.field / .field.half / .note / .actions, float clearing via .clear)
 * so this reads as part of the existing site.
 */

#register {
  background: var(--bg-tint);
  min-height: 100%;
  padding-bottom: 1px; /* contain the children's margins */
}

#register form,
#register .intro {
  width: 700px;
  margin: 0 auto;
}

#register .intro {
  padding: 60px 0 0;
}

#register .intro h2 {
  font-size: 24px;
  line-height: 30px;
  font-weight: 400;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 1px;
}

#register .intro p {
  margin-top: 12px;
  font-size: 16px;
  line-height: 24px;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-muted);
}

#register form {
  padding: 30px 0 100px;
}

#register form h3 {
  margin-top: 30px;
  font-size: 18px;
  line-height: 18px;
  font-weight: 400;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 1px;
}

#register .field {
  margin-top: 18px;
}

#register .field.half {
  float: left;
  width: 47%;
}

#register .field.half.right {
  margin-left: 6%;
}

#register .field label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  line-height: 14px;
  font-weight: 500;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 1px;
}

#register .field label.inline {
  margin-left: 34px;
  margin-bottom: 0;
  line-height: 24px;
  font-weight: 400;
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: 0;
}

#register .field input[type=text],
#register .field input[type=url],
#register .field input[type=email],
#register .field textarea {
  display: block;
  width: 100%;
  margin: 0;
  padding: 7px;
  font-size: 16px;
  line-height: 20px;
  color: var(--text);
  font-weight: 400;
  font-family: var(--font-body);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 3px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

#register .field textarea {
  min-height: 70px;
  resize: vertical;
}

#register .field input[type=file] {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 15px;
  line-height: 20px;
  font-family: var(--font-body);
  color: var(--text);
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 3px;
  box-sizing: border-box;
  cursor: pointer;
}

#register .field input[type=checkbox] {
  position: relative;
  float: left;
  display: inline-block;
  height: 24px;
  width: 24px;
  margin-right: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 3px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
  vertical-align: bottom;
  box-sizing: border-box;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

#register .field input[type=checkbox]:checked:after {
  content: '';
  position: absolute;
  top: 3px;
  left: 7px;
  width: 5px;
  height: 10px;
  border-right: 3px solid var(--text);
  border-bottom: 3px solid var(--text);
  transform: rotate(40deg);
}

#register .field.error label { color: var(--error); }

#register .field.error input[type=text],
#register .field.error input[type=url],
#register .field.error input[type=file],
#register .field.error textarea {
  border-color: var(--error);
}

/* Validation summary, using the site's error red. */
#register .errors {
  margin-top: 18px;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid var(--error);
  border-radius: 3px;
}

#register .errors h4 {
  font-size: 14px;
  line-height: 14px;
  font-weight: 500;
  color: var(--error);
  text-transform: uppercase;
  letter-spacing: 1px;
}

#register .errors ul {
  list-style: none;
}

#register .errors ul li {
  margin-top: 10px;
  font-size: 15px;
  line-height: 20px;
  font-family: var(--font-body);
  color: var(--error);
}

/* Helper copy, from register.css's .note */
#register .note h4 {
  margin-top: 10px;
  font-size: 14px;
  line-height: 14px;
  font-weight: 500;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 1px;
}

#register .note p {
  margin-top: 10px;
  font-size: 14px;
  line-height: 18px;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-muted);
}

#register .note p a {
  font-family: var(--font-body);
  color: var(--accent);
}

/* Already-submitted list, so a returning vendor can see what we have. */
#register .received {
  margin-top: 18px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 3px;
}

#register .received h4 {
  font-size: 14px;
  line-height: 14px;
  font-weight: 500;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 1px;
}

#register .received ul {
  list-style: none;
}

#register .received ul li {
  margin-top: 10px;
  padding-left: 22px;
  font-size: 15px;
  line-height: 20px;
  font-family: var(--font-body);
  color: var(--text-muted);
  word-break: break-word;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='none' stroke='%23008fd8' stroke-width='2' d='M2 7.5l3.5 3.5L12 4'/%3E%3C/svg%3E") no-repeat 0 3px;
}

#register .received ul li a { color: var(--accent); }

/* Repeatable link rows */
#register .link-row {
  position: relative;
  margin-top: 10px;
}

#register .link-row .remove {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 12px;
  line-height: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  background: none;
  border: none;
  cursor: pointer;
}

#register .link-row .remove:hover { color: var(--error); }

#register .add-link {
  margin-top: 12px;
  font-size: 14px;
  line-height: 14px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  background: none;
  border: none;
  cursor: pointer;
}

#register .actions {
  margin-top: 20px;
  padding: 20px 0;
}

#register .actions input[type=submit],
#register .actions button {
  display: block;
  width: 100%;
  padding: 14px 0;
  font-size: 14px;
  line-height: 14px;
  color: #fff;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--ink);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

#register .actions input[type=submit][disabled] {
  opacity: .5;
  cursor: default;
}

/* Upload progress, so a vendor pushing a 100 MB PDF doesn't think it hung. */
#register .uploading {
  display: none;
  margin-top: 14px;
  font-size: 14px;
  line-height: 18px;
  font-family: var(--font-body);
  color: var(--text-muted);
  text-align: center;
}

#register form.is-uploading .uploading { display: block; }

#register .clear { margin-bottom: 18px; }

/* Confirmation and empty states, from thanks.css */
#thanks {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--ink);
  overflow-y: auto;
}

#thanks h2,
#thanks p {
  max-width: 800px;
  margin: 0 auto;
  color: #fff;
  font-weight: 400;
  text-align: center;
  text-transform: uppercase;
  background: var(--ink);
}

#thanks h2 {
  padding: 100px 50px 0;
  font-size: 64px;
  line-height: 80px;
  letter-spacing: 2px;
}

#thanks p {
  padding: 30px 50px 0;
  font-size: 30px;
  line-height: 36px;
  letter-spacing: 1px;
}

#thanks p:last-of-type { padding-bottom: 100px; }

#thanks p a { color: #fff; }

#thanks p.small {
  font-size: 18px;
  line-height: 26px;
  color: #acb9bf;
}

@media (min-width: 320px) and (max-width: 799px) {
  #register form,
  #register .intro {
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
  }

  #register .intro { padding-top: 40px; }
  #register form { padding-bottom: 40px; }

  #register .field.half {
    float: none;
    width: 100%;
  }

  #register .field.half.right { margin-left: 0; }
}

@media (max-width: 499px) {
  #thanks h2 {
    padding: 36px 20px 0;
    font-size: 36px;
    line-height: 45px;
  }

  #thanks p {
    padding: 20px 20px 0;
    font-size: 20px;
    line-height: 24px;
  }

  #thanks p:last-of-type { padding-bottom: 40px; }
}
