/* =========================================================
   HomeStrengthRecovery Gear Match Finder
   Fixed compact finder. Only final results scroll internally.
========================================================= */

body.hsrgmf-open{overflow:hidden!important}

.hsrgmf-root,
.hsrgmf-root *{box-sizing:border-box!important}

.hsrgmf-root{
  --red:#E10600;
  --red-dark:#B90400;
  --red-soft:#FFF2F1;
  --black:#111111;
  --text:#2B2B2B;
  --muted:#686B70;
  --soft:#F8F8F8;
  --soft-2:#F2F2F2;
  --white:#FFFFFF;
  --border:#DEDEDE;
  --border-soft:#ECECEC;
  position:fixed!important;
  inset:0!important;
  z-index:999998!important;
  pointer-events:none!important;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif!important;
  color:var(--text)!important;
  -webkit-font-smoothing:antialiased!important;
  -moz-osx-font-smoothing:grayscale!important;
  text-rendering:optimizeLegibility!important;
}

.hsrgmf-root button,
.hsrgmf-root a,
.hsrgmf-root h2,
.hsrgmf-root h3,
.hsrgmf-root p,
.hsrgmf-root span,
.hsrgmf-root small,
.hsrgmf-root em{
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif!important;
}

.hsrgmf-backdrop{
  position:fixed!important;
  inset:0!important;
  background:rgba(17,17,17,.64)!important;
  backdrop-filter:blur(3px)!important;
  -webkit-backdrop-filter:blur(3px)!important;
  pointer-events:auto!important;
}

/* Intro and question modal stays fixed. No internal scrolling here. */
.hsrgmf-modal{
  position:fixed!important;
  left:50%!important;
  top:50%!important;
  transform:translate(-50%,-50%)!important;
  width:min(92vw,620px)!important;
  max-height:min(88dvh,480px)!important;
  overflow:hidden!important;
  background:#fff!important;
  border:1px solid var(--border)!important;
  border-top:4px solid var(--red)!important;
  border-radius:14px!important;
  box-shadow:0 24px 64px rgba(0,0,0,.23)!important;
  pointer-events:auto!important;
  color:var(--text)!important;
}

/* Only results get a larger fixed shell and internal scroll. */
.hsrgmf-modal.is-results{
  width:min(94vw,900px)!important;
  height:min(82dvh,680px)!important;
  max-height:min(82dvh,680px)!important;
}

.hsrgmf-close{
  position:absolute!important;
  z-index:10!important;
  right:9px!important;
  top:8px!important;
  width:29px!important;
  height:29px!important;
  min-width:29px!important;
  min-height:29px!important;
  margin:0!important;
  padding:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid var(--border)!important;
  border-radius:50%!important;
  background:#fff!important;
  color:var(--black)!important;
  box-shadow:none!important;
  font-size:19px!important;
  line-height:1!important;
  font-weight:400!important;
  cursor:pointer!important;
}

.hsrgmf-close:hover{
  background:var(--soft)!important;
  border-color:rgba(225,6,0,.35)!important;
  color:var(--red)!important;
}

.hsrgmf-panel{
  width:100%!important;
  padding:16px 18px 15px!important;
  overflow:hidden!important;
  background:#fff!important;
}

.hsrgmf-intro,
.hsrgmf-loading{
  min-height:220px!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
}

.hsrgmf-question{padding-top:14px!important}

.hsrgmf-kicker{
  margin:0 0 5px!important;
  color:var(--red)!important;
  font-size:8.8px!important;
  line-height:1.1!important;
  font-weight:750!important;
  letter-spacing:.12em!important;
  text-transform:uppercase!important;
}

.hsrgmf-modal h2{
  margin:0!important;
  padding-right:28px!important;
  color:var(--black)!important;
  font-size:clamp(24px,3vw,31px)!important;
  line-height:1.08!important;
  font-weight:800!important;
  letter-spacing:-.035em!important;
}

.hsrgmf-sub{
  max-width:570px!important;
  margin:6px 0 0!important;
  color:var(--muted)!important;
  font-size:12px!important;
  line-height:1.45!important;
  font-weight:400!important;
}

.hsrgmf-badges{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:5px!important;
  margin:10px 0 12px!important;
}

