/* ===== Bygreen Chatbot Widget ===== */
#bygreen-chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

/* Bubble trigger */
#bygreen-chat-bubble {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #2d7a3a, #1a5c28);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(45,122,58,0.5);
    animation: bygreen-breathe 4s ease-in-out infinite;
    margin-left: auto;
}

@keyframes bygreen-breathe {
    0%, 100% { box-shadow: 0 4px 14px rgba(45,122,58,0.4); transform: scale(1); }
    50%      { box-shadow: 0 6px 22px rgba(45,122,58,0.55); transform: scale(1.05); }
}

#bygreen-chat-bubble:hover { animation: none; transform: scale(1.08); }

/* Chat box */
#bygreen-chat-box {
    display: none;
    position: absolute;
    bottom: 68px;
    right: 0;
    width: 340px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    flex-direction: column;
}

#bygreen-chat-box.open { display: flex; }

/* Header */
#bygreen-chat-header {
    background: linear-gradient(160deg, #2d7a3a 0%, #3da64e 60%, #5ecf70 100%);
    padding: 18px 16px 24px;
    border-radius: 20px 20px 0 0;
    position: relative;
}

/* Valovita crta na dnu headera */
.bygreen-wave {
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 20px;
    display: block;
}

.bygreen-head-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bygreen-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    border: 2px solid rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.bygreen-head-title {
    flex: 1;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
}

.bygreen-head-close {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
    padding: 4px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 0;
}

.bygreen-head-close:hover { background: transparent !important; }

.bygreen-head-sub {
    color: rgba(255,255,255,0.88);
    font-size: 12.5px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

/* Messages */
#bygreen-chat-messages {
    padding: 16px 14px 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 320px;
    overflow-y: auto;
}

.bygreen-msg-bot-wrap {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.bygreen-mini-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2d7a3a, #3da64e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.bygreen-msg-content { flex: 1; }

.bygreen-bubble-bot {
    background: #f1f1f1;
    color: #1a1a1a;
    padding: 11px 14px;
    border-radius: 4px 18px 18px 18px;
    font-size: 13.5px;
    line-height: 1.55;
    white-space: pre-wrap;
}

/* Quick reply buttons */
.bygreen-quick-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.bygreen-qbtn {
    background: #fff !important;
    border: 1.5px solid #2d7a3a !important;
    color: #2d7a3a !important;
    border-radius: 22px !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: none !important;
    cursor: pointer;
    text-align: center;
    width: 100%;
    transition: background 0.15s, color 0.15s;
}

.bygreen-qbtn:hover { background: #2d7a3a !important; color: #fff !important; }

/* User message */
.bygreen-msg-user-wrap {
    display: flex;
    justify-content: flex-end;
}

.bygreen-bubble-user {
    background: linear-gradient(135deg, #2d7a3a, #3da64e);
    color: #fff;
    padding: 10px 14px;
    border-radius: 18px 4px 18px 18px;
    font-size: 13.5px;
    line-height: 1.55;
    max-width: 80%;
    white-space: pre-wrap;
}

/* Typing dots */
.bygreen-typing {
    background: #f1f1f1;
    padding: 11px 16px;
    border-radius: 4px 18px 18px 18px;
    display: inline-flex;
    gap: 5px;
    align-items: center;
}

.bygreen-dot {
    width: 7px;
    height: 7px;
    background: #aaa;
    border-radius: 50%;
    animation: bygreen-dot 1.2s infinite;
}

.bygreen-dot:nth-child(2) { animation-delay: 0.2s; }
.bygreen-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bygreen-dot {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}

/* Footer / input */
#bygreen-chat-input {
    border-top: 1px solid #efefef;
    padding: 12px 70px 14px 14px;
    border-radius: 0 0 20px 20px;
    position: relative;
}

#bygreen-input {
    width: 100%;
    border: 1.5px solid #d5d5d5;
    background: #f6f6f6;
    border-radius: 22px;
    font-size: 13.5px;
    color: #333;
    outline: none;
    padding: 11px 16px;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

#bygreen-input::placeholder { color: #999; }

#bygreen-input:focus {
    border-color: #2d7a3a;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(45,122,58,0.12);
}

/* Send button — round gradient with white paper plane */
#bygreen-send {
    position: absolute;
    bottom: 8px;
    right: 12px;
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    padding: 0 !important;
    background: linear-gradient(135deg, #3da64e 0%, #2d7a3a 100%) !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(45,122,58,0.45), 0 0 0 6px rgba(61,166,78,0.12) !important;
    transition: transform 0.12s, box-shadow 0.15s;
}

#bygreen-send:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 22px rgba(45,122,58,0.55), 0 0 0 8px rgba(61,166,78,0.16) !important;
}

#bygreen-send:active { transform: scale(0.93); }

#bygreen-send svg { display: block; width: 26px; height: 26px; }
