/* Shared static/WP_LOAD form presentation. Every selector is scoped to bc-form. */

.bc-form__intro p,
.bc-form__required-note {
  font-size: 1.6rem;
  line-height: 32px;
}

.bc-form__required-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.bc-form__status {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 22px;
  padding: 0 8px;
  color: #fff;
  background: var(--bc-brown);
  border-radius: 4px;
  font-size: 1.4rem;
  line-height: 14px;
}

.bc-form__status.is-required {
  background: #ee6d6b;
}

.bc-form__required-symbol {
  flex: 0 0 16px;
}

.bc-form__steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 25px;
  margin-top: 64px;
}

.bc-form__steps::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 28px;
  left: 10%;
  width: 80%;
  height: 8px;
  background: var(--bc-green-pale);
}

.bc-form__steps li {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 64px;
  color: var(--bc-brown);
  background: var(--bc-green-pale);
  border-radius: 4px;
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 32px;
}

.bc-form__steps [aria-current="step"] {
  color: #fff;
  background: var(--bc-green);
}

.bc-form {
  display: grid;
  gap: 40px;
  margin-top: 64px;
  color: var(--bc-brown);
  font-family: var(--bc-font-sans);
  font-weight: 400;
}

/* The two supplied PC forms have different control sizes, not different components. */
.bc-form--entry {
  --bc-form-row-gap: 24px;
  --bc-form-control-height: 56px;
  --bc-form-control-radius: 4px;
  --bc-form-label-column: 264px;
  --bc-form-label-width: 180px;
  --bc-form-control-padding: 23px;
}

.bc-form__fields {
  display: grid;
  gap: var(--bc-form-row-gap, 40px);
}

.bc-form__footer {
  display: grid;
  gap: 24px;
}

.bc-form__row {
  display: grid;
  grid-template-columns: var(--bc-form-label-column, 244px) minmax(0, 1fr);
  align-items: start;
  min-height: var(--bc-form-control-height, 64px);
}

.bc-form__label {
  display: grid;
  grid-template-columns: 44px minmax(0, var(--bc-form-label-width, 160px));
  align-items: center;
  gap: 16px;
  min-height: var(--bc-form-control-height, 64px);
}

.bc-form__label label,
.bc-form__label > span:last-child {
  font-size: 1.6rem;
  line-height: 32px;
}

