/* ScrapGaadi Lead Chatbot — styles (Green theme) */

:root {
    --sg-accent: #1E9E5A;
    --sg-accent-hover: #17824A;
    --sg-accent-dark: #0F6E3E;
}

#sgChatBubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--sg-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(30, 158, 90, 0.45);
    z-index: 9998;
    transition: transform 0.2s ease;
}

#sgChatBubble:hover {
    transform: scale(1.08);
}

#sgChatBubble svg {
    width: 28px;
    height: 28px;
    fill: #ffffff;
}

#sgChatBubble .sg-notify-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffcc00;
    border: 2px solid #1a1a1a;
}

#sgChatWindow {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 340px;
    max-width: calc(100vw - 32px);
    height: 480px;
    max-height: calc(100vh - 140px);
    background: #17171a;
    border: 1px solid #2c2c30;
    border-radius: 16px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    font-family: 'Segoe UI', Arial, sans-serif;
}

#sgChatWindow.sg-open {
    display: flex;
}

.sg-chat-header {
    background: linear-gradient(135deg, var(--sg-accent), var(--sg-accent-dark));
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.sg-chat-header img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    object-fit: contain;
}

.sg-chat-header-text h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.sg-chat-header-text span {
    font-size: 12px;
    opacity: 0.9;
}

.sg-chat-close {
    margin-left: auto;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    background: none;
    border: none;
    color: #fff;
    opacity: 0.85;
}

.sg-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #101012;
}

.sg-msg {
    max-width: 82%;
    padding: 9px 13px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.45;
    word-wrap: break-word;
    white-space: pre-line;
}

.sg-msg.bot {
    align-self: flex-start;
    background: #232327;
    color: #f0f0f0;
    border-bottom-left-radius: 4px;
}

.sg-msg.user {
    align-self: flex-end;
    background: var(--sg-accent);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.sg-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-self: flex-start;
    max-width: 100%;
}

.sg-option-btn {
    background: transparent;
    border: 1px solid var(--sg-accent);
    color: var(--sg-accent);
    padding: 7px 13px;
    border-radius: 20px;
    font-size: 12.5px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.sg-option-btn:hover {
    background: rgba(30, 158, 90, 0.15);
}

.sg-chat-footer {
    display: flex;
    border-top: 1px solid #2c2c30;
    padding: 10px;
    gap: 8px;
    background: #17171a;
}

.sg-chat-footer input {
    flex: 1;
    background: #232327;
    border: 1px solid #2c2c30;
    border-radius: 20px;
    padding: 9px 14px;
    color: #fff;
    font-size: 13.5px;
    outline: none;
}

.sg-chat-footer input::placeholder {
    color: #888;
}

.sg-chat-footer button {
    background: var(--sg-accent);
    border: none;
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sg-chat-footer button svg {
    width: 16px;
    height: 16px;
    fill: #fff;
}

.sg-error-text {
    font-size: 12px;
    color: #ff5c5c;
    align-self: flex-start;
    padding-left: 4px;
}

@media (max-width: 420px) {
    #sgChatWindow {
        right: 16px;
        left: 16px;
        width: auto;
        bottom: 90px;
    }
    #sgChatBubble {
        right: 16px;
        bottom: 16px;
    }
}