.hsrgmf-badges span{
  display:inline-flex!important;
  align-items:center!important;
  min-height:24px!important;
  padding:4px 8px!important;
  border:1px solid var(--border)!important;
  border-radius:6px!important;
  background:var(--soft)!important;
  color:var(--black)!important;
  font-size:8.8px!important;
  line-height:1!important;
  font-weight:650!important;
}

.hsrgmf-badges span:first-child{
  border-color:rgba(225,6,0,.20)!important;
  background:var(--red-soft)!important;
  color:var(--red-dark)!important;
}

.hsrgmf-progress{
  height:4px!important;
  margin:0!important;
  background:var(--soft-2)!important;
  overflow:hidden!important;
}

.hsrgmf-progress span{
  display:block!important;
  height:100%!important;
  background:var(--red)!important;
  transition:width .18s ease!important;
}

.hsrgmf-answers{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px!important;
  margin-top:9px!important;
}

.hsrgmf-answer{
  width:100%!important;
  min-height:58px!important;
  margin:0!important;
  padding:8px 9px!important;
  display:block!important;
  text-align:left!important;
  border:1px solid var(--border)!important;
  border-radius:9px!important;
  background:#fff!important;
  color:var(--text)!important;
  box-shadow:none!important;
  cursor:pointer!important;
  transition:border-color .16s ease,background-color .16s ease,transform .16s ease!important;
}

.hsrgmf-answer:hover{
  border-color:rgba(225,6,0,.40)!important;
  background:var(--red-soft)!important;
  transform:translateY(-1px)!important;
}

.hsrgmf-answer span{
  display:block!important;
  color:var(--black)!important;
  font-size:11.8px!important;
  line-height:1.18!important;
  font-weight:720!important;
}

.hsrgmf-answer small{
  display:block!important;
  margin-top:3px!important;
  color:var(--muted)!important;
  font-size:9.2px!important;
  line-height:1.24!important;
  font-weight:400!important;
}

.hsrgmf-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:7px!important;
  margin-top:9px!important;
}

.hsrgmf-actions-start{justify-content:flex-start!important}

.hsrgmf-btn,
.hsrgmf-link{
  min-height:35px!important;
  margin:0!important;
  padding:7px 12px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:7px!important;
  font-size:10.3px!important;
  line-height:1!important;
  font-weight:680!important;
  text-decoration:none!important;
  cursor:pointer!important;
  transition:.16s ease!important;
}

.hsrgmf-btn{
  border:1px solid var(--red)!important;
  background:var(--red)!important;
  color:#fff!important;
}

.hsrgmf-btn:hover{
  background:var(--black)!important;
  border-color:var(--black)!important;
  color:#fff!important;
}

.hsrgmf-link{
  border:1px solid var(--border)!important;
  background:#fff!important;
  color:var(--black)!important;
}

.hsrgmf-link:hover{
  border-color:rgba(225,6,0,.35)!important;
  color:var(--red)!important;
  background:var(--soft)!important;
}

.hsrgmf-link:disabled{opacity:.38!important;cursor:not-allowed!important}

.hsrgmf-spinner{
  width:31px!important;
  height:31px!important;
  margin:0 0 9px!important;
  border:3px solid var(--soft-2)!important;
  border-top-color:var(--red)!important;
  border-radius:50%!important;
  animation:hsrgmf-spin .8s linear infinite!important;
}

@keyframes hsrgmf-spin{to{transform:rotate(360deg)}}

/* Compact fixed trigger. */
.hsrgmf-floating{
  position:fixed!important;
  right:20px!important;
  bottom:22px!important;
  z-index:999997!important;
  min-height:38px!important;
  margin:0!important;
  padding:8px 13px!important;
  display:none!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  border:1px solid var(--red)!important;
  border-radius:8px!important;
  background:var(--red)!important;
  color:#fff!important;
  box-shadow:0 10px 24px rgba(0,0,0,.16)!important;
  pointer-events:auto!important;
  font-size:10.8px!important;
  line-height:1!important;
  font-weight:700!important;
  cursor:pointer!important;
}

.hsrgmf-floating.is-visible{display:flex!important}
.hsrgmf-floating:hover{background:var(--black)!important;border-color:var(--black)!important}

