#psmaxchat,#psmaxchat *{box-sizing:border-box}
#psmaxchat{position:fixed;right:24px;bottom:20px;z-index:99990;font:14px/1.45 Roboto,Arial,sans-serif;color:#273441}
#psmaxchat button{cursor:pointer;font:inherit}
#psmaxchat .psmaxchat-launch{min-height:50px;padding:12px 18px;background:#293c4a;color:#fff;border:1px solid #b99659;border-radius:30px;box-shadow:0 6px 25px #0003;font-weight:600;display:inline-flex;align-items:center;gap:10px}
#psmaxchat .psmaxchat-launch-label{display:inline-block;font-size:16px;line-height:1.1}
#psmaxchat .psmaxchat-launch-icon{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;color:#fff;line-height:1;flex:0 0 22px}
#psmaxchat .psmaxchat-launch-icon svg{display:block;width:21px;height:21px}
#psmaxchat .psmaxchat-panel{position:absolute;right:0;bottom:64px;width:min(365px,calc(100vw - 20px));height:min(525px,calc(100dvh - 100px));max-height:630px;background:#faf9f7;border:1px solid #e0d6c7;border-radius:16px;box-shadow:0 10px 45px #0003;overflow:hidden;display:flex;flex-direction:column}
/* 1.1.1 — a taller, slightly wider chat panel on desktop only.
   Keep enough clearance from the top of the window on shorter displays.
   Mobile full-screen rules below remain unchanged. */
@media (min-width:768px){
  #psmaxchat .psmaxchat-panel{
    width:min(455px,calc(100vw - 36px));
    height:min(710px,calc(100dvh - 110px));
    max-height:780px;
  }
}
#psmaxchat .psmaxchat-panel[hidden]{display:none!important}
#psmaxchat .psmaxchat-head{background:#293c4a;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:14px 17px;gap:12px}
#psmaxchat .psmaxchat-head strong{display:block;font-size:15px}
#psmaxchat .psmaxchat-head small{display:block;color:#e2e6e8;font-size:11px;margin-top:2px}
#psmaxchat .psmaxchat-close{font-size:28px;line-height:1;border:none;background:transparent;color:#fff;padding:0 4px}
#psmaxchat .psmaxchat-messages{padding:15px;overflow:auto;flex:1;display:flex;flex-direction:column;gap:12px;min-height:0}
#psmaxchat .psmaxchat-intro{margin:0;background:#fff;border:1px solid #eae4d9;padding:11px 12px;border-radius:12px;max-width:90%}
#psmaxchat .psmaxchat-bubble{max-width:90%;padding:10px 12px;border-radius:12px;white-space:pre-wrap;overflow-wrap:anywhere}
#psmaxchat .psmaxchat-bubble small{display:block;text-align:right;font-size:10px;opacity:.7;margin-top:5px}
#psmaxchat .psmaxchat-mine{align-self:flex-end;background:#dae9e3}
#psmaxchat .psmaxchat-theirs{align-self:flex-start;background:#fff;border:1px solid #ece6da}
#psmaxchat .psmaxchat-status{min-height:16px;margin:0 14px 5px;font-size:11px;color:#466956}
#psmaxchat .psmaxchat-status.psmaxchat-error{color:#ae3030}
#psmaxchat .psmaxchat-form{display:flex;align-items:center;gap:8px;padding:10px 12px;border-top:1px solid #e8e2d7;background:#fff}
#psmaxchat .psmaxchat-form textarea{flex:1;min-width:0;max-height:90px;resize:vertical;border:1px solid #d9d1c3;border-radius:10px;padding:9px 10px;background:#fff;font:13px/1.5 Roboto,Arial,sans-serif;color:#273441}
#psmaxchat .psmaxchat-form button{background:#b18a47;color:#fff;border:0;border-radius:10px;width:39px;height:40px;font-size:20px;flex-shrink:0;display:flex!important;align-items:center!important;justify-content:center!important;padding:0!important;line-height:1!important;text-align:center!important;vertical-align:middle!important}
#psmaxchat .psmaxchat-form button .psmaxchat-send-icon{display:block!important;width:21px!important;height:21px!important;flex:0 0 21px!important;margin:0!important;padding:0!important;position:static!important;transform:none!important;fill:currentColor!important}
#psmaxchat .psmaxchat-form button:disabled{opacity:.55;cursor:not-allowed}
#psmaxchat .psmaxchat-honey{position:absolute!important;left:-99999px!important;width:1px!important;height:1px!important;opacity:0!important}
/* Mobile: mirrored against the existing cookie-settings pill, on the opposite side of the central call button. */
@media (max-width:600px){
  #psmaxchat{right:12px;bottom:12px;left:auto;z-index:99990}
  #psmaxchat button.psmaxchat-launch{
    display:inline-flex;align-items:center;justify-content:center;gap:7px;
    width:clamp(118px,calc((100vw - 94px)/2),154px);
    height:36px!important;min-height:36px!important;max-height:36px!important;
    margin:0;padding:0 8px;
    border:1px solid #decdae;border-radius:13px;
    background:#fffdf8;color:#674f23;
    font:600 14px/1.1 Roboto,Arial,sans-serif;
    white-space:nowrap;text-transform:none!important;letter-spacing:normal!important;box-shadow:0 2px 8px rgba(75,55,30,.07);
    transform:none;
  }
  #psmaxchat .psmaxchat-launch-label{display:inline-block;font:inherit;white-space:nowrap}
  #psmaxchat .psmaxchat-launch-icon{display:inline-flex;width:17px;height:17px;flex:0 0 17px;color:#9c772f;background:none;border:0;border-radius:0}
  #psmaxchat .psmaxchat-launch-icon svg{width:17px;height:17px}
  #psmaxchat .psmaxchat-panel{right:0;bottom:56px;width:min(365px,calc(100vw - 24px));height:min(520px,calc(100dvh - 90px))}
  #psmaxchat[data-state="open"] .psmaxchat-launch{display:none!important}
  #psmaxchat[data-state="open"] .psmaxchat-panel{bottom:0}
}
@media (max-width:375px){
  #psmaxchat button.psmaxchat-launch{width:min(135px,calc((100vw - 106px)/2));font-size:12.5px;gap:3px;padding:0 4px}
  #psmaxchat .psmaxchat-launch-icon{width:15px;height:15px;flex-basis:15px}
  #psmaxchat .psmaxchat-launch-icon svg{width:15px;height:15px}
}

