/* Registration Patient Finder V2 — TEST
   Runtime enhancement only. Keeps the existing registration workflow and RPCs. */
#register-section.registration-workspace .registration-page-head.registration-page-head--patient-finder-v2{
  align-items:center;
  gap:18px;
  margin-bottom:12px;
}
#register-section.registration-workspace .registration-page-head.registration-page-head--patient-finder-v2>div:first-child{
  flex:0 0 auto;
}
#register-section.registration-workspace.is-thai-patient .registration-page-head .registration-search-panel.registration-patient-finder-v2,
#register-section.registration-workspace .registration-page-head .registration-search-panel.registration-patient-finder-v2{
  position:relative;
  display:grid;
  grid-template-columns:minmax(280px,1fr) 108px 132px;
  flex:1 1 720px;
  width:min(820px,100%);
  max-width:820px;
  gap:8px;
  margin:0 0 0 auto;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  overflow:visible;
}
#register-section.registration-workspace .registration-search-panel.registration-patient-finder-v2 input{
  min-width:0;
  min-height:46px;
  border:1px solid #cbd8da;
  border-radius:11px;
  padding:9px 13px 9px 39px;
  background:#fff;
  color:#172033;
  font-size:14px;
  outline:none;
  box-shadow:0 1px 2px rgba(15,23,42,.025);
}
#register-section.registration-workspace .registration-search-panel.registration-patient-finder-v2::before{
  content:'';
  position:absolute;
  left:13px;
  top:14px;
  z-index:1;
  width:18px;
  height:18px;
  pointer-events:none;
  opacity:.62;
  background:no-repeat center/18px 18px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6f75' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E");
}
#register-section.registration-workspace .registration-search-panel.registration-patient-finder-v2 input:focus{
  border-color:#00a997;
  box-shadow:0 0 0 3px rgba(0,169,151,.11);
}
#register-section.registration-workspace .registration-search-panel.registration-patient-finder-v2 .registration-search-button,
#register-section.registration-workspace.is-thai-patient .registration-search-panel.registration-patient-finder-v2 .registration-search-button{
  min-height:46px;
  border:1px solid #00a997;
  border-radius:11px;
  padding:8px 12px;
  background:#00a997;
  color:#fff;
  font-size:13px;
  font-weight:900;
  box-shadow:0 5px 14px rgba(0,169,151,.17);
}
#register-section.registration-workspace .registration-search-panel.registration-patient-finder-v2 .registration-search-button:hover,
#register-section.registration-workspace .registration-search-panel.registration-patient-finder-v2 .registration-search-button:focus-visible{
  border-color:#05958c;
  background:#05958c;
  box-shadow:0 0 0 3px rgba(5,149,140,.12),0 6px 16px rgba(5,149,140,.16);
}
#register-section.registration-workspace .registration-search-panel.registration-patient-finder-v2 .registration-new-button,
#register-section.registration-workspace.is-thai-patient .registration-search-panel.registration-patient-finder-v2 .registration-new-button{
  min-height:46px;
  border:1px solid #b9d5d2;
  border-radius:11px;
  padding:8px 12px;
  background:#fff;
  color:#36555a;
  font-size:13px;
  font-weight:900;
  box-shadow:none;
}
#register-section.registration-workspace .registration-search-panel.registration-patient-finder-v2 .registration-new-button:hover,
#register-section.registration-workspace .registration-search-panel.registration-patient-finder-v2 .registration-new-button:focus-visible{
  border-color:#00a997;
  background:#effaf8;
  color:#087a73;
  box-shadow:0 0 0 3px rgba(0,169,151,.08);
}
#register-section.registration-workspace .registration-search-panel.registration-patient-finder-v2 .registration-search-status{
  position:absolute;
  top:calc(100% + 5px);
  left:0;
  z-index:48;
  max-width:min(520px,100%);
  min-height:0;
  margin:0;
  padding:5px 8px;
  border-radius:8px;
  background:#fff;
  box-shadow:0 5px 16px rgba(15,23,42,.08);
}
#register-section.registration-workspace .registration-search-panel.registration-patient-finder-v2 .registration-search-status:empty{
  display:none;
}
.registration-patient-finder-results{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  right:0;
  z-index:55;
  max-height:min(570px,68vh);
  overflow:auto;
  overscroll-behavior:contain;
  border:1px solid #d4e2e0;
  border-radius:14px;
  background:#fff;
  box-shadow:0 18px 48px rgba(15,23,42,.16);
}
.registration-patient-finder-results[hidden]{display:none!important}
.registration-patient-finder-head{
  position:sticky;
  top:0;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border-bottom:1px solid #e7eeee;
  background:rgba(249,252,252,.97);
  backdrop-filter:blur(8px);
}
.registration-patient-finder-head strong{color:#263b40;font-size:12px;font-weight:900}
.registration-patient-finder-head span{color:#728287;font-size:10px;font-weight:700}
.registration-patient-finder-list{display:grid;padding:5px}
.registration-patient-finder-item{
  width:100%;
  border:0;
  border-radius:11px;
  padding:10px 11px;
  background:#fff;
  color:#24343a;
  text-align:left;
  cursor:pointer;
  outline:none;
  transition:background .14s,border-color .14s,box-shadow .14s;
}
.registration-patient-finder-item+.registration-patient-finder-item{border-top:1px solid #edf2f2;border-top-left-radius:0;border-top-right-radius:0}
.registration-patient-finder-item:hover,
.registration-patient-finder-item.is-active,
.registration-patient-finder-item:focus-visible{
  background:#effaf8;
  box-shadow:inset 3px 0 0 #00a997;
}
.registration-patient-finder-primary{display:flex;align-items:center;gap:8px;min-width:0}
.registration-patient-finder-name{min-width:0;overflow:hidden;color:#172b31;font-size:14px;font-weight:900;text-overflow:ellipsis;white-space:nowrap}
.registration-patient-finder-hn{
  flex:none;
  border:1px solid #c4e3df;
  border-radius:999px;
  padding:2px 7px;
  background:#f0faf8;
  color:#087a73;
  font-size:10px;
  font-weight:900;
  letter-spacing:.02em;
}
.registration-patient-finder-meta{
  display:flex;
  flex-wrap:wrap;
  gap:4px 10px;
  margin-top:5px;
  color:#6b7b82;
  font-size:11px;
  line-height:1.45;
}
.registration-patient-finder-match{
  margin-top:5px;
  color:#49696a;
  font-size:10px;
  line-height:1.5;
}
.registration-patient-finder-match strong{color:#087a73;font-weight:900}
.registration-patient-finder-snippet{
  margin-top:3px;
  overflow:hidden;
  color:#687a80;
  font-size:10px;
  line-height:1.45;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.registration-patient-finder-more{
  display:flex;
  justify-content:center;
  padding:8px 10px 10px;
  border-top:1px solid #edf2f2;
}
.registration-patient-finder-more button{
  min-height:36px;
  border:1px solid #b7d9d5;
  border-radius:9px;
  padding:6px 12px;
  background:#fff;
  color:#087a73;
  font-size:11px;
  font-weight:900;
}
.registration-patient-finder-more button:hover{border-color:#00a997;background:#effaf8}
.registration-patient-finder-empty,
.registration-patient-finder-loading{
  padding:18px 14px;
  color:#6c7d83;
  font-size:12px;
  font-weight:700;
  text-align:center;
}
.registration-patient-finder-loading::before{
  content:'';
  display:inline-block;
  width:15px;
  height:15px;
  margin-right:7px;
  vertical-align:-3px;
  border:2px solid #d8f4ef;
  border-top-color:#00a997;
  border-radius:50%;
  animation:registration-patient-finder-spin .7s linear infinite;
}
@keyframes registration-patient-finder-spin{to{transform:rotate(360deg)}}

@media (max-width:900px){
  #register-section.registration-workspace .registration-page-head.registration-page-head--patient-finder-v2{
    align-items:stretch;
    flex-wrap:wrap;
    gap:9px;
  }
  #register-section.registration-workspace .registration-page-head.registration-page-head--patient-finder-v2>div:first-child{width:100%}
  #register-section.registration-workspace.is-thai-patient .registration-page-head .registration-search-panel.registration-patient-finder-v2,
  #register-section.registration-workspace .registration-page-head .registration-search-panel.registration-patient-finder-v2{
    flex-basis:100%;
    width:100%;
    max-width:none;
    grid-template-columns:minmax(0,1fr) 104px 126px;
    margin:0;
  }
}
@media (max-width:620px){
  #register-section.registration-workspace.is-thai-patient .registration-page-head .registration-search-panel.registration-patient-finder-v2,
  #register-section.registration-workspace .registration-page-head .registration-search-panel.registration-patient-finder-v2{
    grid-template-columns:1fr 1fr;
    gap:7px;
  }
  #register-section.registration-workspace .registration-search-panel.registration-patient-finder-v2 input{
    grid-column:1/-1;
    min-height:45px;
    font-size:16px;
  }
  #register-section.registration-workspace .registration-search-panel.registration-patient-finder-v2::before{top:13px}
  #register-section.registration-workspace .registration-search-panel.registration-patient-finder-v2 .registration-search-button,
  #register-section.registration-workspace .registration-search-panel.registration-patient-finder-v2 .registration-new-button{
    min-height:43px;
  }
  .registration-patient-finder-results{top:calc(100% + 7px);max-height:62vh}
  .registration-patient-finder-name{white-space:normal}
  .registration-patient-finder-primary{align-items:flex-start}
}


/* R31 — identity thumbnails, readable phones, local recent-search history */
.registration-patient-finder-item-layout{
  display:grid;
  grid-template-columns:48px minmax(0,1fr);
  gap:10px;
  align-items:start;
  width:100%;
}
.registration-patient-finder-copy{
  display:block;
  min-width:0;
}
.registration-patient-finder-photo{
  display:grid;
  width:48px;
  height:48px;
  place-items:center;
  overflow:hidden;
  border:1px solid #cfe4e1;
  border-radius:11px;
  background:linear-gradient(180deg,#f3fbfa,#eaf7f5);
  color:#087a73;
}
.registration-patient-finder-photo img{
  width:100%;
  height:100%;
  object-fit:cover;
  background:#fff;
}
.registration-patient-finder-photo img[hidden],
.registration-patient-finder-photo-fallback[hidden]{display:none!important}
.registration-patient-finder-photo-fallback{
  display:grid;
  width:100%;
  height:100%;
  place-items:center;
}
.registration-patient-finder-photo-fallback .ui-icon{
  width:22px;
  height:22px;
  opacity:.72;
}
.registration-patient-finder-phone{
  display:block;
  margin-top:5px;
  color:#1f4044;
  font-size:14px;
  font-weight:900;
  line-height:1.2;
  letter-spacing:.012em;
  font-variant-numeric:tabular-nums;
}
.registration-patient-finder-meta{
  margin-top:4px;
}
.registration-patient-finder-history-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border-bottom:1px solid #e7eeee;
  background:#f9fcfc;
}
.registration-patient-finder-history-head strong{
  color:#263b40;
  font-size:12px;
  font-weight:900;
}
.registration-patient-finder-history-head button{
  border:0;
  background:transparent;
  color:#718186;
  font-size:10px;
  font-weight:800;
}
.registration-patient-finder-history-head button:hover,
.registration-patient-finder-history-head button:focus-visible{
  color:#087a73;
  text-decoration:underline;
}
.registration-patient-finder-history-list{
  display:grid;
  padding:5px;
}
.registration-patient-finder-history-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 34px;
  align-items:center;
  border-bottom:1px solid #edf2f2;
}
.registration-patient-finder-history-row:last-child{border-bottom:0}
.registration-patient-finder-history-query{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
  border:0;
  border-radius:10px;
  padding:9px 8px;
  background:#fff;
  color:#263b40;
  text-align:left;
}
.registration-patient-finder-history-query:hover,
.registration-patient-finder-history-query:focus-visible{
  background:#effaf8;
  outline:none;
}
.registration-patient-finder-history-query>span:last-child{
  display:grid;
  min-width:0;
}
.registration-patient-finder-history-query strong{
  overflow:hidden;
  color:#263b40;
  font-size:12px;
  font-weight:850;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.registration-patient-finder-history-query small{
  margin-top:1px;
  color:#829095;
  font-size:9px;
  font-weight:700;
}
.registration-patient-finder-history-clock{
  display:grid;
  width:27px;
  height:27px;
  flex:none;
  place-items:center;
  border-radius:50%;
  background:#eaf8f6;
  color:#087a73;
  font-size:15px;
  font-weight:900;
}
.registration-patient-finder-history-delete{
  display:grid;
  width:30px;
  height:30px;
  place-items:center;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#9aa7aa;
  font-size:18px;
  line-height:1;
}
.registration-patient-finder-history-delete:hover,
.registration-patient-finder-history-delete:focus-visible{
  background:#fff3f1;
  color:#b84d42;
  outline:none;
}
@media (max-width:620px){
  .registration-patient-finder-item-layout{grid-template-columns:44px minmax(0,1fr);gap:8px}
  .registration-patient-finder-photo{width:44px;height:44px;border-radius:10px}
  .registration-patient-finder-phone{font-size:13px}
}
