/* JED-1486: /tutoring/ register-interest form (template-tutoring-interest.php). Colours and sizes from the
   approved design (canvas boards 2-4); one column with a sticky submit bar on phones. */
body.jl-tutoring-interest {
  margin: 0;
  background: #e7e4ec;
  color: #1e252a;
  font-family: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
}

.jl-tutoring-interest *,
.jl-tutoring-interest *::before,
.jl-tutoring-interest *::after {
  box-sizing: border-box;
}

.jl-tutoring-interest :focus-visible {
  outline: 3px solid #8e65e2;
  outline-offset: 2px;
}

.jl-tutor-site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 752px;
  margin: 0 auto;
  padding: 20px 16px 0;
}

.jl-tutor-site-header img {
  display: block;
  height: auto;
}

.jl-tutor-back {
  color: #2e2277;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.jl-tutor-back:hover {
  text-decoration: underline;
}

.jl-tutor-page {
  display: flex;
  justify-content: center;
  padding: 24px 16px 48px;
}

.jl-tutor-dialog {
  width: 100%;
  max-width: 720px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.jl-tutor-hero {
  padding: 36px 32px 24px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(180deg, #f5f2ff 0%, #eae1ff 100%);
}

.jl-tutor-eyebrow {
  color: #2e2277;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.jl-tutor-hero h1 {
  margin: 10px 0 8px;
  color: #1a1a1a;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
}

.jl-tutor-hero p {
  max-width: 560px;
  margin: 0;
  color: #405059;
  font-size: 16px;
  line-height: 1.6;
}

.jl-tutor-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 28px 32px 32px;
}

.jl-tutor-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.jl-tutor-section + .jl-tutor-section {
  padding-top: 28px;
  border-top: 1px solid #ece9f1;
}

.jl-tutor-section--help {
  gap: 24px;
}

.jl-tutor-section h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.jl-tutor-grid,
.jl-tutor-parent {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.jl-tutor-parent {
  padding: 16px;
  border-radius: 10px;
  background: #f7f5fb;
}

.jl-tutor-parent[hidden],
.jl-tutor-suburb[hidden] {
  display: none;
}

.jl-tutor-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.jl-tutor-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.jl-tutor-field label,
.jl-tutor-form legend {
  font-size: 14px;
  font-weight: 600;
}

.jl-tutor-optional {
  color: #5f5a66;
  font-weight: 400;
}

.jl-tutor-form input[type='text'],
.jl-tutor-form input[type='email'],
.jl-tutor-form input[type='tel'],
.jl-tutor-form select,
.jl-tutor-form textarea {
  width: 100%;
  margin: 0;
  border: 1px solid #cfcbd6;
  border-radius: 8px;
  background: #fff;
  color: #1e252a;
  font: inherit;
  font-size: 15px;
}

.jl-tutor-form input[type='text'],
.jl-tutor-form input[type='email'],
.jl-tutor-form input[type='tel'],
.jl-tutor-form select {
  height: 44px;
  padding: 0 12px;
}

.jl-tutor-form select {
  padding: 0 8px;
}

.jl-tutor-form textarea {
  padding: 10px 12px;
  line-height: 1.5;
  resize: vertical;
}

.jl-tutor-form [aria-invalid='true'] {
  border-color: #b42318;
}

.jl-tutor-hint {
  color: #5f5a66;
  font-size: 13px;
}

.jl-tutor-suburb {
  max-width: 320px;
  margin-top: 6px;
}

.jl-tutor-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 15px;
  line-height: 1.5;
  cursor: pointer;
}

.jl-tutor-check--top {
  align-items: flex-start;
  gap: 12px;
}

.jl-tutor-check input {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #2e2277;
}

.jl-tutor-check--top input {
  margin-top: 2px;
}

.jl-tutor-check a {
  color: #2e2277;
}

.jl-tutor-form fieldset {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: none;
}

.jl-tutor-form legend {
  margin-bottom: 10px;
  padding: 0;
}

/* Subject and start chips: real checkboxes/radios, visually hidden, the label is the chip. */
.jl-tutor-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.jl-tutor-chip input,
.jl-tutor-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.jl-tutor-chip {
  position: relative;
}

.jl-tutor-chip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 16px;
  border: 1px solid #cfcbd6;
  border-radius: 22px;
  background: #fff;
  color: #1e252a;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.jl-tutor-chip span svg {
  display: none;
}

.jl-tutor-chip input:checked + span {
  border-color: #2e2277;
  background: #2e2277;
  color: #fff;
}

.jl-tutor-chip input:checked + span svg {
  display: block;
}

.jl-tutor-chip input:focus-visible + span,
.jl-tutor-option:focus-within {
  outline: 3px solid #8e65e2;
  outline-offset: 2px;
}

