/* Fixed help entry point with phone safe-area support. The document remains
   usable while this nonmodal panel is open; Escape restores launcher focus. */
#pev-company-help { position: fixed; right: max(18px,env(safe-area-inset-right)); bottom: max(18px,env(safe-area-inset-bottom)); z-index: 1100; font: 15px/1.5 system-ui,sans-serif; color: #edf5f8; text-align: left; }
#pev-company-help * { box-sizing: border-box; }
#pev-company-help button,#pev-company-help input { font: inherit; }
#pev-company-help button { cursor: pointer; }
#pev-company-help :is(button,a,input):focus-visible { outline: 3px solid #8ae8b8; outline-offset: 3px; }
#pev-company-help .pev-help-toggle { display: flex; gap: 10px; align-items: center; justify-content: center; margin-left: auto; min-height: 56px; padding: 12px 20px; border: 1px solid #81f0b4; border-radius: 28px; background: #6ce3a8; color: #08261b; font-weight: 650; box-shadow: 0 6px 24px #0005; }
#pev-company-help .pev-help-toggle svg { width: 25px; height: 25px; }
#pev-help-panel { display: flex; flex-direction: column; width: min(390px,calc(100vw - 32px)); height: min(580px,calc(100dvh - 110px)); min-height: 280px; margin-bottom: 14px; border: 1px solid #49616d; border-radius: 18px; background: #111c24; box-shadow: 0 16px 56px #0008; overflow: hidden; }
#pev-help-panel[hidden] { display: none; }
#pev-help-panel > header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #304650; background: #182a32; }
#pev-help-panel > header span { display: block; font-size: 12px; color: #bad0d8; }
#pev-help-panel > header button { border: 0; color: white; background: transparent; width: 44px; height: 44px; font-size: 28px; }
#pev-help-panel .pev-help-log { flex: 1; overflow-y: auto; padding: 20px; min-height: 0; overscroll-behavior: contain; }
#pev-help-panel .pev-help-message { background: #223842; color: #edf5f8; border-radius: 12px 12px 12px 3px; padding: 12px 14px; margin: 0 0 14px; max-width: 95%; overflow-wrap: anywhere; text-align: left; }
#pev-help-panel .pev-help-own { background: #1d4939; margin-left: auto; border-radius: 12px 12px 3px 12px; }
#pev-help-panel a { color: #a0f0c5; text-decoration: underline; text-underline-offset: 3px; }
#pev-help-panel .pev-help-message a { display: block; margin-top: 10px; }
#pev-help-panel .pev-help-topics { display: grid; gap: 8px; margin-bottom: 18px; }
#pev-help-panel .pev-help-topics button { text-align: left; padding: 10px 12px; min-height: 44px; color: #b3efd0; background: transparent; border: 1px solid #40705b; border-radius: 8px; }
#pev-help-panel .pev-help-composer { display: flex; gap: 8px; padding: 12px; margin: 0; border-top: 1px solid #304650; background: #182a32; }
#pev-help-panel label { flex: 1; min-width: 0; font-size: 0; }
#pev-help-panel input { width: 100%; min-width: 0; min-height: 44px; padding: 10px; color: white; background: #0d1920; border: 1px solid #607a88; border-radius: 8px; font-size: 16px; }
#pev-help-panel .pev-help-composer button { padding: 10px; color: #06271a; background: #6ce3a8; border: 0; border-radius: 8px; }
#pev-help-panel > footer { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; font-size: 12px; background: #111c24; }
/* Keep the existing return-to-top control clear of the new chat launcher. */
body:has(#pev-company-help) #pev-back-to-top { bottom: 92px; }
@media(max-width:480px) { #pev-company-help { right: 16px; bottom: max(16px,env(safe-area-inset-bottom)); } #pev-help-panel { width: calc(100vw - 32px); } }
@media(forced-colors:active) { #pev-company-help .pev-help-toggle { border: 2px solid ButtonText; } }

/* The full inbox already provides chat; keep its composer unobstructed. */
body.customer-page:has(.customer-inbox) #pev-company-help { display: none; }

/* Keep processing disclosure compact without competing with conversation text. */
#pev-help-panel .pev-help-privacy { flex:none; font-size:11px; line-height:1.4; margin:0; padding:6px 12px; color:#bad0d8; }
#pev-help-panel .pev-help-composer button:disabled { opacity:.6; cursor:wait; }
