/* === Form Styling === */

  /* Wrapper for disabled terms checkbox */
  .terms-tooltip-wrapper {
      position: relative;
      display: inline-block;
      cursor: not-allowed;
  }

  /* Tooltip bubble */
  .terms-tooltip {
      position: absolute;
      bottom: 130%;
      left: 0;
      max-width: 260px;
      background-color: #000;
      color: #fff;
      padding: 8px 10px;
      font-size: 13px;
      border-radius: 4px;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.2s ease;
      z-index: 1000;
      white-space: normal;
  }

  /* Tooltip arrow */
  .terms-tooltip::after {
      content: "";
      position: absolute;
      top: 100%;
      left: 14px;
      border-width: 6px;
      border-style: solid;
      border-color: #000 transparent transparent transparent;
  }

  /* Show tooltip on hover */
  .terms-tooltip-wrapper:hover .terms-tooltip {
      opacity: 1;
      visibility: visible;
  }


  h2.tab-title,
  legend.section-title {
    display: none;
  }

  .validation-summary,
  .validation-summary-valid,
  .validation-summary-errors {
    display: none !important;
  }

  #EntityFormControl_e0bd3bfc38adf011bbd2000d3a2a3a3a,
  .crmEntityFormView,
  .entity-form,
  .actions,
  #InsertButton,
  div.tab-clearfix,
  div.tab-clearfix div,
  div.tab-column,
  div.tab-column div,
  .entity-form,
  .crmEntityFormView,
  tbody,
  td.clearfix.cell,
  td.clearfix.cell.text.form-control-cell,
  .tab,
  .tab-column,
  .fieldset,
  .table {
    background:#f8f8f8;
    border: none !important;
  }

  .tab,
  .tab-column,
  .fieldset,
  .table {
    border: none !important;
  }

  .form-control,
  input {
    border-radius: none !important;
    border-color: #ccc !important;
  }

  input[type="email"] {
    text-decoration: none !important;
  }

  div.tab.clearfix {
    margin-bottom: 0;
  }

  .crmEntityFormView .actions {
    border-top: 1px solid #f8f8f8;
    margin-top: 0;
    padding-top: 0;
    padding-left: 28px;
  }

  .rr-verification {
    max-width: 720px;
    margin: 0 auto;
    font-family: "Segoe UI", Arial, sans-serif;
    color: #1a1a1a;
  }

  .rr-section-label {
    color: #1e22aa;
    font-weight: 600;
    margin-bottom: 0;
    padding-left: 0 !important;
  }

  .rr-page-title {
    font-size: 32px;
    font-weight: 700;
    margin-top: 8px;
  }

  .rr-page-subtitle {
    color: #555;
    margin-top: 10px;
    font-size: 15px;
    padding-left: 28px;
  }

  .rr-card {
    background-color: #f8f8f8;
    padding: 32px;
    border-radius: 8px;
    border: none;
    box-shadow: none;
  }

  #InsertButton {
    padding-right: 20px;
  }

  #statuscode {
    display: none;
  }

  /* --- Form Field Adjustments --- */
  .entityform fieldset,
  .entityform .form-horizontal .form-group {
    margin-bottom: 15px !important;
  }

  .field-label {
    margin-bottom: 10px;
  }

  .entityform label {
    font-weight: 600;
    font-size: 13px;
    color: #222;
  }

  .entityform input,
  .entityform select,
  .entityform textarea {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    height: 40px !important;
    font-size: 14px;
  }

  .entityform input:focus,
  .entityform select:focus,
  .entityform textarea:focus,
  .form-control:focus {
    border-color: #5a5a5a !important;
  }

  /* --- Captcha Section --- */
  .entityform .captcha-container {
    background: none !important;
    border: none !important;
    margin-top: 15px !important;
  }

  /* --- Buttons --- */
  .entityform input[type="submit"],
  .btn-primary {
    background-color: #1e22aa !important;
    border-color: #1e22aa !important;
    color: #fff !important;
    padding: 10px 40px !important;
    font-weight: 600;
    transition: background-color 0.2s ease-in-out;
  }

  .entityform input[type="submit"]:hover,
  .btn-primary:hover {
    background-color: #0f1260 !important;
  }

  .alert.sr-only,
  .datetime,
  .captcha-cell > div > div > p > label {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  .rr-fair-link {
    color: #10069F !important;
    font-weight: 600;
    text-decoration: underline;
  }
  .rr-fair-link:hover {
    text-decoration: none;
    color: #0c0580 !important;
  }
  .modal-content {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }
  .modal-body {
    max-height: 70vh;
    overflow-y: auto;
  }

  #rrTermsAndConditions {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 10px;
  }
  #rrScrollHint {
    margin-top: 6px;
  }
  #rrAcceptTC[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
  }

  .modal-content {
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  }
  .btn-primary,
  .k-button.k-primary {
    background-color: #10069F !important;
    border-color: #10069F !important;
    font-weight: 600;
    font-size: 15px;
  }
  .modal-header h4 {
    font-weight: 600;
    color: rgb(255, 0, 0);
  }
  label, a, p {
    font: 16px RRPioneer, "Segoe UI", Arial, sans-serif !important;
  }

  label,
  .text-danger {
    font-weight: 300;
    color: #555;
    background: none !important;
  }
  .form-control::placeholder {
    color: #bebebe !important;
    font-weight: 100 !important;
  }

  .form-control,
  .form-control::placeholder {
    text-decoration: none !important;
  }

  .field-label::after {
    display: none;
  }

  .rr-captcha-submit-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-top: 25px;
    gap: 12px;
  }

  .rr-captcha-submit-row .g-recaptcha {
    transform: scale(0.86);
    transform-origin: left bottom;
    margin-top: 4px;
  }
  .clearfix.cell.checkbox-cell, div.info.required { padding-bottom: 0; }
  .captcha-cell { padding: 0 28px 20px; }
  .rr-captcha-submit-row #InsertButton,
  .rr-captcha-submit-row input[type="button"],
  .rr-captcha-submit-row .btn-primary {
    background-color: #10069F !important;
    border-color: #10069F !important;
    font-weight: 600;
    font-size: 15px;
    padding: 10px 45px !important;
    color: #fff !important;
    transition: background 0.2s ease-in-out;
  }
  .rr-captcha-submit-row #InsertButton:hover,
  .rr-captcha-submit-row .btn-primary:hover {
    background-color: #0b0470 !important;
  }
  .captcha-cell > div > div > p > input {
    border: 1px solid #ccc;
  }
  .captcha-cell > div > div > p > input { width: 100%; margin-top: 5px;}
  .captcha-cell > div > div > p > label { padding-top: 10px; padding-bottom: 10px; font-size: 16px; }

  .lookup.placeholder-active {
    color: #ccc;
  }

  /* Target Power Pages lookup dropdowns */
  select.lookup.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;

    padding-right: 2.5rem; 
  }

  @media (max-width: 767px) {
    .rr-captcha-submit-row {
      flex-direction: column;
      align-items: stretch;
    }
    .rr-captcha-submit-row .g-recaptcha {
      transform: scale(1);
      margin-bottom: 15px;
    }
    .rr-captcha-submit-row input[type="button"],
    .rr-captcha-submit-row .btn-primary {
      width: 100%;
    }
  }
  #InsertButton[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
  }

