/* chatbot.css */
#syed-chatbot-container {
    position: fixed;
    bottom: 92px; /* Positioned above the WhatsApp button */
    right: 20px;  /* Aligned vertically with WhatsApp button */
    z-index: 100;
    font-family: 'Poppins', sans-serif;
}

#syed-chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #293B51, #1e2a3b);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(41, 59, 81, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

#syed-chatbot-toggle:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(41, 59, 81, 0.6);
}

#syed-chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    height: 550px;
    max-height: 80vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transform: scale(0);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    pointer-events: none;
}

#syed-chatbot-window.open {
    transform: scale(1);
    opacity: 1;
    pointer-events: all;
}

.sc-header {
    background: #293B51;
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #F26B35;
}

.sc-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sc-avatar {
    width: 35px;
    height: 35px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #F26B35;
    font-size: 18px;
}

.sc-title {
    font-weight: 600;
    font-size: 15px;
    margin: 0;
}

.sc-subtitle {
    font-size: 11px;
    color: #cbd5e1;
    margin: 0;
}

.sc-close {
    cursor: pointer;
    font-size: 20px;
    color: white;
    opacity: 0.8;
    transition: opacity 0.2s;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.sc-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.sc-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #f8fafc;
}

.sc-body::-webkit-scrollbar {
    width: 6px;
}
.sc-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.sc-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    animation: fadeInMsg 0.3s ease-out forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes fadeInMsg {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sc-message.bot {
    align-self: flex-start;
    background: white;
    color: #334155;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
}

.sc-message.user {
    align-self: flex-end;
    background: #F26B35;
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(242, 107, 53, 0.2);
}

.sc-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.sc-option-btn {
    background: rgba(41, 59, 81, 0.05);
    border: 1px solid #293B51;
    color: #293B51;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.sc-option-btn:hover {
    background: #293B51;
    color: white;
}

.sc-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.sc-chat-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    background: white;
    color: #334155;
}

.sc-chat-input:focus {
    border-color: #F26B35;
}

.sc-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #F26B35;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.sc-send:hover {
    background: #d95a2b;
    transform: scale(1.05);
}

.sc-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 15px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    width: fit-content;
}

.sc-dot {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.sc-dot:nth-child(1) { animation-delay: 0s; }
.sc-dot:nth-child(2) { animation-delay: 0.2s; }
.sc-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.sc-whatsapp-btn {
    background: #25D366;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    border: none;
    cursor: pointer;
}
.sc-whatsapp-btn:hover {
    background: #1fb85a;
}

@media (max-width: 480px) {
    #syed-chatbot-window {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    #syed-chatbot-container {
        right: 16px;
        bottom: 82px;
    }
}