.bc-form__control input,
.bc-form__control textarea,
.bc-form__control select {
  width: 100%;
  border: 1px solid var(--bc-border, #e3d4cd);
  border-radius: var(--bc-form-control-radius, 8px);
  background: #fff;
  color: var(--bc-brown);
  font-family: inherit;
  font-size: 1.6rem;
  line-height: 32px;
}

.bc-form__control input,
.bc-form__control select {
  height: var(--bc-form-control-height, 64px);
  padding: calc((var(--bc-form-control-height, 64px) - 34px) / 2) var(--bc-form-control-padding, 22px);
}

.bc-form__control textarea {
  display: block;
  height: 240px;
  padding: 15px 22px;
  resize: vertical;
}

.bc-form__control input::placeholder,
.bc-form__control textarea::placeholder {
  color: #dcdcdc;
  opacity: 1;
}

.bc-form__control :where(input, select, textarea):focus-visible,
.bc-form__consent input:focus-visible {
  outline: 3px solid #f4b942;
  outline-offset: 2px;
}

.bc-form__birthday {
  display: flex;
  align-items: center;
  gap: 24px;
}

.bc-form__birthday label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bc-form__birthday select {
  width: 100px;
  padding-right: 40px;
}

.bc-form__birthday label::after {
  position: absolute;
  top: calc(50% - 6px);
  right: 40px;
  width: 16px;
  height: 12px;
  background: var(--bc-brown);
  mask: url('../../assets/images/lower/form-select-caret.svg') center / 13.8564px 9px no-repeat;
  transform: scaleY(-1);
  pointer-events: none;
  content: '';
}

.bc-form__birthday label:first-child select {
  width: 120px;
}

.bc-form__control--short { width: min(240px, 100%); }

.bc-form--entry .bc-form__employment {
  position: relative;
}

.bc-form--entry .bc-form__employment select {
  padding-right: 44px;
}

.bc-form--entry .bc-form__employment::after {
  position: absolute;
  top: calc(50% - 6px);
  right: 16px;
  width: 16px;
  height: 12px;
  background: var(--bc-brown);
  mask: url('../../assets/images/lower/form-select-caret.svg') center / 13.8564px 9px no-repeat;
  transform: scaleY(-1);
  pointer-events: none;
  content: '';
}

.bc-form__row--file {
  min-height: 192px;
}

.bc-form__row--file .bc-form__label {
  align-content: start;
  padding-top: 16px;
}

.bc-form__file-display {
  display: grid;
  place-content: center;
  justify-items: center;
  min-height: 192px;
  padding: 24px;
  border: 1px solid var(--bc-border, #e3d4cd);
  border-radius: 4px;
  background: var(--bc-cream);
  text-align: center;
}

.bc-form__file-display p {
  font-size: 1.6rem;
  line-height: 24px;
}

.bc-form__file-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 240px;
  height: 48px;
  margin-top: 16px;
  border: 1px solid var(--bc-border, #e3d4cd);
  border-radius: 4px;
  background: #fff;
  font-size: 1.4rem;
  line-height: 32px;
}

.bc-form__consent {
  display: grid;
  justify-items: center;
  gap: 40px;
}

.bc-form__consent p,
.bc-form__consent label {
  font-size: 1.6rem;
  line-height: 32px;
  text-align: center;
}

.bc-form__consent p { width: min(808px, 100%); }

.bc-form__consent p a {
  color: var(--bc-green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bc-form__consent label {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
}

.bc-form__consent input {
  width: 20px;
  height: 20px;
  border: 1px solid #dcdcdc;
  border-radius: 2px;
  background: #fff;
}

.bc-form__consent input:checked {
  background: var(--bc-green);
  box-shadow: inset 0 0 0 4px #fff;
}

.bc-form__submit {
  display: grid;
  grid-template-columns: 144px 1fr 32px;
  align-items: center;
  width: 320px;
  height: 64px;
  margin-inline: auto;
  padding: 12px 16px 12px 40px;
  color: #fff;
  background: var(--bc-green);
  border-radius: 8px;
  font-family: var(--bc-font-mincho);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 32px;
  cursor: not-allowed;
}

.bc-form__submit i {
  display: grid;
  grid-column: 3;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--bc-green);
  background: #fff;
  border-radius: 4px;
  font-family: Arial, sans-serif;
  font-size: 0;
  font-style: normal;
  line-height: 1;
}

@media (max-width: 899px) {
  .bc-form__steps {
    gap: 12px;
  }

  .bc-form__row {
    grid-template-columns: minmax(212px, 30%) minmax(0, 1fr);
  }

  .bc-form__label {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .bc-form__birthday {
    display: grid;
    grid-template-columns: minmax(96px, 1.2fr) repeat(2, minmax(80px, 1fr));
    gap: 8px;
    max-width: 440px;
  }

  .bc-form__birthday label {
    min-width: 0;
    gap: 4px;
  }

  .bc-form__birthday select,
  .bc-form__birthday label:first-child select {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    padding-inline: 8px 20px;
  }

  .bc-form__birthday label::after { right: 24px; }
}

@media (max-width: 599px) {
  .bc-form__intro p,
  .bc-form__required-note {
    font-size: 1.5rem;
    line-height: 30px;
  }

  .bc-form__steps {
    gap: 6px;
    margin-top: 48px;
  }

  .bc-form__steps li {
    height: 56px;
    font-size: 1.3rem;
  }

  .bc-form {
    gap: 32px;
    margin-top: 48px;
  }

  .bc-form__fields {
    gap: var(--bc-form-row-gap, 32px);
  }

  .bc-form__row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .bc-form__label {
    min-height: 40px;
  }

  .bc-form__control input,
  .bc-form__control textarea,
  .bc-form__control select {
    font-size: 1.6rem;
  }

  .bc-form__row--file {
    gap: 12px;
  }

  .bc-form__row--file .bc-form__label {
    padding-top: 0;
  }

  .bc-form__file-button {
    width: min(240px, 100%);
  }

  .bc-form__consent {
    gap: 24px;
  }

  .bc-form__consent p,
  .bc-form__consent label {
    font-size: 1.4rem;
    line-height: 28px;
  }

  .bc-form__submit {
    width: min(320px, 100%);
  }
}