/* === Enterprise Registration Form Styling === */
.rr-registration-page {
  --rr-blue: #10069F;
  --rr-blue-dark: #03095E;
  --rr-blue-soft: rgba(16, 6, 159, 0.08);
  --rr-page: #f7f7fb;
  --rr-surface: #ffffff;
  --rr-text: #1f1f2e;
  --rr-muted: #5b5b6d;
  --rr-border: #d9d8ee;
  min-height: 100vh;
  background: linear-gradient(180deg, #ffffff 0%, var(--rr-page) 52%, #ffffff 100%);
  color: var(--rr-text);
  font-family: 'RR Pioneer', RRPioneer, 'Segoe UI', Arial, sans-serif;
}

.rr-registration-container {
  max-width: 1180px;
}

.rr-registration-breadcrumbs {
  padding-top: 0.75rem;
}

.rr-registration-shell {
  max-width: none;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 4rem) 0 clamp(3rem, 6vw, 5rem);
  font-family: 'RR Pioneer', RRPioneer, 'Segoe UI', Arial, sans-serif;
}

.rr-registration-intro {
  max-width: 760px;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.rr-registration-page .rr-section-label {
  margin: 0 0 0.5rem;
  color: var(--rr-blue);
  font-family: 'RR Pioneer', RRPioneer, 'Segoe UI', Arial, sans-serif !important;
  font-size: 0.82rem !important;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.rr-registration-page .rr-page-title {
  margin: 0;
  color: var(--rr-text);
  font-family: 'RR Pioneer', RRPioneer, 'Segoe UI', Arial, sans-serif !important;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.08;
}

.rr-registration-summary {
  max-width: 720px;
  margin: 1rem 0 0;
  color: var(--rr-muted);
  font-family: 'RR Pioneer', RRPioneer, 'Segoe UI', Arial, sans-serif !important;
  font-size: clamp(1rem, 1.4vw, 1.15rem) !important;
  line-height: 1.55;
}

.rr-registration-grid {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
}

.rr-registration-side-panel,
.rr-registration-page .rr-card {
  border: 1px solid var(--rr-border);
  border-radius: 6px;
  background: var(--rr-surface);
  box-shadow: 0 14px 32px rgba(3, 9, 94, 0.08);
}

.rr-registration-side-panel {
  position: sticky;
  top: 1.25rem;
  padding: clamp(1.25rem, 2vw, 1.5rem);
  border-top: 4px solid var(--rr-blue);
}

.rr-side-panel-label {
  margin: 0 0 1rem;
  color: var(--rr-blue);
  font-family: 'RR Pioneer', RRPioneer, 'Segoe UI', Arial, sans-serif !important;
  font-size: 0.8rem !important;
  font-weight: 700;
  text-transform: uppercase;
}

.rr-registration-progress {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rr-border);
}

.rr-progress-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--rr-blue-soft);
}

