#wpaic-root{--y:#ffcc4d;--wpaic-bottom:94px;--wpaic-edge:18px;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;z-index:999999;position:relative}
#wpaic-root[data-side="right"] .wpaic-launcher,#wpaic-root[data-side="right"] .wpaic-panel{right:var(--wpaic-edge);left:auto}
#wpaic-root[data-side="left"] .wpaic-launcher,#wpaic-root[data-side="left"] .wpaic-panel{left:var(--wpaic-edge);right:auto}


.wpaic-launcher{
  position:fixed;
  bottom:var(--wpaic-bottom);
  border:0;
  border-radius:999px;
  background:#f7f7f7;
  color:#111;
  width:82px;
  min-width:82px;
  height:82px;
  padding:6px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:0;
  overflow:hidden;
  box-shadow:0 14px 38px rgba(0,0,0,.18);
  cursor:pointer;
  border:1px solid #d7d7d7;
  text-align:left;
  transition:width .24s ease, min-width .24s ease, padding .24s ease, box-shadow .24s ease, transform .18s ease;
}
.wpaic-launcher:hover,
.wpaic-launcher:focus-visible{
  width:min(430px,calc(100vw - 36px));
  min-width:min(430px,calc(100vw - 36px));
  padding:10px 12px 10px 18px;
  box-shadow:0 18px 48px rgba(0,0,0,.22);
  transform:translateY(-2px);
}
.wpaic-launcher-copy{
  min-width:0;
  width:0;
  opacity:0;
  overflow:hidden;
  white-space:nowrap;
  transform:translateX(8px);
  transition:width .24s ease, opacity .16s ease, transform .24s ease, margin-right .24s ease;
}
.wpaic-launcher:hover .wpaic-launcher-copy,
.wpaic-launcher:focus-visible .wpaic-launcher-copy{
  width:300px;
  opacity:1;
  transform:translateX(0);
  margin-right:10px;
}
.wpaic-launcher-copy strong{
  display:block;
  font-size:18px;
  line-height:1.12;
  font-weight:800;
  margin-bottom:6px;
}
.wpaic-launcher-copy small{
  display:flex;
  align-items:center;
  gap:9px;
  font-size:13px;
  color:#444;
}
.status-dot{
  width:11px;
  height:11px;
  border-radius:50%;
  background:#20c75a;
  display:inline-block;
  box-shadow:0 0 0 4px rgba(32,199,90,.14);
}
.wpaic-launcher-avatar{
  position:relative;
  width:68px;
  height:68px;
  min-width:68px;
  border-radius:50%;
  display:block;
  flex:0 0 68px;
}
.wpaic-launcher-avatar img{
  width:68px;
  height:68px;
  border-radius:50%;
  object-fit:cover;
  object-position:center 24%;
  border:4px solid #29c85e;
  box-shadow:0 5px 14px rgba(0,0,0,.15);
}
.wpaic-online-ring{
  position:absolute;
  right:0;
  bottom:2px;
  width:16px;
  height:16px;
  background:#20c75a;
  border-radius:50%;
  border:3px solid #fff;
  box-shadow:0 0 0 2px rgba(32,199,90,.22);
}
.wpaic-panel{right:var(--wpaic-edge);left:auto}
#wpaic-root[data-side="left"] .wpaic-launcher,#wpaic-root[data-side="left"] .wpaic-panel{left:var(--wpaic-edge);right:auto}


