/**
 * hcp-modal.css
 * HCP-specific overrides on top of modal-register.css (patient modal CSS).
 *
 * modal-register.css is loaded via the hcp-steps library dependency and
 * provides all modal shell styles (overlay, header, steps, footer, buttons).
 *
 * This file styles the tcm-page-form__ Drupal field classes inside the modal
 * to look identical to the patient modal's wc-field-* styles.
 */

/* ── Hide real Drupal submit button (triggered programmatically) ─ */
.wc-hcp-submit-hidden {
  display: none !important;
}

/* ── Final step: Submit button turns green ───────────────────── */
.wc-btn-next.submit {
  background: #3d6b22;
}
.wc-btn-next.submit:hover {
  background: #2d5518;
}

/* ═══════════════════════════════════════════════════════════════
   FIELD WRAPPERS
   ═══════════════════════════════════════════════════════════════ */

.wc-reg-body .tcm-page-form {
  background: none;
  padding: 0;
  margin: 0;
  border: none;
  box-shadow: none;
}

.wc-reg-body .tcm-page-form__input-row-wrapper {
  margin-bottom: 18px;
  padding: 0;
}

.wc-reg-body .tcm-page-form__single-input-container {
  width: 100%;
}

/* ═══════════════════════════════════════════════════════════════
   LABEL WRAPPER — reset the <label> used as a block container
   ═══════════════════════════════════════════════════════════════ */

.wc-reg-body .tcm-page-form__input-label {
  display: block;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  outline: none;
  cursor: default;
  width: 100%;
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════════
   LABEL TEXT — match wc-field-label
   ═══════════════════════════════════════════════════════════════ */

.wc-reg-body .tcm-page-form__input-placeholder {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #343840;
  margin-bottom: 6px;
  line-height: 1.4;
}

/* Suppress the placeholder-as-floating-label behavior from wc-register.css */
.wc-reg-body .tcm-page-form__input-label .tcm-page-form__input-placeholder {
  position: static;
  transform: none;
  transition: none;
  /* pointer-events: none; */
}

/* ═══════════════════════════════════════════════════════════════
   INPUTS & SELECTS — match wc-field-input
   ═══════════════════════════════════════════════════════════════ */

.wc-reg-body .tcm-page-form__input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-family:
    "Montserrat",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #343840;
  background: #fafafa;
  border: 1.5px solid #ededf0;
  border-radius: 6px;
  padding: 11px 14px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  margin: 0;
}

.wc-reg-body .tcm-page-form__input:focus {
  border-color: #bb2025;
  box-shadow: 0 0 0 3px rgba(187, 32, 37, 0.1);
}

.wc-reg-body .tcm-page-form__input::placeholder {
  color: #a0a3ab;
  font-weight: 400;
}

/* Invalid state */
.wc-reg-body .tcm-page-form__input-label.invalid .tcm-page-form__input {
  border-color: #e1242a;
  box-shadow: 0 0 0 3px rgba(225, 36, 42, 0.1);
}

/* ═══════════════════════════════════════════════════════════════
   CUSTOM SELECT DROPDOWN — match patient modal dropdown style
   ═══════════════════════════════════════════════════════════════ */

.wc-reg-body .tcm-page-form__select {
  position: relative;
}

.wc-reg-body .tcm-page-form__input--select {
  cursor: pointer;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%235C5F66'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 10px;
}

.wc-reg-body .tcm-page-form__select-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid #ededf0;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  z-index: 200;
  max-height: 200px;
  overflow-y: auto;
  display: none;
}

.wc-reg-body
  .tcm-page-form__select.show-dropdown
  .tcm-page-form__select-options {
  display: block;
}

.wc-reg-body .tcm-page-form__select-option {
  display: block;
  padding: 10px 14px;
  font-size: 13px;
  color: #343840;
  cursor: pointer;
  transition: background 0.1s;
}

.wc-reg-body .tcm-page-form__select-option:hover,
.wc-reg-body .tcm-page-form__select-option--category {
  background: #fff5f4;
  color: black;
}

.wc-reg-body .tcm-page-form__select-option--category {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #5c5f66;
  background: #fafafa;
  border-bottom: 1px solid #ededf0;
  cursor: default;
}

.wc-reg-body .tcm-page-form__select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.wc-reg-body .tcm-page-form__select-arrow svg {
  fill: #5c5f66;
}

/* ═══════════════════════════════════════════════════════════════
   MULTI-SELECT (TAOF, Engagement)
   ═══════════════════════════════════════════════════════════════ */

.wc-reg-body .tcm-page-form__multi-select-container {
  min-height: 44px;
  background: #fafafa;
  border: 1.5px solid #ededf0;
  border-radius: 6px;
  padding: 8px 14px;
  box-sizing: border-box;
  cursor: pointer;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.wc-reg-body
  .tcm-page-form__input-label.invalid
  .tcm-page-form__multi-select-container {
  border-color: #e1242a;
  box-shadow: 0 0 0 3px rgba(225, 36, 42, 0.1);
}

.wc-reg-body .tcm-page-form__multi-select-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #450a0a;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  padding: 3px 8px 3px 10px;
  margin: 2px;
}

.wc-reg-body .tcm-page-form__multi-select-item-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 2px;
  padding: 0 3px;
  font-size: 12px;
  line-height: 1;
}

