/* Shared user-facing form layouts for profile-style pages. */

#userProfileForm #profileContactPanel > .profileContactGrid,
#userProfileForm #profilePartnerPanel > .userFormSectionGrid,
#userProfileForm #profileExternalCounsellorPanel > .userFormSectionGrid,
#myOrganizationForm #myOrganizationInfoPanel > .userFormSectionGrid,
#externalHelperReferralForm,
#referralForm {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

#userProfileForm #profileContactPanel > .profileContactGrid,
#userProfileForm #profilePartnerPanel > .userFormSectionGrid,
#userProfileForm #profileExternalCounsellorPanel > .userFormSectionGrid,
#myOrganizationForm #myOrganizationInfoPanel > .userFormSectionGrid {
  padding: 0 18px 18px;
}

#userProfileForm #profileContactPanel .adminField,
#userProfileForm #profilePartnerPanel .adminField,
#userProfileForm #profileExternalCounsellorPanel .adminField,
#myOrganizationForm #myOrganizationInfoPanel .adminField,
#externalHelperReferralForm .adminField,
#referralForm .adminField {
  min-width: 0;
}

.userFormSectionPad {
  padding: 0 18px 18px;
}

.profileContactHalfOnly,
.userFormHalfOnly {
  grid-column: 1 / 2;
}

.profileExternalCounsellorAction {
  display: flex;
  align-items: end;
  justify-content: flex-end;
}

.profileExternalConsentBlock {
  display: grid;
  gap: 10px;
  color: #123d74;
  font-weight: 700;
  line-height: 1.5;
}

.profileExternalConsentActions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.userFormsLoadingCapsule {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: #efe7ff;
  color: #6f2b8c;
  font-weight: 800;
}

.readonlyField {
  background: #eef2f7 !important;
  color: #64748b !important;
  cursor: not-allowed;
}

.orgHierarchyRoot {
  position: relative;
  padding-top: 30px;
}

.twoFactorSetupWrap {
  display: grid;
  gap: 14px;
  max-width: 520px;
}

.twoFactorSetupIntro {
  color: #334155;
  line-height: 1.45;
}

.twoFactorQrImage {
  width: 220px;
  height: 220px;
  object-fit: contain;
  border: 2px solid #d9e2f2;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}

.twoFactorSecretText {
  font-family: "Courier New", monospace;
  font-size: 18px;
  color: #475569;
  word-break: break-all;
}

.twoFactorCodeField {
  max-width: 320px;
}

@media (max-width: 760px) {
  #userProfileForm #profileContactPanel > .profileContactGrid,
  #userProfileForm #profilePartnerPanel > .userFormSectionGrid,
  #userProfileForm #profileExternalCounsellorPanel > .userFormSectionGrid,
  #myOrganizationForm #myOrganizationInfoPanel > .userFormSectionGrid,
  #externalHelperReferralForm,
  #referralForm {
    grid-template-columns: minmax(0, 1fr);
  }

  .profileContactHalfOnly,
  .userFormHalfOnly {
    grid-column: 1 / -1;
  }

  .profileExternalCounsellorAction {
    justify-content: flex-start;
  }
}