.wpaic-panel{display:none;position:fixed;bottom:var(--wpaic-bottom);width:min(420px,calc(100vw - 28px));height:min(720px,calc(100vh - 40px));background:#fff;border:1px solid #e6e6e6;border-radius:22px;box-shadow:0 22px 65px rgba(0,0,0,.22);overflow:hidden;grid-template-rows:auto 1fr auto auto auto auto auto}
.wpaic-panel.open{display:grid}
.wpaic-panel header{background:#111;color:#fff;border-bottom:4px solid var(--y);padding:16px 18px;display:flex;justify-content:space-between;align-items:center}
.wpaic-panel header strong,.wpaic-panel header small{display:block}.wpaic-panel header small{opacity:.65}.close{background:none;border:0;color:#fff;font-size:30px}
.messages{padding:16px;overflow:auto;background:#f6f6f3}.msg{max-width:84%;padding:11px 13px;border-radius:15px;margin-bottom:10px;font-size:14px;line-height:1.45}.msg.ai{background:#fff;border:1px solid #e5e5e5}.msg.user{background:var(--y);margin-left:auto}
.chips{padding:9px 12px;display:flex;gap:6px;overflow-x:auto;border-top:1px solid #eee}.chips button{white-space:nowrap;border:1px solid #ddd;border-radius:999px;background:#fff;padding:8px 10px}
.contact-open{margin:0 12px 8px;border:0;background:#111;color:#fff;border-radius:10px;padding:10px 12px;font-weight:800}
.lead-form{padding:10px 12px;border-top:1px solid #eee}.lead-form input,.lead-form select{width:100%;box-sizing:border-box;margin-bottom:7px;padding:9px;border:1px solid #ddd;border-radius:8px}.lead-form label{font-size:11px;display:flex;gap:6px}.lead-form label input{width:auto}.lead-form button{width:100%;border:0;background:var(--y);padding:10px;border-radius:8px;font-weight:800}
.chat{display:flex;gap:8px;padding:10px 12px;border-top:1px solid #eee}.chat textarea{flex:1;resize:none;border:1px solid #ddd;border-radius:12px;padding:10px}.chat button{width:44px;border:0;border-radius:12px;background:var(--y);font-size:20px}.note{text-align:center;font-size:10px;color:#888;padding:0 8px 8px}
.property-list{display:grid;gap:9px;margin:4px 0 12px}.property-card{display:grid;grid-template-columns:100px 1fr;background:#fff;border:1px solid #ddd;border-radius:14px;overflow:hidden}.property-card img,.property-card .ph{width:100px;height:100%;min-height:112px;object-fit:cover;background:linear-gradient(135deg,#ddd,#aaa)}.pc-body{padding:9px 10px;display:grid;gap:2px}.pc-body span,.pc-body small{font-size:11px;color:#666}.pc-body b{font-size:14px}.pc-actions{display:flex;gap:5px;margin-top:6px}.pc-actions button{border:1px solid #ddd;background:#fff;border-radius:999px;padding:5px 8px;font-size:10px}

@media(max-width:600px){
  .wpaic-panel{left:0!important;right:0!important;bottom:0!important;width:100vw;height:100dvh;border-radius:0;border:0}
  .wpaic-launcher{
    left:auto!important;
    right:14px!important;
    bottom:14px!important;
    width:72px!important;
    min-width:72px!important;
    height:72px!important;
    padding:5px!important;
    transform:none!important;
  }
  #wpaic-root[data-side="left"] .wpaic-launcher{
    left:14px!important;
    right:auto!important;
  }
  .wpaic-launcher:hover,
  .wpaic-launcher:focus-visible{
    width:72px!important;
    min-width:72px!important;
    padding:5px!important;
  }
  .wpaic-launcher-copy,
  .wpaic-launcher:hover .wpaic-launcher-copy,
  .wpaic-launcher:focus-visible .wpaic-launcher-copy{
    display:none!important;
    width:0!important;
    opacity:0!important;
    margin:0!important;
  }
  .wpaic-launcher-avatar,
  .wpaic-launcher-avatar img{
    width:60px;
    height:60px;
  }
  .wpaic-launcher-avatar{
    min-width:60px;
    flex-basis:60px;
  }
}

.privacy-box{font-size:11px;line-height:1.4;color:#555;background:#f6f6f3;border:1px solid #e5e5e5;border-radius:8px;padding:9px;margin:3px 0 8px}
.privacy-check{font-size:11px;line-height:1.35;display:flex!important;gap:7px;align-items:flex-start;margin-bottom:8px}
.privacy-check input{width:auto!important;margin-top:2px}
.privacy-check a{color:#111;text-decoration:underline}

.property-card{transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}
.property-card.is-interested{border:2px solid #ffcc4d;box-shadow:0 8px 24px rgba(255,204,77,.24);transform:translateY(-1px)}
.property-card.is-similar{border:2px solid #111;box-shadow:0 7px 20px rgba(0,0,0,.10)}
.pc-actions button{transition:background .16s ease,color .16s ease,border-color .16s ease,box-shadow .16s ease}
.pc-actions button[data-react="interested"].active{background:#ffcc4d;color:#111;border-color:#e6b62e;font-weight:800;box-shadow:0 3px 10px rgba(255,204,77,.26)}
.pc-actions button[data-react="similar"].active{background:#111;color:#fff;border-color:#111;font-weight:800}


/* v0.5.6 compact launcher guard */
#wpaic-root .wpaic-launcher:not(:hover):not(:focus-visible){
  width:82px;
  min-width:82px;
  max-width:82px;
  height:82px;
  padding:6px;
  display:flex;
  gap:0;
}
#wpaic-root .wpaic-launcher:not(:hover):not(:focus-visible) .wpaic-launcher-copy{
  width:0;
  max-width:0;
  opacity:0;
  margin:0;
  overflow:hidden;
  pointer-events:none;
}
@media(max-width:600px){
  #wpaic-root .wpaic-launcher,
  #wpaic-root .wpaic-launcher:hover,
  #wpaic-root .wpaic-launcher:focus-visible{
    width:72px!important;
    min-width:72px!important;
    max-width:72px!important;
    height:72px!important;
  }
}


/* v0.6.0 mobile compact bottom sheet */
@media(max-width:600px){
#wpaic-root .wpaic-panel{left:10px!important;right:10px!important;bottom:10px!important;width:auto!important;height:min(78dvh,680px)!important;max-height:78dvh!important;border-radius:18px!important;border:1px solid #dedede!important;box-shadow:0 18px 55px rgba(0,0,0,.28)!important;overflow:hidden!important;grid-template-rows:auto minmax(0,1fr) auto auto auto auto auto!important}
#wpaic-root .wpaic-panel header{padding:11px 14px!important;border-bottom-width:3px!important}
#wpaic-root .wpaic-panel header strong{font-size:16px!important}.wpaic-panel header small{font-size:12px!important}.wpaic-panel .close{font-size:26px!important}
#wpaic-root .messages{min-height:0!important;padding:10px!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important}
#wpaic-root .property-list{gap:7px!important;margin:2px 0 8px!important}
#wpaic-root .property-card{grid-template-columns:82px minmax(0,1fr)!important;border-radius:12px!important}
#wpaic-root .property-card img,#wpaic-root .property-card .ph{width:82px!important;min-height:98px!important;height:100%!important}
#wpaic-root .pc-body{padding:8px 9px!important;gap:1px!important}.pc-body strong{font-size:14px!important;line-height:1.2!important}.pc-body span,.pc-body small{font-size:10.5px!important;line-height:1.25!important}.pc-body b{font-size:14px!important;margin:2px 0!important}
#wpaic-root .pc-actions{gap:4px!important;margin-top:5px!important;flex-wrap:wrap!important}.pc-actions button{padding:5px 7px!important;font-size:10px!important}
#wpaic-root .chips{padding:7px 9px!important;gap:5px!important;overflow-x:auto!important;flex-wrap:nowrap!important;scrollbar-width:none!important}.chips::-webkit-scrollbar{display:none!important}.chips button{padding:6px 9px!important;font-size:11px!important}
#wpaic-root .contact-open{margin:0 9px 6px!important;padding:9px 10px!important;border-radius:9px!important;font-size:13px!important}
#wpaic-root .lead-form{max-height:42dvh!important;overflow-y:auto!important;padding:8px 9px!important;background:#fff!important}.lead-form input,.lead-form select{padding:8px!important;margin-bottom:6px!important;font-size:13px!important}
#wpaic-root .privacy-box,#wpaic-root .privacy-check{font-size:10px!important}
#wpaic-root .chat{display:grid!important;grid-template-columns:minmax(0,1fr) 48px!important;gap:7px!important;padding:8px 9px 9px!important;align-items:stretch!important;background:#fff!important}
#wpaic-root .chat textarea{min-width:0!important;width:100%!important;height:54px!important;min-height:54px!important;max-height:96px!important;padding:9px 10px!important;font-size:14px!important;line-height:1.3!important;border-radius:11px!important;box-sizing:border-box!important}
#wpaic-root .chat button{width:48px!important;min-width:48px!important;height:54px!important;align-self:end!important;border-radius:11px!important;font-size:19px!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important}
#wpaic-root .note{display:none!important}
}
@media(max-width:390px){#wpaic-root .wpaic-panel{left:6px!important;right:6px!important;bottom:6px!important;height:min(80dvh,640px)!important;max-height:80dvh!important}.property-card{grid-template-columns:74px minmax(0,1fr)!important}.property-card img,.property-card .ph{width:74px!important;min-height:92px!important}.chat{grid-template-columns:minmax(0,1fr) 44px!important}.chat button{width:44px!important;min-width:44px!important}}


/* v0.6.1 MOBILE KEYBOARD / SEND BUTTON FIX */
@media(max-width:600px){
  #wpaic-root .wpaic-panel{
    left:6px!important;
    right:6px!important;
    bottom:max(6px, env(safe-area-inset-bottom))!important;
    width:auto!important;
    max-width:calc(100vw - 12px - env(safe-area-inset-left) - env(safe-area-inset-right))!important;
  }
  #wpaic-root .chat{
    display:flex!important;
    flex-direction:row!important;
    align-items:flex-end!important;
    gap:8px!important;
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
    padding:8px max(8px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left))!important;
  }
  #wpaic-root .chat *{box-sizing:border-box!important}
  #wpaic-root .chat textarea{
    flex:1 1 auto!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
    display:block!important;
    overflow:auto!important;
  }
  #wpaic-root .chat button{
    flex:0 0 46px!important;
    width:46px!important;
    min-width:46px!important;
    max-width:46px!important;
    height:46px!important;
    min-height:46px!important;
    padding:0!important;
    margin:0!important;
    border-radius:12px!important;
    align-self:flex-end!important;
    overflow:hidden!important;
  }
}
@media(max-width:390px){
  #wpaic-root .chat{gap:6px!important}
  #wpaic-root .chat button{
    flex:0 0 42px!important;
    width:42px!important;
    min-width:42px!important;
    max-width:42px!important;
    height:42px!important;
    min-height:42px!important;
  }
}


/* v0.6.2 MOBILE APP-LIKE COMPACT UI */
@media(max-width:600px){

  /* Mniejsze, bardziej zwarte karty ofert */
  #wpaic-root .property-list{
    gap:6px!important;
    margin:0 0 6px!important;
  }
  #wpaic-root .property-card{
    grid-template-columns:72px minmax(0,1fr)!important;
    min-height:86px!important;
    border-radius:11px!important;
  }
  #wpaic-root .property-card img,
  #wpaic-root .property-card .ph{
    width:72px!important;
    min-height:86px!important;
    height:100%!important;
  }
  #wpaic-root .pc-body{
    padding:6px 8px!important;
    gap:0!important;
  }
  #wpaic-root .pc-body strong{
    font-size:13px!important;
    line-height:1.15!important;
    margin:0 0 2px!important;
  }
  #wpaic-root .pc-body span,
  #wpaic-root .pc-body small{
    font-size:10px!important;
    line-height:1.15!important;
  }
  #wpaic-root .pc-body b{
    font-size:13px!important;
    line-height:1.15!important;
    margin:2px 0!important;
  }

  /* Przyciski reakcji – krótsze i mniej dominujące */
  #wpaic-root .pc-actions{
    gap:4px!important;
    margin-top:4px!important;
    flex-wrap:nowrap!important;
  }
  #wpaic-root .pc-actions button{
    min-height:28px!important;
    padding:4px 7px!important;
    font-size:9.5px!important;
    line-height:1!important;
    border-radius:999px!important;
    white-space:nowrap!important;
  }

  /* Pasek szybkich akcji bardziej kompaktowy */
  #wpaic-root .chips{
    padding:6px 8px!important;
    gap:4px!important;
  }
  #wpaic-root .chips button{
    min-height:32px!important;
    padding:5px 8px!important;
    font-size:10.5px!important;
  }

  /* CTA skrócone wizualnie */
  #wpaic-root .contact-open{
    margin:0 8px 5px!important;
    min-height:38px!important;
    padding:7px 10px!important;
    font-size:12.5px!important;
    border-radius:10px!important;
  }

  /* Dolny composer jak w aplikacji */
  #wpaic-root .chat{
    position:relative!important;
    display:flex!important;
    align-items:center!important;
    gap:6px!important;
    padding:7px 8px calc(7px + env(safe-area-inset-bottom))!important;
    background:#fff!important;
    border-top:1px solid #e9e9e9!important;
    box-shadow:0 -4px 16px rgba(0,0,0,.045)!important;
    overflow:visible!important;
  }

  #wpaic-root .chat textarea{
    flex:1 1 auto!important;
    width:auto!important;
    min-width:0!important;
    height:44px!important;
    min-height:44px!important;
    max-height:88px!important;
    padding:11px 13px!important;
    margin:0!important;
    border:1px solid #d8d8d8!important;
    border-radius:22px!important;
    background:#f7f7f7!important;
    font-size:16px!important; /* zapobiega zoomowi Safari iOS */
    line-height:1.25!important;
    outline:none!important;
    box-shadow:none!important;
    resize:none!important;
  }
  #wpaic-root .chat textarea:focus{
    background:#fff!important;
    border-color:#bdbdbd!important;
    box-shadow:0 0 0 2px rgba(255,204,77,.18)!important;
  }

  /* Stały, okrągły przycisk wyślij */
  #wpaic-root .chat button{
    flex:0 0 44px!important;
    width:44px!important;
    min-width:44px!important;
    max-width:44px!important;
    height:44px!important;
    min-height:44px!important;
    max-height:44px!important;
    padding:0!important;
    margin:0!important;
    border-radius:50%!important;
    background:#ffcc4d!important;
    color:#111!important;
    font-size:18px!important;
    line-height:1!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    box-shadow:0 4px 12px rgba(0,0,0,.12)!important;
    overflow:hidden!important;
  }

  /* Więcej miejsca na treść przy otwartej klawiaturze */
  #wpaic-root .messages{
    padding:8px!important;
  }
}

/* Bardzo małe iPhone'y */
@media(max-width:390px){
  #wpaic-root .property-card{
    grid-template-columns:66px minmax(0,1fr)!important;
  }
  #wpaic-root .property-card img,
  #wpaic-root .property-card .ph{
    width:66px!important;
    min-height:82px!important;
  }
  #wpaic-root .pc-actions button{
    padding:4px 6px!important;
    font-size:9px!important;
  }
  #wpaic-root .chat button{
    flex-basis:42px!important;
    width:42px!important;
    min-width:42px!important;
    max-width:42px!important;
    height:42px!important;
    min-height:42px!important;
    max-height:42px!important;
  }
}


/* v0.6.3 valuation-ready CTA + send lock */
#wpaic-root .contact-open.attention{
  background:#ffcc4d!important;
  color:#111!important;
  box-shadow:0 0 0 3px rgba(255,204,77,.22)!important;
}
#wpaic-root .chat button:disabled,
#wpaic-root .chat textarea:disabled{
  opacity:.65!important;
}
