/* PEIA Pierrot v7.1 - CSS */
#pierrot7-btn,#pierrot7-btn *,#pierrot7-modal,#pierrot7-modal *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;}

#pierrot7-btn{
    position:fixed;
    bottom:24px;
    width:80px;height:80px;
    border-radius:50%;
    background:linear-gradient(135deg,#0A2463 0%,#E8622A 100%);
    border:4px solid #fff;
    cursor:pointer;
    z-index:2147483647;
    box-shadow:0 6px 20px rgba(10,36,99,.4),0 0 0 0 rgba(232,98,42,.6);
    animation:pierrot7Pulse 2.5s infinite;
    padding:0;margin:0;outline:none;overflow:hidden;
    -webkit-tap-highlight-color:transparent;
    touch-action:manipulation;
    transition:transform .2s ease;
}
#pierrot7-btn.pierrot-pos-right{right:24px;left:auto;}
#pierrot7-btn.pierrot-pos-left{left:24px;right:auto;}
#pierrot7-btn:hover,#pierrot7-btn:focus{transform:scale(1.1);}
#pierrot7-btn:active{transform:scale(.95);}
#pierrot7-btn svg{width:100%;height:100%;display:block;pointer-events:none;}

@keyframes pierrot7Pulse{
    0%,100%{box-shadow:0 6px 20px rgba(10,36,99,.4),0 0 0 0 rgba(232,98,42,.6);}
    50%{box-shadow:0 6px 28px rgba(10,36,99,.5),0 0 0 16px rgba(232,98,42,0);}
}

#pierrot7-badge{
    position:absolute;top:-6px;right:-6px;
    width:24px;height:24px;border-radius:50%;
    background:#dc2626;color:#fff;
    font-size:13px;font-weight:bold;
    display:flex;align-items:center;justify-content:center;
    border:2px solid #fff;
    box-shadow:0 2px 6px rgba(0,0,0,.3);
    animation:pierrot7Bounce 1.5s ease-in-out infinite;
    pointer-events:none;
}
@keyframes pierrot7Bounce{0%,100%{transform:translateY(0);}50%{transform:translateY(-4px);}}

#pierrot7-modal{
    position:fixed;
    bottom:120px;
    width:400px;
    max-width:calc(100vw - 32px);
    max-height:600px;
    background:#fff;
    border-radius:20px;
    box-shadow:0 20px 60px rgba(0,0,0,.25),0 0 0 1px rgba(0,0,0,.05);
    z-index:2147483646;
    display:none;
    flex-direction:column;
    overflow:hidden;
    animation:pierrot7Slide .3s ease-out;
}
#pierrot7-modal.pierrot-pos-right{right:24px;left:auto;}
#pierrot7-modal.pierrot-pos-left{left:24px;right:auto;}
#pierrot7-modal.open{display:flex;}
@keyframes pierrot7Slide{from{opacity:0;transform:translateY(20px);}to{opacity:1;transform:translateY(0);}}

#pierrot7-header{
    background:linear-gradient(135deg,#0A2463 0%,#E8622A 100%);
    color:#fff;
    padding:14px 16px;
    display:flex;align-items:center;gap:12px;
}
#pierrot7-avatar{
    width:54px;height:54px;
    border-radius:50%;
    background:rgba(255,255,255,.2);
    flex-shrink:0;
    overflow:hidden;
    border:2px solid rgba(255,255,255,.4);
}
#pierrot7-avatar svg{width:100%;height:100%;}
#pierrot7-avatar.talking{animation:pierrot7Talk .4s ease-in-out infinite;}
@keyframes pierrot7Talk{0%,100%{transform:rotate(0);}25%{transform:rotate(-3deg);}75%{transform:rotate(3deg);}}

#pierrot7-header-info{flex:1;min-width:0;}
#pierrot7-header-name{font-size:16px;font-weight:700;margin:0;line-height:1.2;}
#pierrot7-header-status{
    font-size:12px;opacity:.95;margin-top:3px;
    display:flex;align-items:center;gap:6px;
}
#pierrot7-header-status::before{
    content:'';width:8px;height:8px;border-radius:50%;
    background:#22c55e;box-shadow:0 0 8px #22c55e;
    animation:pierrot7Blink 2s infinite;
}
@keyframes pierrot7Blink{0%,100%{opacity:1;}50%{opacity:.5;}}

.pierrot7-icon-btn{
    width:34px;height:34px;
    border-radius:50%;
    background:rgba(255,255,255,.2);
    border:none;color:#fff;
    font-size:14px;cursor:pointer;
    display:flex;align-items:center;justify-content:center;
    transition:background .2s;
    -webkit-tap-highlight-color:transparent;
    touch-action:manipulation;
    padding:0;
}
.pierrot7-icon-btn:hover,.pierrot7-icon-btn:active{background:rgba(255,255,255,.35);}
#pierrot7-close{font-size:22px;font-weight:bold;}

