#pechechat-root, #pechechat-root * { box-sizing: border-box; }
#pechechat-root [hidden], #pechechat-root[hidden] { display: none !important; }
#pechechat-root { position: fixed; bottom: calc(var(--pc-bottom, 24px) + env(safe-area-inset-bottom, 0px)); z-index: 1030; font-family: inherit; color: #222; font-size: 14px; line-height: 1.4; text-align: left; }
#pechechat-root.pc-root--right { right: 24px; }
#pechechat-root.pc-root--left { left: 24px; }
#pechechat-root button, #pechechat-root input, #pechechat-root textarea { font: inherit; letter-spacing: normal; text-transform: none; }
#pechechat-root button { cursor: pointer; }
#pechechat-root button:disabled { cursor: default; opacity: .55; }
#pechechat-root button:focus-visible, #pechechat-root textarea:focus-visible, #pechechat-root input:focus-visible { outline: 3px solid #111; outline-offset: 3px; }
#pechechat-root .pc-launcher { display: flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 32px; min-width: 56px; min-height: 56px; padding: 14px 20px; color: var(--pc-fg, #fff); background: var(--pc-color, #b9202c); box-shadow: 0 5px 22px #0003; font-weight: 600; max-width: min(320px, calc(100vw - 48px)); }
#pechechat-root .pc-launcher svg { flex: 0 0 26px; }
#pechechat-root .pc-launcher span { overflow-wrap: anywhere; }
#pechechat-root .pc-panel { position: absolute; bottom: calc(100% + 12px); width: 370px; max-width: calc(100vw - 32px); height: min(590px, calc(100vh - var(--pc-bottom, 24px) - 96px)); height: min(590px, calc(100dvh - var(--pc-bottom, 24px) - 96px)); min-height: 180px; display: flex; flex-direction: column; background: #fff; border: 1px solid #e5e5e5; border-radius: 18px; overflow: hidden; box-shadow: 0 12px 45px #0003; }
#pechechat-root.pc-root--right .pc-panel { right: 0; }
#pechechat-root.pc-root--left .pc-panel { left: 0; }
#pechechat-root .pc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 18px; background: var(--pc-color, #b9202c); color: var(--pc-fg, #fff); flex: 0 0 auto; }
#pechechat-root .pc-head strong { display: block; font-size: 16px; overflow-wrap: anywhere; }
#pechechat-root .pc-subtitle { display: block; font-size: 12px; margin-top: 3px; }
#pechechat-root .pc-close { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; padding: 0; margin: 0; border: 1px solid currentColor; border-radius: 50%; background: transparent; color: inherit; font-size: 26px; line-height: 1; }
#pechechat-root .pc-status { margin: 0; padding: 10px 16px; background: #faf8f6; border-bottom: 1px solid #eee; color: #57534e; font-size: 12px; flex: 0 0 auto; overflow-wrap: anywhere; }
#pechechat-root .pc-log { padding: 16px; overflow-y: auto; overscroll-behavior: contain; flex: 1 1 auto; min-height: 60px; background: #fff; }
#pechechat-root .pc-welcome { border-radius: 12px; background: #f3f4f6; padding: 12px; margin: 0 18px 12px 0; color: #292929; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
#pechechat-root .pc-message { max-width: 90%; width: fit-content; padding: 10px 12px; margin: 10px 0; border-radius: 12px 12px 12px 3px; background: #f3f4f6; color: #222; }
#pechechat-root .pc-message--visitor { margin-left: auto; background: #faedef; border-radius: 12px 12px 3px 12px; }
#pechechat-root .pc-message--system { background: #faf8f2; border: 1px solid #e9e2d2; }
#pechechat-root .pc-message--system p { font-size: 13px; }
#pechechat-root .pc-contact { padding: 13px; margin: 14px 0 4px; border: 1px solid #dfd4d6; border-radius: 12px; background: #fff7f8; }
#pechechat-root .pc-contact strong { display: block; font-size: 14px; }
#pechechat-root .pc-contact p { margin: 7px 0; font-size: 12px; overflow-wrap: anywhere; }
#pechechat-root .pc-contact label { display: block; font-size: 12px; margin: 10px 0 4px; }
#pechechat-root .pc-contact small { display: block; font-size: 10px; color: #686868; margin-top: 8px; }
#pechechat-root .pc-contact-send { padding: 8px 12px; margin-top: 8px; border: 0; border-radius: 7px; background: var(--pc-color, #b9202c); color: var(--pc-fg, #fff); font-weight: 600; }
#pechechat-root .pc-contact-error { color: #9b1c1c; }
#pechechat-root .pc-message p { color: inherit; margin: 0; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
#pechechat-root .pc-message small { display: block; margin-top: 5px; color: #696969; font-size: 10px; }
#pechechat-root .pc-older { display: block; margin: 0 auto 12px; padding: 6px 10px; background: white; border: 1px solid #ddd; color: #444; border-radius: 6px; font-size: 12px; }
#pechechat-root .pc-form { margin: 0; padding: 12px 14px 10px; border-top: 1px solid #e9e9e9; background: white; flex: 0 0 auto; }
#pechechat-root .pc-name-row { margin-bottom: 8px; }
#pechechat-root .pc-name-row label { display: block; margin: 0 0 4px; font-weight: 600; font-size: 12px; }
#pechechat-root .pc-name-row label span { font-weight: 400; color: #777; }
#pechechat-root input, #pechechat-root textarea { display: block; width: 100%; margin: 0; border: 1px solid #d1d1d1; border-radius: 8px; background: #fff; color: #222; padding: 9px 10px; box-shadow: none; }
#pechechat-root textarea { resize: vertical; min-height: 60px; max-height: 110px; }
#pechechat-root input::placeholder, #pechechat-root textarea::placeholder { color: #767676; opacity: 1; }
#pechechat-root .pc-compose-bottom { display: flex; gap: 8px; justify-content: space-between; align-items: center; margin-top: 8px; }
#pechechat-root .pc-compose-bottom span { color: #777; font-size: 10px; }
#pechechat-root .pc-send { border: 0; border-radius: 8px; padding: 8px 15px; background: var(--pc-color, #b9202c); color: var(--pc-fg, #fff); font-weight: 600; }
#pechechat-root .pc-error { color: #9b1c1c; background: #fff1f2; padding: 7px; margin: 8px 0 0; border-radius: 6px; font-size: 12px; }
#pechechat-root .pc-footer { font-size: 10px; color: #71717a; text-align: center; padding: 0 14px 10px; margin: 0; background: white; flex: 0 0 auto; }
#pechechat-root .pc-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 767px) {
  #pechechat-root { bottom: calc(var(--pc-mobile-bottom, 80px) + env(safe-area-inset-bottom, 0px)); }
  #pechechat-root.pc-root--right { right: 16px; } #pechechat-root.pc-root--left { left: 16px; }
  #pechechat-root .pc-launcher { width: 56px; height: 56px; padding: 14px; }
  #pechechat-root .pc-launcher span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #pechechat-root .pc-panel { height: min(590px, calc(100vh - var(--pc-mobile-bottom, 80px) - 92px)); height: min(590px, calc(100dvh - var(--pc-mobile-bottom, 80px) - 92px)); }
  #pechechat-root input, #pechechat-root textarea { font-size: 16px; }
}
@media (max-height: 550px) {
  #pechechat-root .pc-panel { position: fixed; inset: 8px 8px auto; width: auto; max-width: none; height: calc(100dvh - 16px); }
  #pechechat-root .pc-head { padding: 8px 14px; } #pechechat-root .pc-status, #pechechat-root .pc-footer { display: none; }
}
@media print { #pechechat-root { display: none !important; } }