/* Format and 1:1-or-group cards: radios, the label is the card. */
.jl-tutor-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.jl-tutor-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 92px;
  padding: 14px 16px;
  border: 1px solid #cfcbd6;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.jl-tutor-option:has(input:checked) {
  padding: 13px 15px;
  border: 2px solid #2e2277;
  background: #f5f2ff;
}

.jl-tutor-option-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.jl-tutor-option-title {
  font-size: 16px;
  font-weight: 600;
}

.jl-tutor-option-hint {
  color: #5f5a66;
  font-size: 13px;
}

.jl-tutor-option-check {
  position: absolute;
  top: 12px;
  right: 12px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 11px;
  background: #2e2277;
  color: #fff;
}

.jl-tutor-option:has(input:checked) .jl-tutor-option-check {
  display: flex;
}

.jl-tutor-error {
  margin: 0;
  color: #b42318;
  font-size: 14px;
}

.jl-tutor-failure {
  padding: 12px 14px;
  border-radius: 8px;
  background: #fdecea;
}

/* Off-screen, not display:none: some bots skip hidden fields. */
.jl-tutor-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.jl-tutor-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: -16px;
}

.jl-tutor-actions {
  display: flex;
  flex-wrap: wrap-reverse;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.jl-tutor-cancel {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 20px;
  color: #2e2277;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.jl-tutor-submit,
.jl-tutor-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 28px;
  border: 2px solid #2e2277;
  border-radius: 6px;
  background: #2e2277;
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: normal;
  text-decoration: none;
  text-transform: none;
  cursor: pointer;
}

.jl-tutor-submit:hover,
.jl-tutor-primary:hover {
  background: #1c1450;
}

.jl-tutor-note {
  margin: 0;
  color: #5f5a66;
  font-size: 13px;
  text-align: right;
}

.jl-tutor-sent {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 56px 40px 40px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f5f2ff 0%, #fff 60%);
  text-align: center;
}

.jl-tutor-sent-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 32px;
  background: #2e2277;
}

.jl-tutor-sent h1 {
  margin: 8px 0 0;
  color: #1a1a1a;
  font-size: 28px;
  font-weight: 700;
}

