/* SPSG "Talk About Potato" Floating Chatbot Widget CSS */

/* Floating Launcher Button */
.spsg-chat-launcher {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    background: linear-gradient(135deg, #2A9D8F 0%, #1F7469 100%);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 14px 22px;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(42, 157, 143, 0.45);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.spsg-chat-launcher:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 14px 30px rgba(42, 157, 143, 0.6);
}

/* Mobile Screen Positioning (Above Sticky Mobile Dock) */
@media (max-width: 768px) {
    .spsg-chat-launcher {
        bottom: 85px;
        right: 16px;
        padding: 10px 18px;
        font-size: 13.5px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    }
    .spsg-chat-modal {
        bottom: 140px;
        right: 12px;
        width: calc(100vw - 24px);
        height: 70vh;
    }
}


.spsg-chat-launcher .potato-icon {
    font-size: 22px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
    60% { transform: translateY(-3px); }
}

/* Modal Popup Window */
.spsg-chat-modal {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 380px;
    height: 540px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 120px);
    z-index: 99999;
    background: rgba(13, 27, 30, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.spsg-chat-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Modal Header */
.spsg-chat-header {
    background: linear-gradient(135deg, #1B3539, #0D1B1E);
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
}

.spsg-chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 15px;
}

.spsg-chat-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spsg-icon-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.spsg-icon-btn:hover {
    background: var(--primary, #2A9D8F);
}

/* Modal Body / Stream */
.spsg-chat-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}

.spsg-chat-body .msg-row {
    display: flex;
    gap: 10px;
    max-width: 90%;
}

.spsg-chat-body .msg-row.user-msg {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.spsg-chat-body .msg-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.45;
    white-space: pre-wrap;
}

.spsg-chat-body .msg-row.ai-msg .msg-bubble {
    background: rgba(255, 255, 255, 0.08);
    color: #E2E8F0;
    border-top-left-radius: 2px;
}

.spsg-chat-body .msg-row.user-msg .msg-bubble {
    background: #2A9D8F;
    color: #fff;
    border-top-right-radius: 2px;
}

/* Footer Input Area */
.spsg-chat-footer {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 8px;
}

.spsg-chat-footer input {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 10px 14px;
    border-radius: 20px;
    font-size: 13.5px;
    outline: none;
}

.spsg-chat-footer input:focus {
    border-color: #2A9D8F;
}

.spsg-chat-footer button {
    background: #2A9D8F;
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
}
