/* === 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;
  }