.jl-tutor-sent p {
  max-width: 480px;
  margin: 0;
  color: #405059;
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.jl-tutor-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.jl-tutor-summary span {
  padding: 6px 12px;
  border-radius: 999px;
  background: #f0e7ff;
  color: #2e2277;
  font-size: 14px;
  font-weight: 500;
}

.jl-tutor-primary {
  margin-top: 16px;
}

.jl-tutor-sent .jl-tutor-small {
  color: #5f5a66;
  font-size: 13px;
}

@media (max-width: 640px) {
  body.jl-tutoring-interest {
    background: #fff;
  }

  .jl-tutor-site-header {
    padding: 12px 16px;
    border-bottom: 1px solid #ece9f1;
  }

  .jl-tutor-page {
    padding: 0;
  }

  .jl-tutor-dialog,
  .jl-tutor-hero,
  .jl-tutor-sent {
    border-radius: 0;
    box-shadow: none;
  }

  .jl-tutor-hero {
    padding: 20px 16px 16px;
    background: linear-gradient(180deg, #f5f2ff 0%, #fff 100%);
  }

  .jl-tutor-hero .jl-tutor-eyebrow {
    margin-bottom: 8px;
  }

  .jl-tutor-hero h1 {
    margin-top: 0;
    font-size: 24px;
  }

  .jl-tutor-hero p {
    font-size: 15px;
    line-height: 1.55;
  }

  .jl-tutor-form {
    gap: 28px;
    padding: 8px 16px 0;
  }

  .jl-tutor-grid,
  .jl-tutor-parent,
  .jl-tutor-options {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 16px stops iOS zooming into a focused field. */
  .jl-tutor-form input[type='text'],
  .jl-tutor-form input[type='email'],
  .jl-tutor-form input[type='tel'],
  .jl-tutor-form select,
  .jl-tutor-form textarea {
    font-size: 16px;
  }

  .jl-tutor-option {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    min-height: 60px;
    padding-top: 0;
    padding-bottom: 0;
  }

  .jl-tutor-option:has(input:checked) {
    padding-top: 0;
    padding-bottom: 0;
  }

  .jl-tutor-option-text {
    flex-grow: 1;
    gap: 0;
  }

  .jl-tutor-option-check {
    position: static;
    flex-shrink: 0;
  }

  .jl-tutor-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin: 0 -16px;
    padding: 12px 16px 24px;
    gap: 8px;
    border-top: 1px solid #ece9f1;
    background: #fff;
  }

  .jl-tutor-cancel {
    display: none;
  }

  .jl-tutor-submit {
    width: 100%;
    height: 52px;
    border-radius: 8px;
  }

  .jl-tutor-note {
    text-align: center;
  }

  .jl-tutor-sent {
    padding: 40px 16px 32px;
  }

  .jl-tutor-sent h1 {
    font-size: 24px;
  }
}

/* ---------------------------------------------------------------------------------------------------------
   The theme's global form styles (css/common-styles.css, loaded first) also reach this page. They hide every
   checkbox and radio off-screen and draw their own box and tick on the next <span>, turn every form button
   into a light-purple uppercase pill, colour headings purple, and paint <html> white. The rules below undo
   them for this form only, with selectors that outrank the theme's: its checkbox rules carry
   :not(#rememberme), one id's worth of specificity, so the checkbox overrides carry it too.
   --------------------------------------------------------------------------------------------------------- */

/* The lavender ground reaches the bottom of the window (the theme paints <html> white). */
body.jl-tutoring-interest {
  min-height: 100vh;
  font-weight: 400;
}

body.jl-tutoring-interest .jl-tutor-section h2 {
  color: #1e252a;
  margin-bottom: 0;
}

/* Chips (subjects are checkboxes, start times are radios): the input stays visually hidden, the span is the
   chip, and the theme's box, tick and 35px indent are removed. */
body.jl-tutoring-interest .jl-tutor-form .jl-tutor-chip input[type='checkbox']:not(#rememberme),
body.jl-tutoring-interest .jl-tutor-form .jl-tutor-chip input[type='radio']:not(#rememberme) {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

body.jl-tutoring-interest .jl-tutor-form .jl-tutor-chip input:not(#rememberme) + span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  max-width: none;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  opacity: 1;
  transition: none; /* the theme fades the text colour, so a just-picked chip flashed dark-on-navy */
}

body.jl-tutoring-interest .jl-tutor-form .jl-tutor-chip input:not(#rememberme) + span::before,
body.jl-tutoring-interest .jl-tutor-form .jl-tutor-chip input:not(#rememberme) + span::after,
body.jl-tutoring-interest .jl-tutor-form .jl-tutor-check input:not(#rememberme) + span::before,
body.jl-tutoring-interest .jl-tutor-form .jl-tutor-check input:not(#rememberme) + span::after {
  content: none;
  display: none;
}

/* Parent and consent: plain native 20px checkboxes, as on the design. */
body.jl-tutoring-interest .jl-tutor-form .jl-tutor-check input[type='checkbox']:not(#rememberme) {
  position: static;
  left: auto;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 0;
  opacity: 1;
  appearance: auto;
  -webkit-appearance: checkbox;
  accent-color: #2e2277;
  cursor: pointer;
}

body.jl-tutoring-interest .jl-tutor-form .jl-tutor-check--top input[type='checkbox']:not(#rememberme) {
  margin-top: 2px;
}

body.jl-tutoring-interest .jl-tutor-form .jl-tutor-check input:not(#rememberme) + span {
  display: inline;
  max-width: none;
  padding-left: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  opacity: 1;
}

body.jl-tutoring-interest .jl-tutor-form .jl-tutor-check input:focus-visible {
  outline: 3px solid #8e65e2;
  outline-offset: 2px;
}

/* Format and 1:1-or-group cards: the radio stays hidden (the label is the card). The theme's radio rules
   only style a following <span>, and the radio here is followed by an icon, so nothing else leaks in. */
body.jl-tutoring-interest .jl-tutor-form .jl-tutor-option input[type='radio'] {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

/* The navy submit from the design, not the theme's light-purple uppercase pill. Covers the theme's
   `form button` and `button[type=submit]` rules, their hover and focus states and their ::after. */
body.jl-tutoring-interest .jl-tutor-form button.jl-tutor-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 48px;
  padding: 0 28px;
  border: 2px solid #2e2277;
  border-radius: 6px;
  background: #2e2277;
  color: #fff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
}

body.jl-tutoring-interest .jl-tutor-form button.jl-tutor-submit:hover,
body.jl-tutoring-interest .jl-tutor-form button.jl-tutor-submit:focus {
  background: #1c1450;
  border-color: #1c1450;
  color: #fff;
}

body.jl-tutoring-interest .jl-tutor-form button.jl-tutor-submit::after {
  display: none;
}

body.jl-tutoring-interest .jl-tutor-form a.jl-tutor-cancel {
  background: none;
  color: #2e2277;
  text-transform: none;
  letter-spacing: normal;
}

@media (max-width: 640px) {
  body.jl-tutoring-interest .jl-tutor-form button.jl-tutor-submit {
    width: 100%;
    height: 52px;
    border-radius: 8px;
    font-size: 17px;
  }

  body.jl-tutoring-interest .jl-tutor-form .jl-tutor-chip input:not(#rememberme) + span {
    padding: 0 14px;
  }
}
