/* Chatbot Wrapper */
#sgc-chatbot-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Outfit', sans-serif;
}

/* Chatbot Toggle Button */
#sgc-chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #8b5cf6);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#sgc-chatbot-toggle:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

#sgc-chatbot-toggle svg {
    width: 28px;
    height: 28px;
}

/* Chatbot Window */
#sgc-chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    max-width: calc(100vw - 40px);
    height: 500px;
    max-height: calc(100vh - 120px);
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#sgc-chatbot-window.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Header */
#sgc-chatbot-header {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

#sgc-chatbot-header-title {
    font-weight: 600;
    font-size: 16px;
    background: linear-gradient(to right, #0ea5e9, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

#sgc-chatbot-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s ease;
}

#sgc-chatbot-close:hover {
    color: white;
}

/* Messages Area */
#sgc-chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#sgc-chatbot-messages::-webkit-scrollbar {
    width: 6px;
}
#sgc-chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}
#sgc-chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sgc-message {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.sgc-message.user {
    align-self: flex-end;
    background: #0ea5e9;
    color: white;
    border-bottom-right-radius: 4px;
}

.sgc-message.bot {
    align-self: flex-start;
    background: rgba(30, 41, 59, 0.8);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom-left-radius: 4px;
}

.sgc-message.bot a {
    color: #0ea5e9;
    text-decoration: underline;
}

/* Input Area */
#sgc-chatbot-input-area {
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
}

#sgc-chatbot-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 10px 15px;
    color: white;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

#sgc-chatbot-input:focus {
    border-color: #0ea5e9;
}

#sgc-chatbot-input::placeholder {
    color: #64748b;
}

#sgc-chatbot-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #8b5cf6);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

#sgc-chatbot-send:hover {
    transform: scale(1.05);
}

#sgc-chatbot-send:disabled {
    background: #475569;
    cursor: not-allowed;
    transform: none;
}

/* Typing indicator */
.sgc-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    align-items: center;
    height: 10px;
}
.sgc-typing span {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: sgc-bounce 1.4s infinite ease-in-out both;
}
.sgc-typing span:nth-child(1) { animation-delay: -0.32s; }
.sgc-typing span:nth-child(2) { animation-delay: -0.16s; }
@keyframes sgc-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}
