/* PeaceFE — live chat widget */
.pf-chat{position:fixed;bottom:20px;inset-inline-end:20px;z-index:120;font-family:'Segoe UI',system-ui,Arial,sans-serif}
.pf-chat [hidden]{display:none!important}
.pf-chat > .pf-chat-bubble{width:60px;height:60px;border-radius:50%;border:0;cursor:pointer;background:#0f7a4d;color:#fff;
  box-shadow:0 12px 30px rgba(15,82,50,.35);font-size:1.6rem;display:grid;place-items:center;transition:.2s}
.pf-chat > .pf-chat-bubble:hover{transform:translateY(-3px);background:#0f5132}
.pf-chat.is-open > .pf-chat-bubble{display:none}

.pf-chat-panel{position:fixed;bottom:20px;inset-inline-end:20px;width:min(380px,calc(100vw - 32px));
  height:min(580px,calc(100vh - 40px));background:#fff;border-radius:18px;box-shadow:0 24px 60px rgba(11,61,46,.3);
  display:flex;flex-direction:column;overflow:hidden;animation:pfchat-in .2s ease}
@keyframes pfchat-in{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:none}}

.pf-chat-head{background:#0f5132;color:#fff;padding:14px 16px;display:flex;align-items:center;justify-content:space-between;gap:10px}
.pf-chat-head-id{display:flex;align-items:center;gap:10px}
.pf-chat-avatar{width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.16);display:grid;place-items:center;font-size:1.2rem}
.pf-chat-head-id strong{display:block;font-size:1rem}
.pf-chat-status{font-size:.74rem;color:#bfe6d6}
.pf-chat-close{background:none;border:0;color:#fff;font-size:1.6rem;cursor:pointer;line-height:1}

.pf-chat-intake{padding:18px;display:flex;flex-direction:column;gap:10px;overflow:auto}
.pf-chat-intro{margin:0 0 4px;color:#3c4c45;font-size:.92rem}
.pf-chat-intake input,.pf-chat-intake select{padding:.65rem .8rem;border:1.5px solid #e3ece8;border-radius:10px;font:inherit;font-size:.95rem}
.pf-chat-intake input:focus,.pf-chat-intake select:focus{outline:none;border-color:#15936b}
.pf-chat-start-btn{margin-top:4px;background:#0f7a4d;color:#fff;border:0;border-radius:10px;padding:.7rem;font-weight:700;cursor:pointer;font:inherit}
.pf-chat-start-btn:hover{background:#0f5132}
.pf-chat-error{color:#c0392b;font-size:.85rem;margin:0}

.pf-chat-body{flex:1;overflow:auto;padding:16px;display:flex;flex-direction:column;gap:10px;background:#f5faf7}
.pf-chat-msg{max-width:80%;display:flex;flex-direction:column}
.pf-chat-user{align-self:flex-start;align-items:flex-start}
.pf-chat-sheikh{align-self:flex-end;align-items:flex-end}
.pf-chat-msg .pf-chat-bubble{padding:9px 13px;border-radius:14px;font-size:.95rem;line-height:1.5;word-break:break-word}
.pf-chat-user .pf-chat-bubble{background:#fff;border:1px solid #e3ece8;color:#11221c;border-bottom-left-radius:4px}
.pf-chat-sheikh .pf-chat-bubble{background:#0f7a4d;color:#fff;border-bottom-right-radius:4px}
.pf-chat-at{font-size:.68rem;color:#85958c;margin-top:3px}
[dir="rtl"] .pf-chat-user{align-self:flex-end;align-items:flex-end}
[dir="rtl"] .pf-chat-sheikh{align-self:flex-start;align-items:flex-start}

.pf-chat-typing .pf-chat-bubble{display:flex;gap:4px}
.pf-chat-typing span{width:7px;height:7px;border-radius:50%;background:rgba(255,255,255,.8);animation:pfchat-blink 1.2s infinite}
.pf-chat-typing span:nth-child(2){animation-delay:.2s}
.pf-chat-typing span:nth-child(3){animation-delay:.4s}
@keyframes pfchat-blink{0%,60%,100%{opacity:.3}30%{opacity:1}}

.pf-chat-compose{display:flex;gap:8px;padding:12px;border-top:1px solid #e3ece8;align-items:flex-end}
.pf-chat-compose textarea{flex:1;resize:none;border:1.5px solid #e3ece8;border-radius:12px;padding:.6rem .8rem;font:inherit;font-size:.95rem;max-height:120px}
.pf-chat-compose textarea:focus{outline:none;border-color:#15936b}
.pf-chat-compose button{width:42px;height:42px;border-radius:50%;border:0;background:#0f7a4d;color:#fff;font-size:1.1rem;cursor:pointer;flex-shrink:0}
.pf-chat-compose button:hover{background:#0f5132}

@media(max-width:480px){
  .pf-chat-panel{inset:0;width:100vw;height:100vh;border-radius:0}
}
