/* BHS Spiritual Guide Chatbot Widget */
.bhs-chatbot-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6f00, #ff8f00);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 111, 0, 0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, box-shadow 0.3s;
}
.bhs-chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(255, 111, 0, 0.5);
}
.bhs-chatbot-toggle svg {
    width: 34px;
    height: 34px;
    fill: white;
}
.bhs-chatbot-toggle .close-icon { display: none; }
.bhs-chatbot-toggle.open .chat-icon { display: none; }
.bhs-chatbot-toggle.open .close-icon { display: block; }

.bhs-chatbot-window {
    position: fixed;
    bottom: 110px;
    right: 24px;
    width: 440px;
    max-width: calc(100vw - 32px);
    height: 620px;
    max-height: calc(100vh - 140px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    z-index: 9998;
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.bhs-chatbot-window.open {
    display: flex;
    animation: bhs-slide-up 0.3s ease;
}
@keyframes bhs-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.bhs-chatbot-header {
    background: linear-gradient(135deg, #ff6f00, #e65100);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.bhs-chatbot-header .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.bhs-chatbot-header .info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}
.bhs-chatbot-header .info p {
    margin: 0;
    font-size: 12px;
    opacity: 0.85;
}
.bhs-lang-btn {
    margin-left: auto;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    border-radius: 16px;
    padding: 4px 12px;
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
}
.bhs-lang-btn:hover {
    background: rgba(255,255,255,0.35);
}

.bhs-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #faf7f2;
}
.bhs-chatbot-messages::-webkit-scrollbar { width: 4px; }
.bhs-chatbot-messages::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

.bhs-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14.5px;
    line-height: 1.55;
    word-wrap: break-word;
    white-space: pre-wrap;
}
.bhs-msg.bot {
    align-self: flex-start;
    background: #fff;
    color: #333;
    border: 1px solid #eee;
    border-bottom-left-radius: 4px;
}
.bhs-msg.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #ff6f00, #ff8f00);
    color: white;
    border-bottom-right-radius: 4px;
}
.bhs-msg.typing {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #eee;
    padding: 12px 18px;
}
.bhs-typing-dots span {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #999;
    margin: 0 2px;
    animation: bhs-bounce 1.4s infinite both;
}
.bhs-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.bhs-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bhs-bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
}

.bhs-chatbot-input {
    padding: 12px 16px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 8px;
    background: #fff;
}
.bhs-chatbot-input input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 24px;
    padding: 12px 18px;
    font-size: 14.5px;
    outline: none;
    transition: border-color 0.2s;
}
.bhs-chatbot-input input:focus {
    border-color: #ff6f00;
}
.bhs-chatbot-input button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6f00, #ff8f00);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    flex-shrink: 0;
}
.bhs-chatbot-input button:hover { transform: scale(1.05); }
.bhs-chatbot-input button:disabled { opacity: 0.5; cursor: not-allowed; }
.bhs-chatbot-input button svg {
    width: 18px;
    height: 18px;
    fill: white;
}

.bhs-chatbot-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 12px;
    background: #faf7f2;
}
.bhs-chatbot-suggestions button {
    background: #fff;
    border: 1px solid #e0d5c5;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    color: #8b5e3c;
    cursor: pointer;
    transition: all 0.2s;
}
.bhs-chatbot-suggestions button:hover {
    background: #ff6f00;
    color: white;
    border-color: #ff6f00;
}

.bhs-chatbot-footer {
    padding: 8px 16px;
    text-align: center;
    font-size: 10.5px;
    color: #999;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}
.bhs-chatbot-footer a {
    color: #ff6f00;
    text-decoration: none;
    font-weight: 600;
}
.bhs-chatbot-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .bhs-chatbot-window {
        bottom: 0;
        right: 0;
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    .bhs-chatbot-toggle { bottom: 16px; right: 16px; }
}
