/*
 * Estilos do SmartFit Sales Assistant (Baseado no arquivo HTML fornecido)
 */

:root {
    --whatsapp-green: #25D366;
    --whatsapp-dark: #075E54;
    --whatsapp-light: #DCF8C6;
    --whatsapp-gray: #ECE5DD;
    --whatsapp-blue: #34B7F1;
    --whatsapp-icon: #128C7E;
    --text-dark: #333333;
    --text-light: #757575;
    --white: #FFFFFF;
    --shadow: rgba(0, 0, 0, 0.1);
}

/* Estilos para o modo de página completa */
.sfsa-full-page-chat {
    /* Simula o body do arquivo original */
    background: linear-gradient(135deg, var(--whatsapp-dark) 0%, #128C7E 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Container do Chat */
.sfsa-chat-container {
    width: 100%;
    max-width: 500px; /* Tamanho do arquivo original */
    height: 90vh;
    background-color: var(--whatsapp-gray);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    /* Remove posicionamento fixo */
    position: relative;
    transform: none;
    opacity: 1;
}

/* Remove estilos de widget */
/* .sfsa-chat-container.open {
    transform: scale(1);
    opacity: 1;
} */

/* Chat Header */
.sfsa-chat-header {
    background-color: var(--whatsapp-dark);
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sfsa-profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--whatsapp-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.sfsa-profile-info h2 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.sfsa-profile-info p {
    font-size: 12px;
    opacity: 0.9;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sfsa-online-dot {
    width: 6px;
    height: 6px;
    background-color: var(--whatsapp-green);
    border-radius: 50%;
    display: inline-block;
}

.sfsa-header-actions {
    margin-left: auto;
}

.sfsa-header-actions button {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

/* Chat Messages Area */
.sfsa-chat-messages {
    flex-grow: 1;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: var(--whatsapp-gray);
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%2300a884' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.sfsa-message {
    max-width: 85%;
    padding: 10px 12px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    animation: sfsa-fadeIn 0.3s ease;
    word-wrap: break-word;
}

@keyframes sfsa-fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.sfsa-bot-message {
    background-color: var(--white);
    align-self: flex-start;
    border-bottom-left-radius: 5px;
    box-shadow: 0 1px 2px var(--shadow);
}

.sfsa-user-message {
    background-color: var(--whatsapp-light);
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    box-shadow: 0 1px 2px var(--shadow);
}

.sfsa-message-time {
    font-size: 10px;
    color: var(--text-light);
    text-align: right;
    margin-top: 3px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
}

.sfsa-bot-message .sfsa-message-time {
    justify-content: flex-start;
}

.sfsa-message-options {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
    align-self: flex-start;
}

.sfsa-option-button {
    background-color: var(--whatsapp-blue);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.sfsa-option-button:hover {
    background-color: #2a9fd8;
}

/* Product Card */
.sfsa-product-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
    max-width: 250px;
    align-self: flex-start;
}

.sfsa-product-image {
    width: 100%;
    height: 150px;
    background: linear-gradient(45deg, #4a6fa5, #166088);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 40px;
}

.sfsa-product-info {
    padding: 10px;
}

.sfsa-product-info h4 {
    font-size: 15px;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.sfsa-product-info p {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
    line-height: 1.3;
}

.sfsa-product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--whatsapp-dark);
    margin-bottom: 10px;
}

.sfsa-product-price span {
    font-size: 13px;
    color: var(--text-light);
    text-decoration: line-through;
    margin-left: 8px;
}

.sfsa-product-button {
    background-color: var(--whatsapp-green);
    color: white;
    border: none;
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.sfsa-product-button:hover {
    background-color: #1da851;
}

/* Chat Input Area */
.sfsa-chat-input-area {
    background-color: var(--white);
    padding: 10px 15px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    border-top: 1px solid #e0e0e0;
}

.sfsa-message-input {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 14px;
    resize: none;
    max-height: 80px;
    overflow-y: auto;
}

.sfsa-send-button {
    background-color: var(--whatsapp-green);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.sfsa-send-button:hover {
    background-color: #1da851;
}

/* Typing Indicator */
.sfsa-typing-indicator {
    display: flex;
    align-self: flex-start;
    gap: 4px;
    padding: 8px 12px;
    background-color: var(--white);
    border-radius: 18px;
    border-bottom-left-radius: 5px;
    box-shadow: 0 1px 2px var(--shadow);
}

.sfsa-typing-dot {
    width: 6px;
    height: 6px;
    background-color: var(--text-light);
    border-radius: 50%;
    animation: sfsa-bounce 1.4s infinite ease-in-out both;
}

.sfsa-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.sfsa-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes sfsa-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

/* Media Query for Mobile */
@media (max-width: 600px) {
    .sfsa-full-page-chat {
        padding: 0;
    }
    
    .sfsa-chat-container {
        max-width: 100vw;
        height: 100vh;
        border-radius: 0;
    }
}
