/* Contact-first operator chat, aligned with the site's rounded glass forms. */
#chatPanel{grid-template-rows:auto minmax(0,1fr)!important;overflow:hidden}
#chatPanel [hidden]{display:none!important}
#chatPanel>header{background:transparent!important;color:#234b65!important;border-bottom:1px solid #ffffffa6}
#chatPanel>header small{color:#658195}
#chatPanel .chat-identity-form{display:grid!important;align-content:start;gap:14px;padding:18px;overflow:visible;border:0!important;min-height:0}
#chatPanel .chat-identity-form[hidden]{display:none!important}
.chat-identity-intro{font-size:12px;line-height:1.6;color:#56738a;margin:0}
#chatPanel .chat-identity-form label:not(.chat-contact-consent){display:grid;gap:6px;font-size:12px;font-weight:600;color:#38617e}
#chatPanel .chat-identity-form input:not([type=checkbox]){box-sizing:border-box;width:100%;height:42px;min-height:42px;padding:0 16px;border-radius:999px!important;background:#ffffffa8!important;border:1px solid #c7dfea!important;font-size:14px}
#chatPanel .chat-identity-form button[type=submit]{width:100%;min-height:42px;height:auto;padding:11px 18px;font-size:13px;border-radius:999px!important}
#chatPanel .chat-contact-consent{display:flex;align-items:flex-start;gap:9px;font-size:11px;line-height:1.5;color:#56738a}
#chatPanel .chat-contact-consent input{flex:0 0 17px;width:17px;height:17px;min-height:17px;margin:2px 0 0;padding:0;accent-color:#087ecc}
#chatConversation{display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-height:0;overflow:hidden}
.chat-contact-bar{display:flex;gap:10px;align-items:center;padding:9px 15px;border-bottom:1px solid #ffffff80;font-size:11px;color:#56738a}
.chat-contact-bar span{flex:1;min-width:0;overflow-wrap:anywhere}
#chatPanel .chat-contact-bar button{border:0;background:none!important;box-shadow:none!important;padding:4px!important;color:#087ecc;font-size:11px;min-height:0!important}
#chatPanel .chat-messages{background:transparent;min-height:0;padding:12px 15px;gap:10px}
#chatPanel .chat-message{max-width:92%;font-size:13px;line-height:1.5;border-radius:18px;overflow-wrap:anywhere}
#chatPanel .chat-message p{margin:0;white-space:pre-wrap}
#chatPanel .chat-message-meta{display:block;margin-top:5px;font-size:9px;opacity:.78}
#chatPanel .chat-message-action{font-size:11px;padding:5px 8px;margin-top:6px}
#chatPanel #chatForm{padding:0!important;border-top:1px solid #ffffffa6}
#chatPanel .chat-compose{padding:10px 12px;align-items:center}
#chatPanel .chat-compose input{height:42px;border-radius:999px!important;padding-inline:15px;font-size:13px}
#chatPanel .chat-compose button{width:42px;height:42px;min-width:42px;border-radius:50%!important;padding:0!important;display:grid;place-items:center}
#chatPanel .chat-captcha-block{margin:0!important;padding:4px 14px!important;background:transparent!important;overflow:hidden}
#chatConnectionStatus{margin:0!important;padding:8px 15px 12px;font-size:11px;line-height:1.45;color:#56738a}
#chatConnectionStatus.is-error{color:#a63d30}
.chat-phone-option{font-size:11px;color:#087ecc}
/* One scroll area keeps contact fields and CAPTCHA in document flow. */
#chatPanelBody{min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scroll-padding-block:14px;}
#chatPanel[data-chat-view=conversation] #chatPanelBody{display:grid;grid-template-rows:minmax(120px,1fr) auto auto;}
#chatPanel .chat-compose{position:static!important;}
html body#partpriceSite.pp-apple #chatPanel{height:min(640px,calc(100dvh - var(--pp-floating-bottom) - 80px))!important;max-height:calc(100dvh - var(--pp-floating-bottom) - 80px)!important;}
@media(max-width:640px),(max-height:500px) and (hover:none){
  html body#partpriceSite.pp-apple #chatPanel{
    position:fixed!important;top:calc(var(--pp-chat-viewport-top,0px) + 8px)!important;
    bottom:auto!important;left:12px!important;right:12px!important;width:auto!important;
    height:min(640px,calc(var(--pp-chat-viewport-height,100dvh) - 16px))!important;
    max-height:calc(var(--pp-chat-viewport-height,100dvh) - 16px)!important;
    box-sizing:border-box;border-radius:28px!important;
  }
  #chatPanel .chat-identity-form{gap:12px;padding:14px;}
  #chatPanel>header{padding:11px 14px;min-height:0;}
  #chatPanel>header strong{font-size:14px;}
  #chatPanel>header small{font-size:11px;}
  #chatPanel .chat-identity-form input:not([type=checkbox]),#chatPanel .chat-compose input{font-size:16px!important;}
  #chatPanel .chat-captcha-block{padding:4px 12px!important;}
  #chatPanel .chat-compose{padding:8px 12px;}
  #chatConnectionStatus{padding:6px 12px 10px;font-size:10px;}
  .chat-widget:has(#chatPanel:not([hidden])) #chatLauncher{visibility:hidden!important;}
}
