/* Source #1152: 114 YOBB – Registration Forms */
/* =========================================================
   114 YOBB – REGISTRATION FORMS CSS V4 / GLOBAL

   Shortcodes:
   [yobb_employer_register]
   [yobb_worker_register]

   Tämä CSS hoitaa:
   - rekisteröintikortin layoutin
   - yritys- ja yhteyshenkilöosiot
   - PRH-haun sijoittelun
   - gridit
   - responsiivisuuden

   Kenttien, nappien, fonttien ja viestien perusulkoasu:
   YOBB – Global Component Styles
========================================================= */


/* =========================================================
   CARD
========================================================= */

.yobb-register-card,
.yobb-register-card *,
.yobb-register-card *::before,
.yobb-register-card *::after {
  box-sizing: border-box;
}

.yobb-register-card {
  width: 100%;
  max-width: 820px;

  display: grid;
  gap: var(--yobb-space-md);

  margin: 28px auto;
}

.yobb-register-card > .yobb-heading {
  margin: 0;

  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.05;
}

.yobb-register-intro {
  max-width: 650px;
  margin: 0;

  line-height: 1.5;
}


/* =========================================================
   MESSAGES
========================================================= */

.yobb-register-message {
  margin: 0;
}

.yobb-register-message p {
  margin: 0;
}


/* =========================================================
   FORM
========================================================= */

.yobb-register-form {
  display: block;

  width: 100%;
  margin-top: var(--yobb-space-sm);
}

.yobb-register-form input[type="hidden"] {
  display: none;
}


/* =========================================================
   SECTIONS
========================================================= */

.yobb-register-section {
  width: 100%;

  margin-top: 34px;
  padding-top: 30px;

  border-top: 1px solid rgba(0, 0, 0, 0.10);
}

.yobb-register-section:first-of-type {
  margin-top: 18px;
  padding-top: 0;

  border-top: 0;
}

.yobb-register-section-head {
  width: 100%;

  margin-bottom: 22px;
}

.yobb-register-section-head h3 {
  margin: 0;

  font-size: clamp(23px, 3vw, 29px);
  line-height: 1.15;
}


/* =========================================================
   SECTION GRIDS
========================================================= */

.yobb-register-section-grid {
  width: 100%;

  display: grid;
  gap: 18px 20px;
}


/* =========================================================
   COMPANY
========================================================= */

/*
   Layout:

   Y-tunnus
   ----------------

   PRH lookup
   ----------------

   Yrityksen nimi | Verkkosivut
*/

.yobb-register-company-grid {
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
}

.yobb-register-company-id {
  grid-column: 1 / -1;
}


/* =========================================================
   PRH / YTJ LOOKUP
========================================================= */

/*
   Snippet 115 lisää .yobb-prh-lookup-elementin
   Y-tunnuskentän jälkeen.
*/

.yobb-register-company-grid .yobb-prh-lookup {
  grid-column: 1 / -1;

  width: 100%;

  display: grid;
  grid-template-columns:
    max-content minmax(0, 1fr);

  align-items: center;

  gap: 8px 14px;

  margin-top: -4px;
  margin-bottom: 2px;
}

.yobb-register-company-grid
.yobb-prh-lookup-btn {
  grid-column: 1;
  grid-row: 1;
}

.yobb-register-company-grid
.yobb-prh-lookup-status {
  grid-column: 2;
  grid-row: 1;

  min-width: 0;

  font-weight: 700;
}

.yobb-register-company-grid
.yobb-prh-lookup-source {
  grid-column: 1 / -1;
  grid-row: 2;

  margin: 0;
}


/* =========================================================
   CONTACT PERSON
========================================================= */

.yobb-register-contact-grid {
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
}


/* =========================================================
   FIELDS
========================================================= */

.yobb-register-form .yobb-field {
  min-width: 0;
  margin: 0;
}

.yobb-register-form .yobb-input {
  width: 100%;
  max-width: 100%;
}


/* =========================================================
   SUBMIT
========================================================= */

.yobb-register-form
.yobb-register-submit {
  width: 100%;

  margin-top: 28px;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 820px) {

  .yobb-register-card {
    max-width: 100%;
  }

  .yobb-register-section {
    margin-top: 30px;
    padding-top: 26px;
  }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 640px) {

  .yobb-register-card {
    gap: var(--yobb-space-sm);

    margin: 16px auto;
  }

  .yobb-register-card > .yobb-heading {
    font-size: 29px;
  }

  .yobb-register-intro {
    line-height: 1.4;
  }

  .yobb-register-section {
    margin-top: 26px;
    padding-top: 22px;
  }

  .yobb-register-section:first-of-type {
    margin-top: 14px;
  }

  .yobb-register-section-head {
    margin-bottom: 18px;
  }

  .yobb-register-section-head h3 {
    font-size: 23px;
  }

  .yobb-register-company-grid,
  .yobb-register-contact-grid {
    grid-template-columns: 1fr;
  }

  .yobb-register-company-id {
    grid-column: auto;
  }

  .yobb-register-section-grid {
    gap: var(--yobb-space-sm);
  }


  /* PRH mobiilissa */

  .yobb-register-company-grid
  .yobb-prh-lookup {
    grid-column: auto;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 7px;

    margin-top: -2px;
  }

  .yobb-register-company-grid
  .yobb-prh-lookup-status,
  .yobb-register-company-grid
  .yobb-prh-lookup-source {
    width: 100%;
  }


  .yobb-register-form
  .yobb-register-submit {
    margin-top: 22px;
  }

}

/* =========================================================
   REGISTRATION COMPLETE
========================================================= */

.yobb-register-complete {
  text-align: center;

  justify-items: center;

  padding-top: 48px;
  padding-bottom: 48px;
}

.yobb-register-complete-icon {
  width: 64px;
  height: 64px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 2px solid var(--yobb-primary);
  border-radius: 50%;

  font-size: 28px;
  font-weight: 800;

  color: var(--yobb-primary);
}

.yobb-register-complete > .yobb-heading {
  margin-top: 4px;
}

.yobb-register-complete-lead {
  margin-bottom: 0;
}

.yobb-register-complete-email {
  margin: -8px 0 0;

  font-size: 18px;
  font-weight: 800;

  overflow-wrap: anywhere;
}

.yobb-register-complete .yobb-text--muted {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.yobb-register-complete-actions {
  width: 100%;

  display: flex;
  justify-content: center;

  margin-top: 8px;
}


/* MOBILE */

@media (max-width: 640px) {

  .yobb-register-complete {
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .yobb-register-complete-icon {
    width: 56px;
    height: 56px;

    font-size: 24px;
  }

  .yobb-register-complete-actions {
    display: block;
  }

  .yobb-register-complete-actions .yobb-btn {
    width: 100%;
  }
}
