
.pc-chat-open{position:fixed;right:20px;bottom:20px;z-index:1000;border:0;border-radius:28px;padding:16px 22px;background:#17364b;color:#fff;font:600 16px Arial,sans-serif;box-shadow:0 4px 24px #0003;cursor:pointer}
.pc-chat-panel{position:fixed;right:20px;bottom:84px;z-index:1001;width:min(390px,calc(100vw - 32px));height:min(590px,calc(100dvh - 110px));background:#fff;color:#172633;border:1px solid #d6dde2;border-radius:16px;box-shadow:0 8px 40px #0003;display:flex;flex-direction:column;overflow:hidden;font:15px/1.45 Arial,sans-serif}
.pc-chat-panel[hidden]{display:none}
.pc-chat-head{background:#17364b;color:#fff;padding:15px;display:flex;align-items:flex-start;gap:12px}
.pc-chat-head strong{display:block;font-size:17px}
.pc-chat-head small{display:block;opacity:.85;margin-top:4px}
.pc-chat-close{margin-left:auto;background:transparent;color:#fff;border:0;font-size:28px;line-height:1;cursor:pointer;padding:0 4px}
.pc-chat-messages{flex:1;min-height:70px;overflow-y:auto;padding:14px;background:#f4f6f8;display:flex;flex-direction:column;gap:10px}
.pc-chat-bubble{padding:10px 12px;border-radius:12px;max-width:88%;white-space:pre-wrap;overflow-wrap:anywhere;background:#fff;border:1px solid #e0e5e9;align-self:flex-start}
.pc-chat-bubble.visitor{background:#e2edf3;align-self:flex-end}
.pc-chat-author{display:block;font-size:11px;font-weight:bold;color:#526472;margin-bottom:4px}
.pc-chat-form{padding:12px;border-top:1px solid #e0e5e9;background:#fff;display:grid;gap:9px}
.pc-chat-form input[type=text],.pc-chat-form textarea{box-sizing:border-box;width:100%;border:1px solid #b9c5ce;border-radius:8px;padding:10px;color:#172633;background:#fff;font:16px Arial,sans-serif}
.pc-chat-form textarea{resize:vertical;min-height:70px;max-height:150px}
.pc-chat-consent{display:flex;align-items:flex-start;gap:8px;font-size:12px;line-height:1.4}
.pc-chat-consent input{margin-top:3px;flex-shrink:0}
.pc-chat-consent a{color:#174f75;text-decoration:underline}
.pc-chat-send{border:0;border-radius:8px;padding:11px;background:#17364b;color:#fff;font:600 15px Arial,sans-serif;cursor:pointer}
.pc-chat-send:disabled{opacity:.55;cursor:wait}
.pc-chat-status{padding:6px 12px;font-size:12px;color:#526472;min-height:17px;background:#fff}
.pc-chat-status.error{color:#a52020}
.pc-chat-note{font-size:11px;color:#61717c;margin:0}
@media(max-width:480px){.pc-chat-open{right:12px;bottom:12px;padding:14px 18px}.pc-chat-panel{right:8px;bottom:76px;width:calc(100vw - 16px);height:min(620px,calc(100dvh - 92px))}}

/* chat-roomier-v5 */
.pc-chat-panel{
  height:min(800px,calc(100dvh - 110px));
}
.pc-chat-head{
  padding:12px 15px;
}
.pc-chat-messages{
  flex:1 1 0;
  min-height:0;
}
.pc-chat-form{
  flex-shrink:0;
  padding:10px 12px;
  gap:7px;
}
.pc-chat-form textarea{
  min-height:52px;
  height:52px;
  max-height:100px;
}
@media(max-width:480px){
  .pc-chat-panel{
    height:calc(100dvh - 92px);
    max-height:800px;
  }
}

/* chat-header-compact-v6 */
.pc-chat-head{
  padding:4px 15px 6px;
}
.pc-chat-head small{
  margin-top:2px;
}

/* chat-remove-section-spacing-v7 */
#pc-chat-panel{
  padding:0 !important;
  margin:0 !important;
  gap:0;
  row-gap:0;
  justify-content:flex-start;
  box-sizing:border-box;
}
#pc-chat-panel .pc-chat-head{
  margin:0;
  flex-shrink:0;
}
#pc-chat-panel .pc-chat-messages{
  margin:0;
  flex:1 1 0;
  min-height:0;
}
#pc-chat-panel .pc-chat-status{
  margin:0;
  flex-shrink:0;
}
#pc-chat-panel .pc-chat-form{
  margin:0;
  flex-shrink:0;
}

/* chat-hide-empty-status-v8 */
#pc-chat-panel .pc-chat-status:empty{
  display:none;
}

/* chat-mobile-consent-v9 */
#pc-chat-panel,
#pc-chat-panel *{
  box-sizing:border-box;
}
#pc-chat-panel .pc-chat-form{
  width:100%;
  min-width:0;
  grid-template-columns:minmax(0,1fr);
}
#pc-chat-panel .pc-chat-intro{
  width:100%;
  min-width:0;
}
#pc-chat-panel .pc-chat-consent{
  display:grid !important;
  grid-template-columns:18px minmax(0,1fr) !important;
  align-items:start !important;
  gap:8px !important;
  width:100% !important;
  min-width:0 !important;
  height:auto !important;
  min-height:0 !important;
  margin:9px 0 0 !important;
  padding:0 !important;
  font-size:12px;
  line-height:1.4;
  text-align:left;
}
#pc-chat-panel .pc-chat-consent input[type=checkbox]{
  appearance:auto !important;
  -webkit-appearance:checkbox !important;
  position:static !important;
  display:block !important;
  width:18px !important;
  min-width:18px !important;
  max-width:18px !important;
  height:18px !important;
  min-height:18px !important;
  max-height:18px !important;
  margin:2px 0 0 !important;
  padding:0 !important;
  transform:none !important;
}
#pc-chat-panel .pc-chat-consent > span{
  display:block !important;
  position:static !important;
  width:auto !important;
  min-width:0 !important;
  max-width:100% !important;
  margin:0 !important;
  padding:0 !important;
  white-space:normal !important;
  overflow-wrap:anywhere;
  color:#172633;
}
#pc-chat-panel .pc-chat-consent a{
  display:inline !important;
  position:static !important;
  width:auto !important;
  margin:0 !important;
  padding:0 !important;
  white-space:normal !important;
}
#pc-chat-panel .pc-chat-form input[type=text],
#pc-chat-panel .pc-chat-form textarea{
  min-width:0;
  max-width:100%;
  font-size:16px;
}
@media(max-width:767px){
  #pc-chat-panel{
    right:8px;
    bottom:calc(76px + env(safe-area-inset-bottom,0px));
    width:calc(100vw - 16px);
    height:min(700px,calc(100dvh - 100px - env(safe-area-inset-bottom,0px)));
    max-height:calc(100dvh - 100px - env(safe-area-inset-bottom,0px));
    overflow-y:auto;
  }
  #pc-chat-panel .pc-chat-messages{
    min-height:70px;
  }
  #pc-chat-open{
    right:12px;
    bottom:calc(12px + env(safe-area-inset-bottom,0px));
  }
}

/* step1: yellow chat button */
.pc-chat-open{background:#aa8331;color:#fff;border:2px solid #fff;font-weight:800;box-shadow:0 6px 22px rgba(20,45,75,.38),0 0 0 4px rgba(170,131,49,.3)}
.pc-chat-open:hover{background:#94702a}
.pc-chat-open[aria-expanded="true"]{background:#17364b}

/* step2: modal chat */
.pc-chat-overlay{position:fixed;inset:0;z-index:3000;background:rgba(8,16,28,.62)}
.pc-chat-overlay[hidden]{display:none}
html.pc-chat-lock,html.pc-chat-lock body{overflow:hidden}
#pc-chat-panel{left:50% !important;top:50% !important;right:auto !important;bottom:auto !important;transform:translate(-50%,-50%);width:min(520px,calc(100vw - 24px)) !important;height:min(720px,calc(100dvh - 32px)) !important;max-height:none !important;z-index:3001 !important;box-shadow:0 20px 60px rgba(0,0,0,.45)}
.pc-chat-open[aria-expanded="true"]{display:none}
