/* Glavni chat kontejner */
#muamer-woo-chat-container {
    position: fixed;
    bottom: 90px;
    left: 20px;
    width: 350px;
    height: 450px;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    overflow: hidden;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    z-index: 400;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s;
}

/* Stanje: Zatvoren Chat */
#muamer-woo-chat-container.muamer-chat-closed {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-100%);
}

/* Stanje: Otvoren Chat */
#muamer-woo-chat-container.muamer-chat-open {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}


/* Header */
#muamer-chat-header {
    padding: 10px;
    background-color: #f0f0f0;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

/* Ikona robota u headeru */
#muamer-chat-header strong {
    display: flex;
    align-items: center;   
}

#muamer-chat-header strong::before {
    content: "🤖";
    margin-right: 8px;   
    font-size: 1.1em;   
}


/* Messages area */
#muamer-chat-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f7f9fc;
    scroll-behavior: smooth;
}

/* Scrollbar */
#muamer-chat-messages::-webkit-scrollbar {
    width: 8px;
}

#muamer-chat-messages::-webkit-scrollbar-thumb {
    background-color: #d1d8e0;
    border-radius: 10px;
}

#muamer-chat-messages::-webkit-scrollbar-track {
    background: #f7f9fc;
}


/* Poruke */
.muamer-message {
    padding: 10px 14px;
    border-radius: 18px;
    margin-bottom: 15px;
    max-width: 80%;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    position: relative;
    animation: slideIn 0.3s ease-out;
}

.muamer-message p {
    margin-bottom: 0;
    padding-bottom: 0;
}

/* User */
.user-message {
    background-color: #007bff;
    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

/* Bot */
.bot-message {
    background-color: #e9ecef;
    color: #333;
    margin-right: auto;
    border-bottom-left-radius: 4px;
    margin-left: 45px;
}

/* Ikona bota */
.muamer-bot-icon {
    position: absolute;
    bottom: 0px;   
    left: -40px; 
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #e9ecef;   
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    z-index: 10;
}

.muamer-bot-icon::before {
    content: "🤖";   
    line-height: 1;
}


/* Typing indicator */
.muamer-typing-indicator {
    display: flex;
    align-items: center; 
    justify-content: flex-start;
    padding-left: 0;
    min-height: 20px; 
}

.muamer-typing-indicator::before {
    content: "Zolko Bot kuca";
    margin-right: 5px;
    font-weight: bold;
    color: #0084ff;
    line-height: 1.5;
}

.muamer-typing-indicator span {
    display: inline-block;
    width: 4px;
    height: 4px;
    transform: translateY(3px); 
    margin-left: 1px; 
    background-color: rgba(0, 132, 255, 0.7); 
    border-radius: 50%;
    opacity: 0; 
    animation: pulse 1.5s infinite; 
}

.muamer-typing-indicator span:nth-child(1) { animation-delay: 0s; }
.muamer-typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.muamer-typing-indicator span:nth-child(3) { animation-delay: 0.4s; }


@keyframes pulse {
    0% { opacity: 0; transform: scale(0.8) translateY(3px); }
    50% { opacity: 1; transform: scale(1.1) translateY(3px); }
    100% { opacity: 0; transform: scale(0.8) translateY(3px); }
}


/* Linkovi i liste */
.bot-message ul {
    list-style: none;
    padding: 0;
    margin-top: 10px;
    border-top: 1px solid #dee2e6;
    padding-top: 10px;
}

.bot-message li {
    margin-bottom: 8px;
}

.bot-message a {
    color: #0084ff;
    font-weight: bold;
    text-decoration: none;
}

.bot-message a:hover {
    color: #0060e0;
}


/* Form */
#muamer-chat-form {
    display: flex;
    padding: 12px 15px;
    background-color: #fff;
    border-top: 1px solid #e0e0e0;
}

#muamer-chat-input {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 25px;
    margin-right: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#muamer-chat-input:focus {
    border-color: #0084ff;
    box-shadow: 0 0 0 0.2rem rgba(0,132,255,0.25);
}

#muamer-chat-form button {
    padding: 10px 20px;
    background-color: #0084ff;
    color: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    flex-shrink: 0;
}

#muamer-chat-form button:hover {
    background-color: #0060e0;
}

#muamer-chat-form button:disabled {
    background-color: #adb5bd;
    cursor: not-allowed;
}


/* Toggle button */
#muamer-chat-toggle-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 400;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #0084ff;   
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
}


/* Animation */
@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* Filter buttons */
.muamer-filter-suggestion-box {
    margin-top: 15px;
    padding-top: 5px;
    border-top: 1px dashed #ced4da;
}

.muamer-filter-suggestion-box p {
    font-size: 13px;
    margin-bottom: 8px;
    color: #555;
}

.muamer-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.muamer-filter-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    outline: none;
    border-radius: var(--btn-brd-radius, 0px);
    vertical-align: middle;
    text-align: center;
    text-decoration: none !important;
    text-shadow: none;
    line-height: 1.2;
    cursor: pointer;
    transition: all .25s ease;
    color: var(--btn-color, #3E3E3E);
    border: var(--btn-brd-width, 0px) var(--btn-brd-style, solid) var(--btn-brd-color, #E9E9E9);
    background-color: var(--btn-bgcolor, #F3F3F3);
    box-shadow: var(--btn-box-shadow, unset);
    text-transform: var(--btn-transform, uppercase);
    font-weight: var(--btn-font-weight, 600);
    font-family: var(--btn-font-family, inherit);
    font-style: var(--btn-font-style, unset);
    padding: var(--btn-padding, 5px 20px);
    min-height: var(--btn-height, 42px);
    font-size: var(--btn-font-size, 13px);
}

.muamer-filter-btn:hover {
    color: var(--btn-color-hover, var(--btn-color, #3E3E3E));
    border-color: var(--btn-brd-color-hover, var(--btn-brd-color, #e0e0e0));
    background-color: var(--btn-bgcolor-hover, var(--btn-bgcolor, #e0e0e0));
    box-shadow: var(--btn-box-shadow-hover, var(--btn-box-shadow, unset));
}


/* Responsive – mobile */
@media (max-width: 768px) {

    #muamer-woo-chat-container {
        width: 96%;
        left: 2%;
        bottom: 120px;
        height: 70vh;
    }

    /* Zatvaranje — SAMO HORIZONTALNO KLIZANJE */
    #muamer-woo-chat-container.muamer-chat-closed {
        transform: translateX(-120%);
    }

    #muamer-chat-toggle-button {
        width: 55px;
        height: 55px;
        bottom: 60px;
        left: 20px;
        font-size: 14px;
        z-index: 400;
    }
}