#pierrot7-messages{
    flex:1;overflow-y:auto;
    padding:16px;background:#f8fafc;
    display:flex;flex-direction:column;gap:10px;
}
.pierrot7-msg{
    max-width:85%;padding:10px 14px;border-radius:16px;
    font-size:14px;line-height:1.5;
    animation:pierrot7Pop .25s ease-out;
    word-wrap:break-word;
}
@keyframes pierrot7Pop{from{opacity:0;transform:scale(.92);}to{opacity:1;transform:scale(1);}}

.pierrot7-msg-bot{
    background:#fff;color:#0A2463;
    border-bottom-left-radius:4px;
    align-self:flex-start;
    box-shadow:0 1px 3px rgba(0,0,0,.05);
}
.pierrot7-msg-user{
    background:linear-gradient(135deg,#0A2463,#E8622A);color:#fff;
    border-bottom-right-radius:4px;align-self:flex-end;
}

.pierrot7-typing{display:flex;gap:4px;padding:14px 18px;}
.pierrot7-typing span{
    width:7px;height:7px;border-radius:50%;
    background:#0A2463;opacity:.4;
    animation:pierrot7Typing 1.4s infinite;
}
.pierrot7-typing span:nth-child(2){animation-delay:.2s;}
.pierrot7-typing span:nth-child(3){animation-delay:.4s;}
@keyframes pierrot7Typing{0%,60%,100%{opacity:.4;transform:scale(.8);}30%{opacity:1;transform:scale(1);}}

#pierrot7-suggestions{
    padding:0 16px 12px;
    display:flex;flex-wrap:wrap;gap:6px;
    background:#f8fafc;
}
.pierrot7-suggestion{
    padding:7px 12px;
    background:#fff;
    border:1.5px solid #E8622A;
    color:#E8622A;
    border-radius:16px;
    font-size:12px;font-weight:600;
    cursor:pointer;
    transition:all .2s;
    font-family:inherit;
    -webkit-tap-highlight-color:transparent;
}
.pierrot7-suggestion:hover,.pierrot7-suggestion:active{
    background:#E8622A;color:#fff;transform:translateY(-1px);
}

.pierrot7-bigchoice{
    display:grid;grid-template-columns:1fr 1fr;gap:10px;
    padding:0 16px 14px;background:#f8fafc;
}
.pierrot7-bigbtn{
    padding:18px 12px;
    background:#fff;
    border:2.5px solid #0A2463;
    color:#0A2463;
    border-radius:14px;
    font-size:14px;font-weight:700;
    cursor:pointer;font-family:inherit;
    display:flex;flex-direction:column;align-items:center;gap:6px;
    transition:all .2s;
    -webkit-tap-highlight-color:transparent;
}
.pierrot7-bigbtn:hover,.pierrot7-bigbtn:active{
    background:linear-gradient(135deg,#0A2463,#E8622A);
    color:#fff;border-color:transparent;
    transform:translateY(-2px);
}
.pierrot7-bigbtn-emoji{font-size:32px;line-height:1;}

.pierrot7-action{margin:4px 0 6px;align-self:flex-start;}
.pierrot7-action a{
    display:inline-block;
    padding:11px 18px;
    background:linear-gradient(135deg,#0A2463,#E8622A);
    color:#fff;border-radius:24px;
    text-decoration:none;font-weight:700;font-size:13px;
    box-shadow:0 4px 12px rgba(10,36,99,.3);
    transition:transform .2s;
}
.pierrot7-action a:hover{transform:scale(1.05);}

#pierrot7-input-row{
    display:flex;gap:8px;
    padding:12px 14px;background:#fff;
    border-top:1px solid #e2e8f0;
}
#pierrot7-input{
    flex:1;
    border:1.5px solid #e2e8f0;
    border-radius:22px;
    padding:10px 16px;
    font-size:14px;font-family:inherit;
    outline:none;
    transition:border-color .2s;
}
#pierrot7-input:focus{border-color:#E8622A;}
#pierrot7-send{
    width:44px;height:44px;
    border-radius:50%;
    background:linear-gradient(135deg,#0A2463,#E8622A);
    color:#fff;border:none;
    font-size:18px;cursor:pointer;
    flex-shrink:0;
    transition:transform .2s;
    -webkit-tap-highlight-color:transparent;
    touch-action:manipulation;
}
#pierrot7-send:hover,#pierrot7-send:active{transform:scale(1.08);}

@media (max-width:480px){
    #pierrot7-modal{
        bottom:100px;
        width:calc(100vw - 24px);
        max-height:calc(100vh - 130px);
    }
    #pierrot7-modal.pierrot-pos-right{right:12px;left:auto;}
    #pierrot7-modal.pierrot-pos-left{left:12px;right:auto;}
    #pierrot7-btn{width:70px;height:70px;}
}

.pierrot-eye-l,.pierrot-eye-r{transform-origin:center;animation:pierrotBlink 5s ease-in-out infinite;}
.pierrot-eye-r{animation-delay:.05s;}
@keyframes pierrotBlink{0%,88%,100%{transform:scaleY(1);}91%,93%{transform:scaleY(.1);}}

.pierrot-hat{transform-origin:50% 100%;animation:pierrotHat 5s ease-in-out infinite;}
@keyframes pierrotHat{0%,60%,100%{transform:rotate(0);}65%,80%{transform:rotate(-12deg) translateY(-3px);}}
