/* Widget Container */
.wpc-chat-widget {
    position: fixed;
    bottom: 20px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.wpc-chat-widget[data-position="right"] {
    right: 20px;
}

.wpc-chat-widget[data-position="left"] {
    left: 20px;
}

/* Botão Flutuante */
.wpc-chat-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    color: white;
}

.wpc-chat-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.wpc-icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.wpc-button-text {
    font-size: 14px;
    font-weight: 500;
}

/* Janela do Chat */
.wpc-chat-window {
    position: absolute;
    bottom: 70px;
    width: 350px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.wpc-chat-widget[data-position="right"] .wpc-chat-window {
    right: 0;
}

.wpc-chat-widget[data-position="left"] .wpc-chat-window {
    left: 0;
}

.wpc-chat-widget.active .wpc-chat-window {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Header do Chat */
.wpc-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-radius: 12px 12px 0 0;
    color: white;
}

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

.wpc-header-icon {
    width: 40px;
    height: 40px;
    filter: brightness(0) invert(1);
}

.wpc-header-text h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.wpc-header-text p {
    margin: 5px 0 0;
    font-size: 12px;
    opacity: 0.9;
}

.wpc-close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.wpc-close-chat:hover {
    background: rgba(255,255,255,0.2);
}

/* Corpo do Chat */
.wpc-chat-body {
    height: 400px;
    display: flex;
    flex-direction: column;
    background: #E5DDD5;
}

.wpc-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #E5DDD5;
}

.wpc-message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.wpc-message.received {
    align-items: flex-start;
}

.wpc-message.sent {
    align-items: flex-end;
}

.wpc-message-content {
    max-width: 80%;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.wpc-message.received .wpc-message-content {
    background: white;
    color: #1f2d3d;
    border-radius: 12px 12px 12px 4px;
}

.wpc-message.sent .wpc-message-content {
    background: #DCF8C5;
    color: #1f2d3d;
    border-radius: 12px 12px 4px 12px;
}

.wpc-message-time {
    font-size: 10px;
    color: #667085;
    margin-top: 4px;
    margin-left: 8px;
}

/* Área de Input */
.wpc-input-area {
    display: flex;
    padding: 15px;
    background: white;
    border-top: 1px solid #e4e6eb;
    gap: 10px;
}

.wpc-message-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #e4e6eb;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.wpc-message-input:focus {
    border-color: #25D366;
}

.wpc-send-button {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: opacity 0.3s;
}

.wpc-send-button:hover {
    opacity: 0.9;
}

/* Responsividade */
@media (max-width: 480px) {
    .wpc-chat-window {
        width: calc(100vw - 40px);
        bottom: 80px;
    }
    
    .wpc-chat-widget[data-position="right"] .wpc-chat-window,
    .wpc-chat-widget[data-position="left"] .wpc-chat-window {
        right: 0;
        left: 0;
        margin: 0 auto;
    }
}