.hsrgmf-floating-icon{
  width:17px!important;
  height:17px!important;
  flex:0 0 17px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid rgba(255,255,255,.48)!important;
  border-radius:50%!important;
  font-size:10px!important;
  line-height:1!important;
  font-weight:800!important;
}

/* =========================================================
   RESULTS: THE ONLY INTERNALLY SCROLLABLE VIEW
========================================================= */

.hsrgmf-results-scroll{
  width:100%!important;
  height:100%!important;
  max-height:100%!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  scrollbar-width:thin!important;
  scrollbar-color:var(--red) var(--soft)!important;
}

.hsrgmf-results-scroll::-webkit-scrollbar{width:7px!important}
.hsrgmf-results-scroll::-webkit-scrollbar-track{background:var(--soft)!important}
.hsrgmf-results-scroll::-webkit-scrollbar-thumb{background:var(--red)!important;border-radius:10px!important}

.hsrgmf-result-head{
  padding:16px 20px 12px!important;
  background:var(--soft)!important;
  border-bottom:1px solid var(--border)!important;
}

.hsrgmf-result-head h2{font-size:clamp(23px,2.8vw,31px)!important}

.hsrgmf-result-head > p:not(.hsrgmf-kicker){
  max-width:680px!important;
  margin:5px 0 0!important;
  color:var(--muted)!important;
  font-size:11.2px!important;
  line-height:1.42!important;
  font-weight:400!important;
}

.hsrgmf-result-section{padding:12px 18px 0!important}
.hsrgmf-section-title{margin:0 0 7px!important}

.hsrgmf-section-title h3{
  margin:0!important;
  color:var(--black)!important;
  font-size:15.5px!important;
  line-height:1.2!important;
  font-weight:760!important;
  letter-spacing:-.018em!important;
}

.hsrgmf-section-title p{
  margin:2px 0 0!important;
  color:var(--muted)!important;
  font-size:9.6px!important;
  line-height:1.32!important;
  font-weight:400!important;
}

.hsrgmf-products{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px!important;
}

.hsrgmf-product{
  min-width:0!important;
  min-height:94px!important;
  padding:8px!important;
  display:grid!important;
  grid-template-columns:72px minmax(0,1fr)!important;
  gap:9px!important;
  align-items:center!important;
  border:1px solid var(--border)!important;
  border-radius:9px!important;
  background:#fff!important;
  color:var(--text)!important;
  text-decoration:none!important;
  box-shadow:0 3px 10px rgba(0,0,0,.025)!important;
  transition:.16s ease!important;
}

.hsrgmf-product:hover{
  border-color:rgba(225,6,0,.34)!important;
  background:#FFFCFC!important;
  transform:translateY(-1px)!important;
  color:var(--text)!important;
}

.hsrgmf-product-media{
  width:72px!important;
  height:72px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
  border:1px solid var(--border-soft)!important;
  border-radius:7px!important;
  background:#fff!important;
}

.hsrgmf-product-media img{
  width:90%!important;
  height:90%!important;
  max-width:90%!important;
  max-height:90%!important;
  margin:0!important;
  padding:0!important;
  display:block!important;
  object-fit:contain!important;
  background:#fff!important;
}

.hsrgmf-product-copy{min-width:0!important;display:block!important}

.hsrgmf-product em,
.hsrgmf-guide em{
  display:inline-flex!important;
  margin:0 0 3px!important;
  padding:3px 6px!important;
  border:1px solid rgba(225,6,0,.16)!important;
  border-radius:4px!important;
  background:var(--red-soft)!important;
  color:var(--red-dark)!important;
  font-size:7.9px!important;
  line-height:1!important;
  font-style:normal!important;
  font-weight:680!important;
}

.hsrgmf-product h3{
  margin:0 0 3px!important;
  display:-webkit-box!important;
  overflow:hidden!important;
  -webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;
  color:var(--black)!important;
  font-size:11px!important;
  line-height:1.23!important;
  font-weight:700!important;
}

.hsrgmf-price{
  margin:0 0 3px!important;
  color:var(--red-dark)!important;
  font-size:10.3px!important;
  line-height:1.2!important;
  font-weight:750!important;
}