.rr-progress-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--rr-blue);
}

.rr-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  color: var(--rr-muted);
  font-size: 0.86rem;
}

.rr-progress-meta strong {
  color: var(--rr-blue-dark);
  font-size: 1rem;
}

.rr-registration-steps {
  display: grid;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rr-registration-steps li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: 0.75rem;
  row-gap: 0.15rem;
  align-items: start;
  color: var(--rr-text);
}

.rr-registration-steps span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--rr-blue-soft);
  color: var(--rr-blue);
  font-weight: 700;
}

.rr-registration-steps li.is-active span {
  background: var(--rr-blue);
  color: #ffffff;
}

.rr-registration-steps li.is-active strong {
  color: var(--rr-blue-dark);
}

.rr-registration-steps strong {
  font-size: 0.98rem;
  line-height: 1.3;
}

.rr-registration-steps em {
  grid-column: 2;
  color: var(--rr-muted);
  font-size: 0.84rem;
  font-style: normal;
  line-height: 1.35;
}

.rr-side-panel-note {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--rr-border);
  color: var(--rr-muted);
  font-size: 0.95rem !important;
  line-height: 1.45;
}

.rr-registration-page .rr-card {
  padding: clamp(1.25rem, 3vw, 2rem);
  flex-direction: column;
}

.rr-registration-page .rr-page-subtitle {
  margin: 0 0 1.25rem;
  padding-left: 0;
  color: var(--rr-muted);
  font-family: 'RR Pioneer', RRPioneer, 'Segoe UI', Arial, sans-serif !important;
  font-size: 1rem !important;
  line-height: 1.5;
}

.rr-registration-page .rr-form-support-text {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--rr-border);
}

.rr-registration-page .rr-form-support-text a,
.rr-registration-page #rrTermsAndConditions {
  color: var(--rr-blue) !important;
  font-weight: 700;
  text-decoration: underline !important;
  text-underline-offset: 0.18em;
}

body.rr-modal-open {
  overflow: hidden;
}

.rr-registration-page .rr-terms-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2rem);
  background: rgba(3, 9, 94, 0.46);
}

.rr-registration-page .rr-terms-modal.is-open {
  display: flex;
}

.rr-registration-page .rr-terms-modal-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1040px, 100%);
  height: min(820px, 92vh);
  overflow: hidden;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(3, 9, 94, 0.28);
}