/* 1.0.6: full-screen mobile conversation, isolated above sticky call / cookie bars. */
@media (max-width:767px){
  html.psmaxchat-page-locked,body.psmaxchat-page-locked{overflow:hidden!important;overscroll-behavior:none!important}
  #psmaxchat[data-state="open"]{
    position:fixed!important;inset:0!important;width:100%!important;height:100%!important;
    margin:0!important;max-width:none!important;z-index:2147483000!important;
    pointer-events:auto!important;
  }
  #psmaxchat[data-state="open"] .psmaxchat-launch{display:none!important}
  #psmaxchat .psmaxchat-panel:not([hidden]){
    position:fixed!important;
    top:var(--psmaxchat-viewport-top,0px)!important;
    left:var(--psmaxchat-viewport-left,0px)!important;
    right:auto!important;bottom:auto!important;
    width:var(--psmaxchat-viewport-width,100vw)!important;
    height:var(--psmaxchat-viewport-height,100dvh)!important;
    max-width:none!important;max-height:none!important;min-height:0!important;
    margin:0!important;padding:0!important;
    border:none!important;border-radius:0!important;
    box-shadow:none!important;
    overflow:hidden!important;
    display:flex!important;flex-direction:column!important;
    background:#faf9f7!important;
    z-index:2147483001!important;
    overscroll-behavior:contain;
  }
  #psmaxchat .psmaxchat-head{
    flex:0 0 auto!important;min-height:60px!important;
    padding:10px 14px!important;padding-top:max(10px,env(safe-area-inset-top))!important;
    background:#293c4a!important;
  }
  #psmaxchat .psmaxchat-head strong{font-size:16px!important}
  #psmaxchat .psmaxchat-head small{font-size:12px!important}
  #psmaxchat .psmaxchat-close{
    display:flex;align-items:center;justify-content:center;
    min-width:44px!important;min-height:44px!important;padding:0!important;
    font-size:30px!important;touch-action:manipulation;
  }
  #psmaxchat .psmaxchat-messages{
    flex:1 1 0!important;min-height:0!important;max-height:none!important;
    padding:14px!important;overflow-y:auto!important;overflow-x:hidden!important;
    -webkit-overflow-scrolling:touch;overscroll-behavior:contain;
    scrollbar-gutter:stable;
  }
  #psmaxchat .psmaxchat-intro{font-size:15px!important;max-width:96%!important;line-height:1.45!important}
  #psmaxchat .psmaxchat-bubble{font-size:15px!important;line-height:1.45!important}
  #psmaxchat .psmaxchat-status:not(:empty){flex:0 0 auto!important;padding:4px 12px!important;margin:0!important;font-size:12px!important}
  #psmaxchat .psmaxchat-status:empty{display:none!important}
  #psmaxchat .psmaxchat-form{
    flex:0 0 auto!important;min-height:60px!important;
    padding:8px 12px!important;gap:8px!important;
    align-items:flex-end!important;border-top:1px solid #e8e2d7!important;
    background:#fff!important;
  }
  #psmaxchat .psmaxchat-form textarea{
    display:block!important;flex:1 1 auto!important;
    box-sizing:border-box!important;min-width:0!important;
    width:auto!important;min-height:44px!important;max-height:106px!important;
    height:44px;resize:none!important;overflow-y:auto!important;
    padding:10px 11px!important;border:1px solid #d9d1c3!important;
    border-radius:12px!important;background:#fff!important;
    font:400 16px/1.4 Roboto,Arial,sans-serif!important;color:#273441!important;
    box-shadow:none!important;-webkit-appearance:none!important;
  }
  #psmaxchat .psmaxchat-form button{
    flex:0 0 44px!important;width:44px!important;height:44px!important;min-height:44px!important;
    border-radius:12px!important;margin:0!important;padding:0!important;
    font-size:22px!important;background:#b18a47!important;color:#fff!important;
  }
}

