/* Container geral */
.direto-widget-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2147483647 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Botão flutuante (Toggle) */
.direto-toggle-btn {
    width: 60px;
    height: 60px;
    background-color: #25d366;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    position: absolute;
    bottom: 0;
    right: 0;
}
.direto-toggle-btn:hover {
    transform: scale(1.05);
}

/* Janela do Widget */
.direto-widget-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    background-color: #efeae2;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform-origin: bottom right;
    
    /* Background Pattern similar to WhatsApp */
    background-image: url('data:image/svg+xml;utf8,<svg width="400" height="400" viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h400v400H0V0zm199.5 204.3c-2.3-2.3-5.2-3.4-8.7-3.4-3.5 0-6.4 1.1-8.7 3.4-2.3 2.3-3.4 5.2-3.4 8.7 0 3.5 1.1 6.4 3.4 8.7 2.3 2.3 5.2 3.4 8.7 3.4 3.5 0 6.4-1.1 8.7-3.4 2.3-2.3 3.4-5.2 3.4-8.7 0-3.5-1.1-6.4-3.4-8.7z" fill="rgba(0,0,0,0.03)"/></svg>');
}

/* Estado Fechado */
.direto-widget-container.closed .direto-widget-window {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9);
}
.direto-widget-container.closed .direto-icon-close {
    display: none !important;
}
.direto-widget-container.closed .direto-icon-wpp {
    display: block !important;
}

/* Estado Aberto */
.direto-widget-container.open .direto-icon-close {
    display: block !important;
}
.direto-widget-container.open .direto-icon-wpp {
    display: none !important;
}

/* Header */
.direto-widget-header {
    background-color: #0b5c46; /* Cor escura do cabeçalho */
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.direto-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.direto-avatar {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    background-color: #fff;
    color: #0b5c46;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    position: relative;
}
.direto-status-dot {
    position: absolute;
    bottom: 2px;
    right: 0;
    width: 10px;
    height: 10px;
    background-color: #25d366;
    border: 2px solid #0b5c46;
    border-radius: 50%;
}
.direto-title {
    font-weight: 600;
    font-size: 14px;
}
.direto-subtitle {
    font-size: 11px;
    opacity: 0.8;
}
.direto-close-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
    opacity: 0.8;
}
.direto-close-btn:hover {
    opacity: 1;
}

/* Body */
.direto-widget-body {
    padding: 20px 15px;
}
.direto-date-badge {
    text-align: center;
    background: white;
    color: #666;
    font-size: 11px;
    padding: 5px 12px;
    border-radius: 12px;
    display: inline-block;
    margin: 0 auto 15px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    left: 50%;
    position: relative;
    transform: translateX(-50%);
}
.direto-chat-bubble {
    background: white;
    padding: 12px 15px;
    border-radius: 0 12px 12px 12px;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}
.direto-chat-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: -8px;
    border-top: 10px solid white;
    border-left: 10px solid transparent;
    border-bottom: 10px solid transparent;
}
.direto-time {
    display: block;
    text-align: right;
    font-size: 11px;
    color: #999;
    margin-top: 5px;
}

/* Formulário */
#direto-widget-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    box-sizing: border-box;
    font-family: inherit;
    outline: none;
}
#direto-widget-form input:focus {
    border-color: #0b5c46;
}
#direto-widget-form button {
    width: 100%;
    background-color: #0b5c46;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}
#direto-widget-form button:hover {
    background-color: #084736;
}
