/* ============================================================
   CLAIM FORM — dentist pages + clinic v2 (template-parts/claim/claim-form.php)
   One stylesheet for both page types; tokens only (sd-tokens.css).
   Show/hide uses :has() on the form; where :has() is unsupported everything stays visible
   and the server enforces every rule regardless.
   ============================================================ */

.sd-claim__heading {
  margin-bottom: var(--sd-space-3);
}

/* One left edge, full width */
.sd-claim__form .dentist-claim__field,
.sd-claim__form .sd-claim__group,
.sd-claim__form .sd-claim__reg {
  margin: 0 0 var(--sd-space-4);
}
.sd-claim__form .sd-input {
  width: 100%;
  box-sizing: border-box;
}
.sd-claim__form .sd-input--short {
  max-width: 120px; /* pincode may stay short */
}

/* Fieldset + legend reset (browser defaults indent the legend and add gaps) */
.sd-claim__form fieldset.sd-claim__group {
  border: 0;
  padding: 0;
  margin: 0 0 var(--sd-space-4);
  min-width: 0;
}
.sd-claim__form fieldset.sd-claim__group > legend.sd-claim__legend {
  padding: 0;
  float: none;
  width: 100%;
  display: block;
  font-size: var(--sd-fs-sm);
  font-weight: var(--sd-fw-medium);
  color: var(--sd-color-text);
  margin: 0 0 var(--sd-space-2);
}
/* Section legend ("Where you work"): heading style, flush left */
.sd-claim__form fieldset.sd-claim__group > legend.sd-claim__legend--section {
  font-family: var(--sd-font-serif);
  font-size: var(--sd-fs-lg);
  font-weight: var(--sd-fw-semibold);
  color: var(--sd-color-text-strong);
  letter-spacing: var(--sd-ls-tight);
}
.sd-claim__form .sd-claim__roles {
  margin-bottom: var(--sd-space-4); /* role tiles; the legend above is the group label */
}
.sd-claim__question {
  margin: 0 0 var(--sd-space-2);
}

/* Choice tiles: stacked, full width, tappable. The <label> wraps the input. */
.sd-claim__form .sd-claim__choice {
  display: flex;
  align-items: center;
  gap: var(--sd-space-2);
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: var(--sd-space-3);
  margin: 0 0 var(--sd-space-2);
  border: 1px solid var(--sd-color-border);
  border-radius: var(--sd-radius-md);
  background: var(--sd-color-surface);
  color: var(--sd-color-text);
  cursor: pointer;
  transition:
    border-color     var(--sd-motion-duration-fast) var(--sd-motion-ease-standard),
    background-color var(--sd-motion-duration-fast) var(--sd-motion-ease-standard);
}
.sd-claim__form .sd-claim__choice input {
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--sd-color-primary);
}
.sd-claim__form .sd-claim__choice:has(input:checked) {
  border-color: var(--sd-color-primary);
  background: var(--sd-color-primary-soft);
}
.sd-claim__form .sd-claim__choice:has(input:focus-visible) {
  box-shadow: var(--sd-focus-ring);
}

/* SHOW / HIDE ------------------------------------------------------------ */
/* Dentist-only parts (registration number; clinic page "Your dentist profile"):
   hidden until a dentist role is checked, hidden again for the manager role. */
.sd-claim__form:not(:has(.sd-claim__is-dentist:checked)) .sd-claim__dentist-only,
.sd-claim__form:has(input[name="requester_role"][value="manager"]:checked) .sd-claim__dentist-only {
  display: none;
}
/* Workplace details (clinic / hospital name, area, pincode): shown only when workplace = clinic or hospital. */
.sd-claim__form:not(:has(input[name="workplace"][value="clinic"]:checked)):not(:has(input[name="workplace"][value="hospital"]:checked)) .sd-claim__workplace-details {
  display: none;
}
/* Name label swaps by choice (two spans, one input); both show where :has is unsupported. */
.sd-claim__form:has(input[name="workplace"][value="clinic"]:checked) .sd-claim__lbl-hospital,
.sd-claim__form:has(input[name="workplace"][value="hospital"]:checked) .sd-claim__lbl-clinic {
  display: none;
}