/* 1.0.7 — suppress floating telephone controls ONLY while the mobile chat is open.
   Call Now Button's legacy and current layouts are covered; original controls
   reappear immediately when the dialog closes. Never disable the phone button globally. */
@media (max-width:767px){
  html.psmaxchat-dialog-active #callnowbutton,
  html.psmaxchat-dialog-active #cnb-wrapper,
  html.psmaxchat-dialog-active #cnb-action,
  html.psmaxchat-dialog-active .cnb-wrapper,
  html.psmaxchat-dialog-active .cnb-container,
  html.psmaxchat-dialog-active .cnb-single,
  html.psmaxchat-dialog-active .cnb-action,
  html.psmaxchat-dialog-active .cnb-button,
  html.psmaxchat-dialog-active .call-now-button,
  html.psmaxchat-dialog-active .callnowbutton,
  html.psmaxchat-dialog-active #wp-call-button,
  html.psmaxchat-dialog-active .wp-call-button{
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
  }
}
/* 1.0.11 — private photo sharing and compact attachment picker */
#psmaxchat .psmaxchat-photo-file{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;overflow:hidden!important;pointer-events:none!important}
#psmaxchat .psmaxchat-form .psmaxchat-attach{display:flex!important;align-items:center!important;justify-content:center!important;flex:0 0 37px!important;min-width:37px!important;height:42px!important;border:0!important;border-radius:10px!important;background:transparent!important;color:#a98548!important;cursor:pointer!important;padding:0!important;margin:0!important;touch-action:manipulation}
#psmaxchat .psmaxchat-form .psmaxchat-attach svg{display:block;width:24px;height:24px}
#psmaxchat .psmaxchat-form .psmaxchat-attach:hover{background:#f5f0e8!important}
#psmaxchat .psmaxchat-form .psmaxchat-attach:focus-within{outline:2px solid #a98548;outline-offset:1px}
#psmaxchat .psmaxchat-photo-preview{display:flex;flex:0 0 auto;align-items:center;gap:9px;padding:8px 12px;background:#fff9ed;border-top:1px solid #e9dbc6;color:#48525d;font-size:12px;max-width:100%;min-width:0}
#psmaxchat .psmaxchat-photo-preview[hidden]{display:none!important}
#psmaxchat .psmaxchat-photo-preview img{width:42px;height:42px;flex:0 0 42px;object-fit:cover;border-radius:8px}
#psmaxchat .psmaxchat-photo-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#psmaxchat .psmaxchat-photo-remove{flex:0 0 32px!important;min-width:32px!important;height:32px!important;background:transparent!important;border:none!important;color:#7b5742!important;font-size:24px!important;line-height:1!important;padding:0!important}
#psmaxchat .psmaxchat-bubble .psmaxchat-message-photo{display:block;width:auto;max-width:235px;max-height:310px;height:auto;object-fit:contain;margin:0 0 5px;border-radius:9px;cursor:zoom-in;background:#e6e5e2}
#psmaxchat .psmaxchat-bubble .psmaxchat-message-photo:only-child{margin:0}
@media(max-width:767px){
 #psmaxchat .psmaxchat-form .psmaxchat-attach{flex-basis:40px!important;height:44px!important;min-width:40px!important}
 #psmaxchat .psmaxchat-bubble .psmaxchat-message-photo{max-width:min(70vw,270px);max-height:40dvh}
 #psmaxchat .psmaxchat-photo-preview{padding:6px 12px!important}
}