.rr-registration-page .rr-terms-modal-header,
.rr-registration-page .rr-terms-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--rr-border);
}

.rr-registration-page .rr-terms-modal-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--rr-border);
  border-bottom: 0;
}

.rr-registration-page .rr-terms-modal-header h2 {
  margin: 0;
  color: var(--rr-text);
  font-family: 'RR Pioneer', RRPioneer, 'Segoe UI', Arial, sans-serif !important;
  font-size: 1.15rem;
  font-weight: 700;
}

.rr-registration-page .rr-terms-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--rr-text);
  font-size: 1.75rem;
  line-height: 1;
}

.rr-registration-page .rr-terms-modal-close:hover,
.rr-registration-page .rr-terms-modal-close:focus-visible {
  border-color: var(--rr-border);
  background: var(--rr-blue-soft);
  outline: 2px solid var(--rr-blue);
  outline-offset: 2px;
}

.rr-registration-page .rr-terms-modal-body {
  min-height: 0;
  background: #f7f7fb;
}

.rr-registration-page .rr-terms-modal-body iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}

.rr-registration-page .rr-terms-accept {
  min-height: 44px;
  padding: 0.7rem 1.25rem !important;
  border: 2px solid var(--rr-blue) !important;
  border-radius: 4px !important;
  background: var(--rr-blue) !important;
  color: #ffffff !important;
  font-family: 'RR Pioneer', RRPioneer, 'Segoe UI', Arial, sans-serif !important;
  font-weight: 700 !important;
}

.rr-registration-page .rr-terms-accept:hover,
.rr-registration-page .rr-terms-accept:focus-visible {
  background: #ffffff !important;
  color: var(--rr-blue) !important;
  outline: 2px solid var(--rr-blue);
  outline-offset: 2px;
}

.rr-registration-page .crmEntityFormView,
.rr-registration-page .entity-form,
.rr-registration-page .actions,
.rr-registration-page div.tab-clearfix,
.rr-registration-page div.tab-clearfix div,
.rr-registration-page div.tab-column,
.rr-registration-page div.tab-column div,
.rr-registration-page tbody,
.rr-registration-page td.clearfix.cell,
.rr-registration-page td.clearfix.cell.text.form-control-cell,
.rr-registration-page .tab,
.rr-registration-page .tab-column,
.rr-registration-page .fieldset,
.rr-registration-page .table {
  background: transparent !important;
}

.rr-registration-page .entityform fieldset,
.rr-registration-page .entityform .form-horizontal .form-group {
  margin-bottom: 1rem !important;
}

.rr-registration-page .entityform label,
.rr-registration-page label,
.rr-registration-page .field-label {
  color: var(--rr-text) !important;
  font-family: 'RR Pioneer', RRPioneer, 'Segoe UI', Arial, sans-serif !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  line-height: 1.35;
}

.rr-registration-page .entityform input,
.rr-registration-page .entityform select,
.rr-registration-page .entityform textarea,
.rr-registration-page .form-control,
.rr-registration-page select.lookup.form-control {
  width: 100%;
  min-height: 46px !important;
  border: 1px solid var(--rr-border) !important;
  border-radius: 4px !important;
  background-color: #ffffff !important;
  color: var(--rr-text) !important;
  font-family: 'RR Pioneer', RRPioneer, 'Segoe UI', Arial, sans-serif !important;
  font-size: 1rem !important;
  box-shadow: none !important;
}

.rr-registration-page .entityform input:focus,
.rr-registration-page .entityform select:focus,
.rr-registration-page .entityform textarea:focus,
.rr-registration-page .form-control:focus {
  border-color: var(--rr-blue) !important;
  outline: 2px solid var(--rr-blue) !important;
  outline-offset: 2px;
}

.rr-registration-page .form-control::placeholder {
  color: #7d7d8f !important;
  opacity: 1;
}

.rr-registration-page input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  margin-right: 0.5rem;
  accent-color: var(--rr-blue);
}

.rr-registration-page .checkbox-cell label,
.rr-registration-page #rr_termsandconditions_label {
  font-size: 0.95rem !important;
  font-weight: 600 !important;
}

.rr-registration-page .captcha-cell {
  padding: 0 0 1rem !important;
}

