/* YR-004 — compact, dismissible Yarak help entry point. */
.ir-yarak-help{
  position:fixed;
  left:max(72px,calc((100vw - 1180px)/2 + 72px));
  bottom:calc(18px + env(safe-area-inset-bottom));
  z-index:1075;
  display:block!important;
  width:max-content;
  max-width:calc(100vw - 24px);
  direction:rtl;
  opacity:1!important;
  visibility:visible!important;
  pointer-events:auto;
  font-family:Vazirmatn,Kalameh,sans-serif;
}
.ir-yarak-help__panel[hidden]{display:none!important}
.ir-yarak-help__panel{
  position:absolute;
  left:0;
  bottom:74px;
  width:318px;
  max-width:calc(100vw - 24px);
  padding:16px;
  border:1px solid rgba(18,145,137,.18);
  border-radius:20px;
  background:linear-gradient(145deg,#ffffff 0%,#fffdf7 64%,#f2fffb 100%);
  box-shadow:0 18px 45px rgba(15,23,42,.16);
  color:#172033;
}
.ir-yarak-help__close{
  position:absolute;
  left:9px;
  top:8px;
  display:flex;
  width:28px;
  height:28px;
  align-items:center;
  justify-content:center;
  border:0;
  border-radius:50%;
  background:#f5f7f8;
  color:#76808c;
  font-size:20px;
  line-height:1;
  cursor:pointer;
}
.ir-yarak-help__panel-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) 88px;
  gap:10px;
  align-items:center;
}
.ir-yarak-help__panel-visual{
  grid-column:2;
  display:flex;
  width:88px;
  height:96px;
  align-items:flex-end;
  justify-content:center;
}
.ir-yarak-help__panel-visual img{
  display:block;
  width:88px;
  height:auto;
  max-height:100px;
  object-fit:contain;
  filter:drop-shadow(0 9px 10px rgba(15,23,42,.10));
}
.ir-yarak-help__copy{grid-column:1;grid-row:1;min-width:0;text-align:right}
.ir-yarak-help__copy>span{
  display:inline-flex;
  min-height:24px;
  align-items:center;
  padding:0 8px;
  border-radius:999px;
  background:#edf9f7;
  color:#087d76;
  font-size:9.5px;
  font-weight:900;
}
.ir-yarak-help__copy strong{
  display:block;
  margin-top:6px;
  color:#172033;
  font-size:14px;
  font-weight:950;
  line-height:1.7;
}
.ir-yarak-help__copy p{
  margin:3px 0 0;
  color:#737c89;
  font-size:10.5px;
  font-weight:600;
  line-height:1.9;
}
.ir-yarak-help__actions{
  display:grid;
  grid-template-columns:1fr 1.15fr;
  gap:8px;
  margin-top:12px;
}
.ir-yarak-help__action{
  display:flex;
  min-height:38px;
  align-items:center;
  justify-content:center;
  border-radius:11px;
  text-decoration:none;
  font-size:10.5px;
  font-weight:900;
  transition:transform .16s ease,box-shadow .16s ease,background .16s ease;
}
.ir-yarak-help__action:hover{transform:translateY(-1px)}
.ir-yarak-help__action--primary{
  background:#f5a30a;
  color:#172033;
  box-shadow:0 7px 16px rgba(245,163,10,.20);
}
.ir-yarak-help__action--soft{
  border:1px solid #e3e9ea;
  background:#fff;
  color:#4d5663;
}
.ir-yarak-help__trigger{
  display:flex!important;
  min-height:58px;
  align-items:center;
  gap:8px;
  padding:3px 13px 3px 14px;
  border:1px solid rgba(18,145,137,.18);
  border-radius:999px;
  background:rgba(255,255,255,.96);
  box-shadow:0 10px 28px rgba(15,23,42,.13);
  color:#172033;
  cursor:pointer;
  backdrop-filter:blur(10px);
}
/* Keep the floating portrait strictly circular even when the shared size class
   (.ir-yarak--sm) is loaded before/after this component. */
.ir-yarak-help .ir-yarak-help__trigger-visual{
  display:grid!important;
  width:50px!important;
  height:50px!important;
  min-width:50px!important;
  min-height:50px!important;
  max-width:50px!important;
  max-height:50px!important;
  flex:0 0 50px!important;
  aspect-ratio:1/1;
  place-items:center;
  overflow:hidden;
  box-sizing:border-box;
  padding:3px;
  border-radius:50%!important;
  background:radial-gradient(circle at 50% 42%,#f4fffc 0%,#fff7e8 72%);
}
.ir-yarak-help .ir-yarak-help__trigger-visual img{
  display:block;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  margin:auto;
  transform:none!important;
  object-fit:contain!important;
  object-position:center center!important;
}
.ir-yarak-help__trigger-copy{text-align:right;white-space:nowrap}
.ir-yarak-help__trigger-copy strong{display:block;font-size:11px;font-weight:950;line-height:1.5}
.ir-yarak-help__trigger-copy small{display:block;margin-top:1px;color:#7b8490;font-size:8.5px;font-weight:700}
.ir-yarak-help__trigger:focus-visible,
.ir-yarak-help__close:focus-visible,
.ir-yarak-help__action:focus-visible{
  outline:2px solid #0d9488;
  outline-offset:3px;
}

@media(max-width:1023px){
  .ir-yarak-help{
    left:72px;
    bottom:calc(14px + env(safe-area-inset-bottom));
    display:block!important;
    opacity:1!important;
    visibility:visible!important;
  }
  .ir-yarak-help__trigger{
    width:54px;
    min-width:54px;
    min-height:54px;
    padding:2px!important;
    justify-content:center;
  }
  .ir-yarak-help .ir-yarak-help__trigger-visual{
    width:48px!important;
    height:48px!important;
    min-width:48px!important;
    min-height:48px!important;
    max-width:48px!important;
    max-height:48px!important;
    flex-basis:48px!important;
    padding:3px;
  }
  .ir-yarak-help__trigger-copy{display:none}
  .ir-yarak-help__panel{bottom:64px;width:min(306px,calc(100vw - 84px));padding:14px}
}

html.dark .ir-yarak-help__panel{
  border-color:rgba(59,203,190,.20);
  background:linear-gradient(145deg,#101d2a 0%,#142332 65%,#17222b 100%);
  box-shadow:0 18px 45px rgba(0,0,0,.30);
  color:#f4f7fa;
}
html.dark .ir-yarak-help__close{background:#1e2c39;color:#aeb7c1}
html.dark .ir-yarak-help__copy>span{background:rgba(39,181,168,.12);color:#68ddd2}
html.dark .ir-yarak-help__copy strong{color:#f7f9fb}
html.dark .ir-yarak-help__copy p{color:#a5afbc}
html.dark .ir-yarak-help__action--soft{border-color:#31404d;background:#172533;color:#d7dde4}
html.dark .ir-yarak-help__trigger{
  border-color:rgba(59,203,190,.20);
  background:rgba(16,29,42,.95);
  color:#f5f8fb;
  box-shadow:0 10px 28px rgba(0,0,0,.24);
}
html.dark .ir-yarak-help__trigger-copy small{color:#a7b1bd}
