:root{--scrollbar-track-bg:#f8fafc;--scrollbar-thumb-bg:#e2e8f0;--scrollbar-thumb-hover-bg:#cbd5e1;--chat-bg:#f8fafc;--avatar-bot-bg:white;--chat-message-bg:white;--user-message-bg:#2563eb;--user-message-text:white;--bot-message-text:#374151}.dark,[data-theme=dark]{--scrollbar-track-bg:#1e293b;--scrollbar-thumb-bg:#475569;--scrollbar-thumb-hover-bg:#64748b;--chat-bg:#1e293b;--avatar-bot-bg:#334155;--chat-message-bg:#334155;--user-message-bg:#3b82f6;--user-message-text:#f8fafc;--bot-message-text:#f1f5f9}.chat-messages{scroll-behavior:smooth;overscroll-behavior-y:contain;background-color:var(--chat-bg);will-change:scroll-position;-webkit-overflow-scrolling:touch;background-image:linear-gradient(109.6deg,rgba(223,234,247,.5) 11.2%,rgba(244,248,252,.5) 91.1%);flex-direction:column;flex:1;padding:1.25rem;display:flex;position:relative;overflow-y:auto}.messages-container{flex-direction:column;width:100%;min-height:0;margin-top:auto;padding-bottom:12px;display:flex}.message-row{align-items:flex-start;width:100%;margin-bottom:1.25rem;display:flex}.message-bot{justify-content:flex-start}.message-user{justify-content:flex-end}.message-bubble{word-break:break-word;overflow-wrap:break-word;border-radius:.75rem;max-width:80%;padding:.625rem 1rem}.bot-message-bubble{color:#1f2937;background-color:#fff;background-image:linear-gradient(#fff 0%,#f3f4f6 100%);border-radius:.75rem .75rem .75rem .25rem;box-shadow:0 1px 2px rgba(0,0,0,.05)}.user-message-bubble{color:#fff;background-color:#3b82f6;background-image:linear-gradient(90deg,#3b82f6 0%,#60a5fa 100%);border-radius:.75rem .75rem .25rem;box-shadow:0 1px 2px rgba(0,0,0,.1)}.message-text{white-space:pre-line;font-size:.9375rem;line-height:1.5}.message-time{text-align:right;opacity:.7;margin-top:.375rem;font-size:.6875rem}.bot-message-bubble .message-time{color:#6b7280}.user-message-bubble .message-time{color:rgba(255,255,255,.8)}.avatar-bot{background-color:var(--avatar-bot-bg);background-image:linear-gradient(#eef1f5 0%,#e6e9f0 100%);border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;width:2rem;height:2rem;margin-right:.625rem;display:flex;box-shadow:0 2px 5px rgba(0,0,0,.1)}.avatar-user{background-color:#3b82f6;background-image:linear-gradient(90deg,#3b82f6 0%,#60a5fa 100%);border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;width:2rem;height:2rem;margin-left:.625rem;display:flex;box-shadow:0 2px 5px rgba(0,0,0,.1)}.typing-bubble{padding:.625rem .875rem}.scroll-anchor{visibility:hidden;width:100%;height:1px;margin-top:12px}.typing-cursor{vertical-align:text-bottom;background-color:currentColor;width:2px;height:1em;margin-left:2px;animation:1s step-end infinite blink;display:inline-block}@keyframes blink{0%,to{opacity:1}50%{opacity:0}}.chat-messages::-webkit-scrollbar{width:5px}@media (min-width:768px){.chat-messages::-webkit-scrollbar{width:7px}.avatar-bot,.avatar-user{width:2.5rem;height:2.5rem}.message-text{font-size:1rem}}.chat-messages::-webkit-scrollbar-track{background:var(--scrollbar-track-bg);border-radius:10px}.chat-messages::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb-bg);border-radius:10px}.chat-messages::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-thumb-hover-bg)}@media (max-width:767px){.chat-messages{padding:1rem}.message-bubble{max-width:90%;padding:.5rem .75rem}}.typing-indicator{align-items:center;display:flex}.typing-indicator span{opacity:.4;background-color:#3b82f6;border-radius:50%;width:7px;height:7px;margin:0 1px;display:inline-block}@media (min-width:768px){.typing-indicator span{width:8px;height:8px}}[data-theme=dark] .typing-indicator span{background-color:#60a5fa}.typing-indicator span:first-child{animation:1s infinite typing}.typing-indicator span:nth-child(2){animation:1s .2s infinite typing}.typing-indicator span:nth-child(3){animation:1s .4s infinite typing}@keyframes typing{0%,80%,to{opacity:.6;transform:scale(.6)}40%{opacity:1;transform:scale(1)}}@media (min-width:768px){@keyframes typing{0%{opacity:.4;transform:translateY(0)}50%{opacity:1;transform:translateY(-4px)}to{opacity:.4;transform:translateY(0)}}}.message-bubble-in{word-break:break-word;animation:.3s forwards fadeInLeft;box-shadow:0 4px 12px rgba(0,0,0,.15)}[data-theme=dark] .message-bubble-in{box-shadow:0 4px 12px rgba(0,0,0,.15)}.message-bubble-out{word-break:break-word;animation:.3s forwards fadeInRight;box-shadow:0 4px 12px rgba(59,130,246,.15)}@keyframes fadeInLeft{0%{opacity:0;transform:translate(-10px)}to{opacity:1;transform:translate(0)}}@keyframes fadeInRight{0%{opacity:0;transform:translate(10px)}to{opacity:1;transform:translate(0)}}.chat-button-pulse{transition:transform .3s,box-shadow .3s;position:relative;box-shadow:0 8px 16px rgba(37,99,235,.5)}.chat-button-pulse:hover{transform:translateY(-2px);box-shadow:0 10px 20px rgba(37,99,235,.5)}[data-theme=dark] .chat-button-pulse{box-shadow:0 8px 16px rgba(37,99,235,.5)}.chat-button-pulse:after{content:"";background-color:inherit;z-index:-1;border-radius:50%;width:100%;height:100%;animation:2s infinite pulse;position:absolute;top:0;left:0}@keyframes pulse{0%{opacity:.7;transform:scale(1)}70%{opacity:0;transform:scale(1.2)}to{opacity:0;transform:scale(1.2)}}.typing-cursor{background-color:currentColor;width:2px;height:1em;margin-left:2px;animation:.7s infinite blink;display:inline-block;position:relative;top:2px}.chat-messages{background-color:var(--chat-bg);background-image:linear-gradient(109.6deg,rgba(223,234,247,.5) 11.2%,rgba(244,248,252,.5) 91.1%);flex-direction:column;flex:1;min-height:0;padding:1.25rem;display:flex}[data-theme=dark] .chat-messages{background-image:linear-gradient(90deg,rgba(44,53,66,.9) 0%,rgba(59,70,88,.8) 100%)}.chat-window{border-radius:.75rem;flex-direction:column;width:495px;height:100%;max-height:90vh;transition:width .3s,height .3s;display:flex;overflow:hidden;box-shadow:0 10px 25px rgba(0,0,0,.15)}[data-theme=dark] .chat-window{box-shadow:0 10px 25px rgba(0,0,0,.3)}.chat-header{background-image:linear-gradient(90deg,#1e40af 0%,#3b82f6 100%);border-radius:.75rem .75rem 0 0;flex-shrink:0;padding:.875rem 1.25rem}[data-theme=dark] .chat-header{background-image:linear-gradient(90deg,#1e3a8a 0%,#3b82f6 100%)}@supports (-webkit-touch-callout:none){.chat-window{height:-webkit-fill-available;max-height:-webkit-fill-available;padding-bottom:env(safe-area-inset-bottom,0)}}@media (max-width:767px){.chat-window{border-radius:0;width:100%;height:100vh;max-height:100vh}.chat-header{border-radius:0}@supports (padding-top:env(safe-area-inset-top)){.chat-window{padding-top:env(safe-area-inset-top,0)}.chat-header{padding-top:calc(.875rem + env(safe-area-inset-top,0))}}}@media (min-width:768px) and (max-width:1023px){.chat-window{width:450px;height:640px}}.avatar-bot{background-color:var(--avatar-bot-bg);background-image:linear-gradient(#eef1f5 0%,#e6e9f0 100%);border-radius:50%;justify-content:center;align-items:center;width:1.75rem;height:1.75rem;display:flex;box-shadow:0 2px 5px rgba(0,0,0,.1)}@media (min-width:768px){.avatar-bot{width:2.25rem;height:2.25rem}}[data-theme=dark] .avatar-bot{background-image:linear-gradient(90deg,#3a4556 0%,#475a7b 100%);box-shadow:0 2px 5px rgba(0,0,0,.2)}.avatar-user{background-color:#3b82f6;background-image:linear-gradient(90deg,#3b82f6 0%,#60a5fa 100%);border-radius:50%;justify-content:center;align-items:center;width:1.75rem;height:1.75rem;display:flex;box-shadow:0 2px 5px rgba(0,0,0,.1)}@media (min-width:768px){.avatar-user{width:2.25rem;height:2.25rem}}[data-theme=dark] .avatar-user{box-shadow:0 2px 5px rgba(0,0,0,.3)}.bot-message-bubble{background-color:var(--chat-message-bg);background-image:linear-gradient(#fff 0%,#f3f4f6 100%);border-radius:.75rem .75rem .75rem .25rem;max-width:90%;box-shadow:0 1px 2px rgba(0,0,0,.05)}.bot-message-bubble .message-text{color:var(--bot-message-text)}[data-theme=dark] .bot-message-bubble{color:#e2e8f0;background-color:#3a4556;background-image:linear-gradient(90deg,#3a4556 0%,#475a7b 100%);box-shadow:0 1px 2px rgba(0,0,0,.2)}[data-theme=dark] .bot-message-bubble .message-text{color:#e2e8f0}[data-theme=dark] .bot-message-bubble .message-time{color:#a0aec0}.user-message-bubble{background-color:var(--user-message-bg);background-image:linear-gradient(90deg,#3b82f6 0%,#60a5fa 100%);border-radius:.75rem .75rem .25rem;box-shadow:0 1px 2px rgba(0,0,0,.1)}.user-message-bubble .message-text{color:var(--user-message-text)}.chat-messages .flex-grow{flex-direction:column;justify-content:flex-end;display:flex}.typing-indicator{justify-content:center;align-items:center;width:40px;height:20px;display:flex}.scroll-to-bottom-btn{color:#fff;cursor:pointer;z-index:10;background-color:#3b82f6;border:none;border-radius:8px;justify-content:center;align-items:center;width:40px;height:40px;transition:all .2s;animation:.3s ease-in-out fadeIn,1.5s ease-in-out infinite bounce;display:flex;position:absolute;bottom:70px;right:20px;box-shadow:0 2px 10px rgba(0,0,0,.2)}.arrow-icon{animation:1s ease-in-out infinite arrowBounce}@keyframes arrowBounce{0%,to{transform:translateY(0)}50%{transform:translateY(3px)}}.scroll-to-bottom-btn:after{content:"";z-index:-1;background-color:#3b82f6;border-radius:8px;width:100%;height:100%;animation:2s infinite pulse;position:absolute;top:0;left:0}.scroll-to-bottom-btn:hover{background-color:#2563eb;animation:none;transform:translateY(-2px);box-shadow:0 4px 12px rgba(0,0,0,.3)}.scroll-to-bottom-btn:hover:after,.scroll-to-bottom-btn:hover .arrow-icon{animation:none}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes bounce{0%,to{transform:translateY(0)}50%{transform:translateY(-6px)}}.typing-indicator span{background-color:#94a3b8;border-radius:50%;width:6px;height:6px;margin:0 2px;animation:1.4s ease-in-out infinite both typing;display:inline-block}.typing-indicator span:first-child{animation-delay:0s}.typing-indicator span:nth-child(2){animation-delay:.2s}.typing-indicator span:nth-child(3){animation-delay:.4s}.online-status-dot{background-color:#4ade80;border-radius:50%;width:8px;height:8px;margin-right:6px;animation:2s infinite online-pulse;display:inline-block;position:relative;box-shadow:0 0 rgba(74,222,128,.4)}[data-theme=dark] .online-status-dot{background-color:#4ade80;box-shadow:0 0 rgba(74,222,128,.6)}@keyframes online-pulse{0%{box-shadow:0 0 rgba(74,222,128,.4)}70%{box-shadow:0 0 0 6px rgba(74,222,128,0)}to{box-shadow:0 0 rgba(74,222,128,0)}}.chat-widget-container{z-index:9999;pointer-events:none;width:0;height:0;position:fixed;bottom:0;right:0;overflow:visible}.chat-widget-container>*{pointer-events:auto}.chat-button-wrapper{z-index:9997;position:fixed;bottom:20px;right:20px}.chat-header{color:#fff;background-color:#4b69b1;border-bottom:1px solid rgba(255,255,255,.1);justify-content:space-between;align-items:center;padding:12px 16px;display:flex}[data-theme=dark] .chat-header{background-color:#4b69b1;border-bottom:1px solid rgba(255,255,255,.1)}.input-area{background-color:var(--chat-bg);border-top:1px solid rgba(0,0,0,.05);padding:10px 12px}[data-theme=dark] .input-area{border-top:1px solid rgba(255,255,255,.05)}.input-area-container{z-index:10;background-color:#fff;border-top:1px solid rgba(226,232,240,.8);border-radius:0 0 1.25rem 1.25rem;flex-shrink:0;margin-top:auto;position:relative;overflow:hidden}[data-theme=dark] .input-area-container{background-color:#2c3542;border-top:1px solid rgba(71,85,105,.8)}.input-area{align-items:center;gap:.875rem;padding:.875rem 1.25rem;display:flex;position:relative}[data-theme=dark] .input-area{background-color:#2c3542}.message-input{resize:none;background-color:#f8fafc;border:1px solid #e2e8f0;border-radius:1.5rem;outline:none;width:100%;height:50px;max-height:150px;padding:.875rem 1.25rem;font-size:.95rem;line-height:1.5;transition:all .2s;overflow-y:auto;box-shadow:0 1px 2px rgba(0,0,0,.05)}.confirmation-input{text-align:center;padding:.75rem 1rem;font-size:1rem}.helper-text{text-align:center;color:#64748b;background-color:rgba(226,232,240,.3);border-top:1px solid rgba(226,232,240,.8);padding:.5rem 0;font-size:.75rem;line-height:1.2}[data-theme=dark] .helper-text{color:#94a3b8;background-color:rgba(51,65,85,.3);border-top:1px solid rgba(71,85,105,.8)}.message-input:focus{border-color:rgba(59,130,246,.5);box-shadow:0 2px 4px rgba(59,130,246,.1)}[data-theme=dark] .message-input{color:#e2e8f0;background-color:#3a4556;border-color:rgba(71,85,105,.8)}[data-theme=dark] .message-input::placeholder{color:#94a3b8}[data-theme=dark] .message-input::-moz-placeholder{color:#94a3b8}[data-theme=dark] .message-input::placeholder{color:#94a3b8}[data-theme=dark] .message-input::placeholder{color:#94a3b8}[data-theme=dark] .message-input:focus{border-color:rgba(59,130,246,.5);box-shadow:0 2px 4px rgba(59,130,246,.2)}.send-button{color:#fff;cursor:pointer;background-color:#3b82f6;background-image:linear-gradient(135deg,#3b82f6 0%,#2563eb 100%);border:none;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;width:50px;height:50px;transition:all .2s;display:flex;box-shadow:0 2px 5px rgba(37,99,235,.3)}.send-button:hover{background-image:linear-gradient(135deg,#2563eb 0%,#1d4ed8 100%);transform:scale(1.05);box-shadow:0 4px 8px rgba(37,99,235,.4)}.send-button:disabled{opacity:.6;cursor:not-allowed;background-image:linear-gradient(135deg,#93c5fd 0%,#60a5fa 100%);transform:scale(1)}.cancel-button{color:#ef4444;cursor:pointer;background-color:rgba(239,68,68,.1);border:none;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;width:42px;height:42px;transition:all .2s;display:flex}.cancel-button:hover{background-color:rgba(239,68,68,.2)}[data-theme=dark] .cancel-button{color:#f87171;background-color:rgba(239,68,68,.2)}[data-theme=dark] .cancel-button:hover{background-color:rgba(239,68,68,.3)}@supports (padding-bottom:env(safe-area-inset-bottom)){.input-area-container{padding-bottom:env(safe-area-inset-bottom)}}@media (max-width:767px){.helper-text{padding:.5rem 1rem;font-size:.75rem}.confirmation-input{text-align:center;padding:.75rem .5rem;font-size:16px}.chat-button-pulse:after{transform-origin:50%;animation:2s infinite pulse}@keyframes pulse{0%{opacity:.7;transform:scale(1)}70%{opacity:0;transform:scale(1.15)}to{opacity:0;transform:scale(1.15)}}.chat-window{z-index:9999!important;width:100%!important;height:100%!important;max-height:100vh!important;box-shadow:none!important;padding-bottom:env(safe-area-inset-bottom,0px)!important;padding-top:env(safe-area-inset-top,0px)!important;border-radius:0!important;position:fixed!important;bottom:0!important;right:0!important}.chat-header,.input-area{border-radius:0!important}.avatar-bot,.avatar-user{width:2rem!important;height:2rem!important}.message-bubble{max-width:90%!important;padding:10px 12px!important}.send-button{width:46px!important;height:46px!important;padding:8px!important}.message-input{padding:10px 12px!important;font-size:16px!important}.input-area{padding:.75rem 1rem}.cancel-button{width:40px;height:40px}.helper-text{background-color:rgba(226,232,240,.5)!important;padding:8px 12px!important;font-size:13px!important;line-height:1.3!important}[data-theme=dark] .helper-text{color:#cbd5e1!important;background-color:rgba(51,65,85,.5)!important}.confirmation-input{text-align:center!important;height:46px!important;padding:12px 8px!important;font-size:16px!important}.fullscreen-overlay{opacity:0!important;visibility:hidden!important;pointer-events:none!important;-webkit-backdrop-filter:none!important;background-color:transparent!important;display:none!important}.fullscreen-overlay.active{opacity:0!important;visibility:hidden!important;display:none!important}}@media (min-width:768px) and (max-width:1023px){.chat-window{width:540px!important;height:768px!important;max-height:85vh!important}.message-bubble{max-width:85%}.chat-header{border-radius:12px 12px 0 0!important}}@media (min-width:1024px){.chat-window{max-width:660px!important}.message-bubble{max-width:80%}.chat-header{border-radius:12px 12px 0 0!important}}@keyframes shake{0%,to{transform:translate(0)}25%{transform:translate(-3px)}50%{transform:translate(3px)}75%{transform:translate(-3px)}}.envelope-button-disabled:active{animation:.4s ease-in-out shake}@media (min-width:768px){.fullscreen-overlay{z-index:9998;-webkit-backdrop-filter:blur(4px);opacity:0;pointer-events:none;background-color:rgba(0,0,0,.5);width:100%;height:100%;transition:opacity .3s ease-in-out;display:none;position:fixed;top:0;bottom:0;left:0;right:0}.fullscreen-overlay.active{opacity:1;pointer-events:auto;display:block}}@media (prefers-color-scheme:dark){.bot-message-bubble,.user-message-bubble,.avatar-bot{background-image:none!important}}[data-theme=dark] .bot-message-bubble,.dark .bot-message-bubble,[data-theme=dark] .user-message-bubble,.dark .user-message-bubble,[data-theme=dark] .avatar-bot,.dark .avatar-bot{background-image:none!important}