.rr-registration-page .captcha-cell img,
.rr-registration-page img[src*="captcha"] {
  max-width: 100%;
  height: auto;
  margin-bottom: 0.5rem;
}

.rr-registration-page .crmEntityFormView .actions {
  margin-top: 1.25rem;
  padding: 0;
  border-top: 0;
}

.rr-registration-page #InsertButton,
.rr-registration-page .entityform input[type="submit"],
.rr-registration-page .rr-captcha-submit-row #InsertButton,
.rr-registration-page .rr-captcha-submit-row .btn-primary {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.75rem 1.5rem !important;
  border: 2px solid var(--rr-blue) !important;
  border-radius: 4px !important;
  background: var(--rr-blue) !important;
  color: #ffffff !important;
  font-family: 'RR Pioneer', RRPioneer, 'Segoe UI', Arial, sans-serif !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  text-transform: none;
}

.rr-registration-page #InsertButton:hover:not([disabled]),
.rr-registration-page #InsertButton:focus-visible:not([disabled]) {
  background: #ffffff !important;
  color: var(--rr-blue) !important;
  outline: 2px solid var(--rr-blue);
  outline-offset: 3px;
}

.rr-registration-page #InsertButton[disabled] {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
}

.rr-registration-page .field-error,
.rr-registration-page .text-danger {
  color: #b3261e !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
}

@media (max-width: 991.98px) {
  .rr-registration-grid {
    grid-template-columns: 1fr;
  }

  .rr-registration-side-panel {
    position: static;
  }
}

@media (max-width: 576px) {
  .rr-registration-shell {
    padding-top: 1.5rem;
  }

  .rr-registration-page .rr-card,
  .rr-registration-side-panel {
    padding: 1rem;
  }

  .rr-registration-page #InsertButton,
  .rr-registration-page .entityform input[type="submit"] {
    width: 100%;
  }

  .rr-registration-page .rr-terms-modal {
    padding: 0.75rem;
  }

  .rr-registration-page .rr-terms-modal-panel {
    height: 94vh;
  }

  .rr-registration-page .rr-terms-modal-footer,
  .rr-registration-page .rr-terms-accept {
    width: 100%;
  }
}

/* === Shared Enterprise Registration Overlays === */
.rr-overlay {
  background: rgba(247, 247, 251, 0.94) !important;
  backdrop-filter: blur(6px);
  padding: 1.25rem !important;
}

.rr-overlay-card,
.rr-success-card {
  width: min(520px, 100%) !important;
  max-width: 520px !important;
  border: 1px solid #d9d8ee !important;
  border-top: 4px solid #10069F !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  padding: clamp(2rem, 5vw, 3rem) !important;
  box-shadow: 0 24px 60px rgba(3, 9, 94, 0.16) !important;
  font-family: 'RR Pioneer', RRPioneer, 'Segoe UI', Arial, sans-serif !important;
}

.rr-loader {
  width: 64px !important;
  height: 64px !important;
  margin: 0 auto 1.5rem !important;
  border: 4px solid rgba(16, 6, 159, 0.12) !important;
  border-top-color: #10069F !important;
  border-right-color: #10069F !important;
}

.rr-overlay-kicker {
  margin: 0 0 0.5rem !important;
  color: #10069F !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: uppercase;
}

.rr-overlay-title,
.rr-success-title {
  margin: 0 0 0.75rem !important;
  color: #1f1f2e !important;
  font-family: 'RR Pioneer', RRPioneer, 'Segoe UI', Arial, sans-serif !important;
  font-size: clamp(1.35rem, 3vw, 1.65rem) !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

.rr-overlay-text,
.rr-success-text {
  max-width: 390px;
  margin: 0 auto !important;
  color: #5b5b6d !important;
  font-size: 1rem !important;
  line-height: 1.55 !important;
}

.rr-success-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 56px !important;
  height: 56px !important;
  margin: 0 auto 1.25rem !important;
  border-radius: 50% !important;
  background: rgba(16, 6, 159, 0.08) !important;
  color: #10069F !important;
  font-size: 1.85rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

@media (max-width: 576px) {
  .rr-overlay-card,
  .rr-success-card {
    padding: 1.5rem !important;
  }
}