.hsrgmf-price del{opacity:.5!important;margin-right:3px!important}

.hsrgmf-product small{
  display:block!important;
  color:var(--muted)!important;
  font-size:8.8px!important;
  line-height:1.26!important;
  font-weight:400!important;
}

.hsrgmf-guides{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px!important;
}

.hsrgmf-guide{
  min-width:0!important;
  padding:9px 10px!important;
  display:block!important;
  border:1px solid var(--border)!important;
  border-radius:8px!important;
  background:#fff!important;
  color:var(--text)!important;
  text-decoration:none!important;
  transition:.16s ease!important;
}

.hsrgmf-guide:hover{
  border-color:rgba(225,6,0,.32)!important;
  background:var(--soft)!important;
  color:var(--text)!important;
}

.hsrgmf-guide h3{
  margin:0 0 3px!important;
  color:var(--black)!important;
  font-size:11.8px!important;
  line-height:1.22!important;
  font-weight:700!important;
}

.hsrgmf-guide p{
  margin:0 0 3px!important;
  display:-webkit-box!important;
  overflow:hidden!important;
  -webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;
  color:var(--muted)!important;
  font-size:9.4px!important;
  line-height:1.30!important;
  font-weight:400!important;
}

.hsrgmf-guide small{
  display:block!important;
  color:var(--red-dark)!important;
  font-size:8.8px!important;
  line-height:1.26!important;
  font-weight:600!important;
}

.hsrgmf-result-actions{
  display:flex!important;
  justify-content:flex-end!important;
  gap:7px!important;
  padding:12px 18px 15px!important;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media(max-width:700px){
  .hsrgmf-modal{
    width:calc(100vw - 20px)!important;
    max-height:89dvh!important;
    border-radius:12px!important;
  }

  .hsrgmf-modal.is-results{
    width:calc(100vw - 16px)!important;
    height:88dvh!important;
    max-height:88dvh!important;
  }

  .hsrgmf-panel{padding:15px 13px 13px!important}
  .hsrgmf-intro,.hsrgmf-loading{min-height:210px!important}
  .hsrgmf-modal h2{font-size:23px!important}
  .hsrgmf-sub{font-size:11.5px!important;line-height:1.40!important}
  .hsrgmf-badges{margin:9px 0 11px!important;gap:4px!important}
  .hsrgmf-badges span{font-size:8.2px!important;padding:4px 6px!important;min-height:22px!important}
  .hsrgmf-answers{gap:6px!important;margin-top:8px!important}
  .hsrgmf-answer{min-height:59px!important;padding:7px 8px!important}
  .hsrgmf-answer span{font-size:10.6px!important}
  .hsrgmf-answer small{font-size:8.5px!important;line-height:1.20!important}
  .hsrgmf-actions{margin-top:8px!important}
  .hsrgmf-btn,.hsrgmf-link{min-height:33px!important;padding:6px 10px!important;font-size:9.8px!important}
  .hsrgmf-floating{right:13px!important;bottom:17px!important;min-height:36px!important;padding:7px 11px!important;font-size:10.3px!important}
  .hsrgmf-result-head{padding:14px 14px 11px!important}
  .hsrgmf-result-head h2{font-size:23px!important}
  .hsrgmf-result-section{padding:10px 11px 0!important}
  .hsrgmf-products,.hsrgmf-guides{grid-template-columns:1fr!important;gap:6px!important}
  .hsrgmf-product{grid-template-columns:66px minmax(0,1fr)!important;min-height:84px!important;padding:7px!important}
  .hsrgmf-product-media{width:66px!important;height:66px!important}
  .hsrgmf-result-actions{padding:10px 11px 13px!important}
}

@media(max-width:390px){
  .hsrgmf-panel{padding:14px 11px 12px!important}
  .hsrgmf-modal h2{font-size:21.5px!important}
  .hsrgmf-answers{grid-template-columns:1fr 1fr!important}
  .hsrgmf-answer{min-height:57px!important;padding:7px!important}
  .hsrgmf-answer span{font-size:9.9px!important}
  .hsrgmf-answer small{font-size:7.9px!important}
}

@media(prefers-reduced-motion:reduce){
  .hsrgmf-root *{transition:none!important;animation-duration:.001ms!important}
}