/* ═══════════════════════════════════════════════════════════════
   VALIDATION ERROR — match wc-field-error
   ═══════════════════════════════════════════════════════════════ */

.wc-reg-body .tcm-page-form__validation-error {
  font-size: 11px;
  color: #e1242a;
  margin-top: 5px;
  font-weight: 600;
  display: block;
  line-height: 1.4;
}

.wc-reg-body .tcm-page-form__validation-error.tcm-hidden {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════
   CHECKBOXES
   The Drupal form hides the native input and uses a custom SVG
   icon (position:absolute in the original full-page layout).
   In the modal we switch to flex on the label and bring the icon
   into flow (position:static) so it aligns properly with the text.
   The native input is kept in the DOM (opacity:0, zero-size) so
   CSS sibling selectors (input:checked ~ icon) still work.
   ═══════════════════════════════════════════════════════════════ */

/* Flex label — applies to both consent and engagement checkboxes */
.wc-reg-body .tcm-page-form__input-label--concent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 14px;
}

.wc-reg-body .tcm-page-form__input-label:has(.js-engagement-checkbox) {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  cursor: pointer;
}

/* Native checkbox: collapse to zero size, stay in DOM for :checked sibling selector */
.wc-reg-body
  .tcm-page-form__input-label--concent
  .tcm-page-form__input[type="checkbox"],
.wc-reg-body
  .tcm-page-form__input-label:has(.js-engagement-checkbox)
  .tcm-page-form__input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

/* Custom icon: pull into flex flow */
.wc-reg-body .tcm-page-form__checkbox-icon {
  position: static;        /* override position:absolute from wc-register.css */
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 2px;
  border: 2px solid #605c5c;
  border-radius: 4px;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}

.wc-reg-body .tcm-page-form__checkbox-icon svg {
  width: 16px;
  height: 16px;
  opacity: 0;
  fill: #fff;
}

/* Checked state */
.wc-reg-body
  .tcm-page-form__input[type="checkbox"]:checked
  ~ .tcm-page-form__checkbox-icon {
  background: #bb2025;
  border-color: #bb2025;
}

.wc-reg-body
  .tcm-page-form__input[type="checkbox"]:checked
  ~ .tcm-page-form__checkbox-icon
  svg {
  opacity: 1;
}

/* Invalid state */
.wc-reg-body
  .tcm-page-form__input-label--concent.st-invalid-checkbox.invalid
  .tcm-page-form__checkbox-icon {
  outline: 2px solid #e1242a;
  outline-offset: 2px;
  border-color: #e1242a;
}

/* Reset text shift that wc-register.css adds for the full-page layout */
.wc-reg-body
  .tcm-page-form__input-label--concent
  .tcm-page-form__input[type="checkbox"]
  ~ .tcm-page-form__input-placeholder,
.wc-reg-body
  .tcm-page-form__input-label:has(.js-engagement-checkbox)
  .tcm-page-form__input[type="checkbox"]
  ~ .tcm-page-form__input-placeholder {
  transform: none;
  width: 100%;
  padding-left: 0;
}

/* Consent checkbox label text */
.wc-reg-body
  .tcm-page-form__input-label--concent
  .tcm-page-form__input-placeholder--small {
  font-size: 12px;
  color: #5c5f66;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  margin-bottom: 0;
  line-height: 1.6;
}

.wc-reg-body
  .tcm-page-form__input-label--concent
  .tcm-page-form__input-placeholder--small
  a {
  color: #bb2025;
}

/* Engagement checkbox label text */
.wc-reg-body
  .tcm-page-form__input-label:has(.js-engagement-checkbox)
  .tcm-page-form__input-placeholder {
  font-size: 12px;
  color: #5c5f66;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  margin-bottom: 0;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════
   PASSWORD STRENGTH BOX
   ═══════════════════════════════════════════════════════════════ */

.wc-reg-body .tcm-page-form__password-strength-container {
  background: #fafafa;
  border: 1px solid #ededf0;
  border-radius: 6px;
  padding: 10px 14px;
  margin-top: 84px;
  font-size: 11px;
}

.wc-reg-body .tcm-page-form__password-strength-container.tcm-hidden {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER TEXT (legal paragraphs)
   ═══════════════════════════════════════════════════════════════ */

.wc-reg-body .tcm-page-form-footer {
  font-size: 12px;
  color: #5c5f66;
  line-height: 1.6;
  margin-bottom: 16px;
}

.wc-reg-body .tcm-page-form-footer a {
  color: #bb2025;
}

/* ═══════════════════════════════════════════════════════════════
   SIGNED-IN MESSAGE
   ═══════════════════════════════════════════════════════════════ */

.wc-reg-body .tcm-page-form__signed-in-msg {
  background: #f0fff4;
  border: 1px solid #9ae6b4;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 12px;
  color: #3d6b22;
  margin-bottom: 18px;
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE OVERRIDES (6 steps need tighter step bar)
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 560px) {
  .wc-reg-body .tcm-page-form__passwords-wrapper,
  .wc-reg-body .tcm-page-form__input-row-wrapper {
    margin-bottom: 14px;
  }
}
/* iOS Safari auto-zooms any input with font-size < 16px on focus.
   This override prevents that without changing desktop appearance. */
@supports (-webkit-touch-callout: none) {
  .wc-hcp-overlay input,
  .wc-hcp-overlay select,
  .wc-hcp-overlay textarea {
    font-size: 16px !important;
  }
}
