/* =====================================================================
   Chat live baumag.ro - widget public. Adaugat 2026-07-30.
   Verdele #70bf4c e culoarea de brand folosita in template-style.css.
   Butonul de WhatsApp sta la bottom:90px; bula de chat sta sub el.
   ===================================================================== */

.bmg-chat-btn{
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #70bf4c;
    color: #fff;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    line-height: 1;
    z-index: 9999;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
    transition: transform .15s ease;
}
.bmg-chat-btn:hover,
.bmg-chat-btn:focus{ transform: scale(1.05); color:#fff; outline:none; }

/* pastila cu numarul de mesaje necitite */
.bmg-chat-badge{
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    background: #d9534f;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    padding: 0 5px;
    border: 2px solid #fff;
    display: none;
}
.bmg-chat-badge.on{ display: block; }

/* --- panoul ---------------------------------------------------------- */
.bmg-chat-panel{
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 360px;
    max-width: calc(100vw - 32px);
    height: 520px;
    max-height: calc(100vh - 48px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,.28);
    z-index: 10000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-size: 14px;
    color: #333;
}
.bmg-chat-panel.on{ display: flex; }

/* cand chatul e deschis ascundem butonul de WhatsApp ca sa nu se suprapuna */
body.bmg-chat-open .whatsapp-sticky-btn{ display: none; }
body.bmg-chat-open .bmg-chat-btn{ display: none; }

.bmg-chat-head{
    background: #70bf4c;
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}
.bmg-chat-head-txt{ flex: 1; min-width: 0; }
.bmg-chat-head-titlu{ font-weight: 700; font-size: 15px; line-height: 1.2; }
.bmg-chat-head-sub{ font-size: 12px; opacity: .9; margin-top: 2px; }
.bmg-chat-head button{
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 0 0 10px;
    opacity: .85;
}
.bmg-chat-head button:hover{ opacity: 1; }

/* --- corpul ---------------------------------------------------------- */
.bmg-chat-body{
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 14px;
    background: #f5f7f9;
}

.bmg-chat-msg{ margin-bottom: 12px; display: flex; flex-direction: column; }
.bmg-chat-msg .bmg-chat-bubble{
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 12px;
    line-height: 1.45;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}
.bmg-chat-msg .bmg-chat-meta{ font-size: 11px; color: #8b949e; margin-top: 3px; }

.bmg-chat-msg.client{ align-items: flex-end; }
.bmg-chat-msg.client .bmg-chat-bubble{ background: #70bf4c; color: #fff; border-bottom-right-radius: 3px; }

.bmg-chat-msg.operator{ align-items: flex-start; }
.bmg-chat-msg.operator .bmg-chat-bubble{ background: #fff; color: #333; border: 1px solid #e3e7eb; border-bottom-left-radius: 3px; }

.bmg-chat-msg.system{ align-items: center; }
.bmg-chat-msg.system .bmg-chat-bubble{
    background: transparent;
    color: #8b949e;
    font-size: 12px;
    font-style: italic;
    text-align: center;
    max-width: 100%;
    padding: 2px 0;
}

/* --- formulare ------------------------------------------------------- */
.bmg-chat-form{ padding: 16px; }
.bmg-chat-form p.bmg-chat-intro{ margin: 0 0 14px 0; color: #555; line-height: 1.5; }
.bmg-chat-form label{ display: block; font-size: 12px; font-weight: 600; color: #555; margin-bottom: 4px; }
.bmg-chat-form input[type=text],
.bmg-chat-form input[type=email],
.bmg-chat-form input[type=tel],
.bmg-chat-form textarea{
    width: 100%;
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 14px;
    font-family: inherit;
    margin-bottom: 10px;
    background: #fff;
    color: #333;
}
.bmg-chat-form textarea{ resize: vertical; min-height: 80px; }
.bmg-chat-form input:focus,
.bmg-chat-form textarea:focus{ outline: none; border-color: #70bf4c; box-shadow: 0 0 0 2px rgba(112,191,76,.18); }

.bmg-chat-acord{ display: flex; align-items: flex-start; font-size: 12px; color: #666; margin-bottom: 12px; line-height: 1.4; }
.bmg-chat-acord input{ margin: 2px 8px 0 0; flex: 0 0 auto; }
.bmg-chat-acord a{ color: #70bf4c; text-decoration: underline; }

.bmg-chat-submit{
    width: 100%;
    background: #70bf4c;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.bmg-chat-submit:hover{ background: #63ac42; }
.bmg-chat-submit:disabled{ background: #b4d5a4; cursor: default; }

.bmg-chat-eroare{
    background: #fdecea;
    color: #b3271e;
    border: 1px solid #f5c6c3;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    margin-bottom: 10px;
    display: none;
}
.bmg-chat-eroare.on{ display: block; }

.bmg-chat-succes{ padding: 28px 20px; text-align: center; color: #444; line-height: 1.55; }
.bmg-chat-succes .bmg-chat-succes-icon{ font-size: 42px; color: #70bf4c; margin-bottom: 10px; }

/* --- bara de scriere -------------------------------------------------- */
.bmg-chat-foot{
    flex: 0 0 auto;
    border-top: 1px solid #e3e7eb;
    padding: 10px;
    display: flex;
    align-items: flex-end;
    background: #fff;
}
.bmg-chat-foot textarea{
    flex: 1;
    border: 1px solid #ced4da;
    border-radius: 18px;
    padding: 8px 14px;
    resize: none;
    height: 38px;
    max-height: 100px;
    font-size: 14px;
    font-family: inherit;
    line-height: 20px;
    color: #333;
}
.bmg-chat-foot textarea:focus{ outline: none; border-color: #70bf4c; }
.bmg-chat-foot button{
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    margin-left: 8px;
    border: none;
    border-radius: 50%;
    background: #70bf4c;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
}
.bmg-chat-foot button:disabled{ background: #b4d5a4; cursor: default; }

.bmg-chat-nota{
    font-size: 11px;
    color: #8b949e;
    text-align: center;
    padding: 0 10px 8px;
    background: #fff;
    line-height: 1.4;
}
.bmg-chat-nota a{ color: #8b949e; text-decoration: underline; }

/* --- mobil ------------------------------------------------------------ */
@media (max-width: 576px){
    .bmg-chat-btn{ right: 14px; bottom: 16px; width: 52px; height: 52px; font-size: 24px; }
    .bmg-chat-panel{
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
}
