/* Chat asistență — FAB + panou, paleta ilaw.md */
.ilaw-help{
  position:fixed;right:20px;bottom:20px;z-index:48;
  font-family:var(--font)
}
.ilaw-help__fab{
  width:56px;height:56px;border:0;border-radius:50%;cursor:pointer;
  background:var(--navy);color:var(--gold-light);
  box-shadow:var(--shadow-pop);
  display:flex;align-items:center;justify-content:center;
  font-size:22px;line-height:1;
  transition:background .15s,transform .15s
}
.ilaw-help__fab:hover{background:var(--navy-active);color:#fff}
.ilaw-help__fab:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.ilaw-help.is-open .ilaw-help__fab{transform:scale(.92)}
.ilaw-help__fab-label{
  position:absolute;right:66px;top:50%;transform:translateY(-50%);
  background:var(--navy);color:var(--text-on-navy);
  font-size:12.5px;font-weight:800;letter-spacing:.02em;
  padding:7px 12px;border-radius:10px;white-space:nowrap;
  box-shadow:var(--shadow-card);pointer-events:none
}
.ilaw-help.is-open .ilaw-help__fab-label{display:none}

.ilaw-help__panel{
  position:absolute;right:0;bottom:68px;
  width:min(380px,calc(100vw - 24px));
  height:min(720px,calc(100vh - 88px));
  max-height:calc(100vh - 88px);
  background:var(--card);border:1px solid var(--border);border-radius:18px;
  box-shadow:var(--shadow-pop);
  display:none;flex-direction:column;overflow:hidden;min-height:0;
  overscroll-behavior:contain
}
.ilaw-help.is-open .ilaw-help__panel{display:flex}

.ilaw-help__head{
  background:var(--navy);color:var(--text-on-navy);
  padding:14px 16px 13px;display:flex;align-items:center;gap:12px;flex:0 0 auto
}
.ilaw-help__avatar{
  width:36px;height:36px;border-radius:10px;flex:0 0 36px;
  background:var(--navy-active);color:var(--gold-light);
  display:flex;align-items:center;justify-content:center;font-size:16px
}
.ilaw-help__head-text{flex:1;min-width:0}
.ilaw-help__title{font-size:14.5px;font-weight:800;margin:0;letter-spacing:-.2px;color:#fff}
.ilaw-help__sub{font-size:12px;font-weight:600;color:var(--text-on-navy-sub);margin:2px 0 0}
.ilaw-help__close{
  border:0;background:transparent;color:var(--text-on-navy-sub);cursor:pointer;
  width:32px;height:32px;border-radius:8px;font-size:18px;line-height:1
}
.ilaw-help__close:hover{background:var(--navy-active);color:#fff}

.ilaw-help__body{
  flex:1 1 auto;min-height:0;overflow:auto;padding:14px 14px 8px;
  background:var(--bg);display:flex;flex-direction:column;gap:10px;
  overscroll-behavior:contain;
  scrollbar-width:thin;scrollbar-color:var(--border) transparent
}
.ilaw-help.is-writing .ilaw-help__body{display:none}
.ilaw-help__msg{
  max-width:92%;padding:10px 12px;border-radius:14px;
  font-size:13.5px;line-height:1.5;font-weight:600
}
.ilaw-help__msg--bot{
  align-self:flex-start;background:var(--card);border:1px solid var(--border);
  color:var(--text);border-bottom-left-radius:5px
}
.ilaw-help__msg--user{
  align-self:flex-end;background:var(--navy);color:#fff;
  border-bottom-right-radius:5px;font-weight:700
}
.ilaw-help__msg a{color:var(--gold-text);font-weight:800}
.ilaw-help__msg--user a{color:var(--gold-light)}
.ilaw-help__msg p{margin:0 0 .55em}
.ilaw-help__msg p:last-child{margin:0}

.ilaw-help__chips{display:flex;flex-direction:column;gap:7px;margin-top:4px}
.ilaw-help__chip{
  text-align:left;border:1px solid var(--border);background:var(--card);
  border-radius:12px;padding:10px 12px;cursor:pointer;
  font-family:var(--font);font-size:13px;font-weight:700;color:var(--text);
  transition:border-color .15s,box-shadow .15s
}
.ilaw-help__chip:hover{border-color:var(--gold);box-shadow:var(--shadow-card);color:var(--text)}

.ilaw-help__foot{
  flex:0 0 auto;padding:10px 12px 12px;border-top:1px solid var(--border);
  background:var(--card);display:flex;flex-direction:column;gap:8px;min-height:0
}
.ilaw-help.is-writing .ilaw-help__foot{
  flex:1 1 auto;overflow:hidden
}
.ilaw-help__foot .btn{width:100%;flex:0 0 auto}
.ilaw-help.is-writing [data-help-form]:not([hidden]){
  display:flex;flex-direction:column;flex:1 1 auto;min-height:0;overflow:hidden
}

.ilaw-help__form{
  display:flex;flex-direction:column;gap:10px;flex:1 1 auto;min-height:0;overflow:hidden
}
.ilaw-help__form-fields{
  display:flex;flex-direction:column;gap:10px;flex:1 1 auto;min-height:0;
  overflow-y:auto;overflow-x:hidden;padding-right:2px;overscroll-behavior:contain;
  scrollbar-width:thin;scrollbar-color:var(--border) transparent
}
.ilaw-help__form-fields::-webkit-scrollbar{width:6px}
.ilaw-help__form-fields::-webkit-scrollbar-thumb{
  background:var(--border);border-radius:6px
}
.ilaw-help__form .field{gap:4px}
.ilaw-help__form .input,.ilaw-help__form .textarea{font-size:13.5px}
.ilaw-help__form .textarea{
  min-height:72px;max-height:140px;overflow-y:auto;resize:vertical
}
.ilaw-help__count{
  font-size:12px;font-weight:700;color:var(--text-muted);margin:0;text-align:right
}
.ilaw-help__count.is-max{color:var(--danger-bright)}
.ilaw-help__form .phone-input{margin-top:2px}
.ilaw-help .phone-input .select2-container{width:108px !important}
.phone-country-dropdown--help{z-index:80}
.ilaw-help__form .phone-input__hint{font-size:12px;margin:4px 0 0}
.ilaw-help__captcha{
  flex:0 0 auto;min-height:78px;overflow:visible;max-width:100%
}
.ilaw-help__captcha iframe{max-width:100%}
.ilaw-help__form-error{color:var(--danger-bright);font-size:12.5px;font-weight:800;margin:0}
.ilaw-help__signed{font-size:12px;font-weight:600;color:var(--text-muted);margin:0}

@media(max-width:560px){
  .ilaw-help{right:12px;bottom:12px}
  .ilaw-help__fab{width:52px;height:52px}
  .ilaw-help__fab-label{display:none}
  .ilaw-help.is-open .ilaw-help__panel{
    position:fixed;right:8px;left:8px;top:8px;bottom:72px;width:auto;
    height:auto;max-height:none
  }
  .ilaw-help.is-open.is-writing .ilaw-help__panel{bottom:8px}
  .ilaw-help.is-open.is-writing .ilaw-help__fab{display:none}
  /* Tot formularul (câmpuri + captcha + trimite) e un singur scroll — tastatura nu mai strivesc câmpurile. */
  .ilaw-help.is-writing .ilaw-help__foot{
    overflow:auto;min-height:0;-webkit-overflow-scrolling:touch
  }
  .ilaw-help.is-writing [data-help-form]:not([hidden]),
  .ilaw-help.is-writing .ilaw-help__form,
  .ilaw-help.is-writing .ilaw-help__form-fields{
    overflow:visible;flex:0 0 auto;height:auto;min-height:0
  }
  .ilaw-help__captcha{min-height:0}
  .ilaw-help__form .input,
  .ilaw-help__form .textarea,
  .ilaw-help__form .phone-input__number,
  .ilaw-help__form select.phone-input__country{
    font-size:16px !important
  }
  .phone-country-dropdown--help .select2-search__field{
    font-size:16px !important
  }
  .ilaw-help__form .textarea{max-height:110px}
}

/* Pagina din spate nu se mai mișcă cât e deschis chat-ul. */
html.ilaw-help-open,
html.ilaw-help-open body{
  overflow:hidden !important;
  overscroll-behavior:none;
  height:100%
}

/*
  Butonul de chat e position:fixed jos-dreapta pe toate paginile
  (client, avocat, public). Conținutul și barele sticky trebuie
  să lase loc, altfel ultimul CTA nimereste sub el.
*/
:root{
  --help-fab-size:56px;
  --help-fab-offset:20px;
  --help-fab-clearance:calc(var(--help-fab-offset) + var(--help-fab-size) + 14px)
}
.cabinet-main{
  padding-bottom:calc(34px + var(--help-fab-clearance))
}
.public-main{
  padding-bottom:var(--help-fab-clearance)
}
@media(max-width:1100px){
  .cabinet-main{
    padding-bottom:calc(20px + var(--help-fab-clearance))
  }
  .od-accept-bar{
    bottom:var(--help-fab-clearance);
    padding-bottom:16px
  }
}
@media(max-width:560px){
  :root{
    --help-fab-size:52px;
    --help-fab-offset:12px
  }
}
