﻿
* {
    box-sizing: border-box;
}

#pb-chat-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #c2185b;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(194,24,91,.45);
    transition: transform .2s,box-shadow .2s;
}

    #pb-chat-fab:hover {
        transform: scale(1.08);
        box-shadow: 0 6px 22px rgba(194,24,91,.55);
    }

    #pb-chat-fab i {
        font-size: 24px;
        color: #fff;
    }

#pb-notif-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 10px;
    height: 10px;
    background: #f6af04;
    border-radius: 50%;
    border: 2px solid #fff;
}

#pb-chat-window {
    position: fixed;
    bottom: 92px;
    right: 24px;
    z-index: 9998;
    width: 360px;
    max-height: 80vh;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(.92) translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s cubic-bezier(.34,1.56,.64,1),opacity .2s;
}

    #pb-chat-window.open {
        transform: scale(1) translateY(0);
        opacity: 1;
        pointer-events: all;
    }

#pb-chat-head {
    background: linear-gradient(135deg,#880e4f,#c2185b);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

    #pb-chat-head .pb-av {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        background: rgba(255,255,255,.2);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

        #pb-chat-head .pb-av i {
            font-size: 20px;
            color: #fff;
        }

#pb-head-info {
    flex: 1;
    min-width: 0;
}

    #pb-head-info h4 {
        font-size: 14px;
        font-weight: 600;
        color: #fff;
        margin: 0 0 2px 0;
    }

    #pb-head-info span {
        font-size: 11px;
        color: rgba(255,255,255,.8);
        display: flex;
        align-items: center;
        gap: 5px;
    }

.pb-online-dot {
    width: 7px;
    height: 7px;
    background: #4caf50;
    border-radius: 50%;
    flex-shrink: 0;
}

#pb-chat-close {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,.7);
    padding: 4px;
    border-radius: 6px;
    transition: color .15s;
    line-height: 1;
}

    #pb-chat-close:hover {
        color: #fff;
    }

#pb-chat-tabs {
    display: flex;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.pb-tab {
    flex: 1;
    padding: 9px 4px;
    font-size: 11px;
    font-weight: 500;
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    cursor: pointer;
    color: #888;
    transition: all .2s;
    text-align: center;
}

    .pb-tab.act {
        color: #c2185b;
        border-bottom: 2px solid #c2185b;
    }

#pb-chat-body {
    flex: 1;
    overflow-y: auto;
    display: none;
    padding: 14px;
    flex-direction: column;
    gap: 8px;
}

    #pb-chat-body.show {
        display: flex;
    }

#pb-tickets-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: none;
}

#pb-faq-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: none;
}

.pb-msg {
    max-width: 82%;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

    .pb-msg.bot {
        align-self: flex-start;
    }

    .pb-msg.user {
        align-self: flex-end;
        align-items: flex-end;
    }

.pb-bubble {
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #222;
}

.pb-msg.bot .pb-bubble {
    background: #f3f3f7;
    border-bottom-left-radius: 3px;
}

.pb-msg.user .pb-bubble {
    background: #c2185b;
    color: #fff;
    border-bottom-right-radius: 3px;
}

.pb-time {
    font-size: 10px;
    color: #bbb;
    padding: 0 4px;
}

.pb-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 12px;
    background: #f3f3f7;
    border-radius: 12px;
    border-bottom-left-radius: 3px;
    width: 56px;
}

    .pb-typing span {
        width: 7px;
        height: 7px;
        background: #bbb;
        border-radius: 50%;
        animation: pb-bounce .9s infinite;
    }

        .pb-typing span:nth-child(2) {
            animation-delay: .15s;
        }

        .pb-typing span:nth-child(3) {
            animation-delay: .3s;
        }

@keyframes pb-bounce {
    0%,80%,100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-6px);
    }
}

.pb-quick-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.pb-qbtn {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 11px;
    cursor: pointer;
    color: #c2185b;
    transition: all .2s;
    font-weight: 500;
}

    .pb-qbtn:hover {
        background: #fce4ec;
        border-color: #c2185b;
    }

.pb-ticket-card {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
}

    .pb-ticket-card h5 {
        font-size: 13px;
        font-weight: 600;
        color: #333;
        margin: 0 0 4px 0;
    }

    .pb-ticket-card p {
        font-size: 12px;
        color: #777;
        margin: 0 0 6px 0;
    }

.pb-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

    .pb-badge.open {
        background: #e8f5e9;
        color: #2e7d32;
    }

    .pb-badge.pending {
        background: #fff8e1;
        color: #f57f17;
    }

    .pb-badge.closed {
        background: #f5f5f5;
        color: #757575;
    }

.pb-ticket-new-btn {
    background: #c2185b;
    color: #fff;
    border: none;
    border-radius: 8px;
    width: 100%;
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    margin-bottom: 14px;
    display: block;
}

    .pb-ticket-new-btn:hover {
        background: #880e4f;
    }

.pb-faq-item {
    border-bottom: 1px solid #f0f0f0;
    padding: 10px 0;
}

.pb-faq-q {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

    .pb-faq-q .pb-faq-icon {
        font-size: 16px;
        color: #c2185b;
        flex-shrink: 0;
        transition: transform .2s;
        display: inline-block;
    }

    .pb-faq-q.open .pb-faq-icon {
        transform: rotate(45deg);
    }

.pb-faq-a {
    font-size: 12px;
    color: #666;
    line-height: 1.6;
    margin-top: 6px;
    display: none;
}

    .pb-faq-a.open {
        display: block;
    }

#pb-chat-input-area {
    padding: 10px 12px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    background: #fff;
}

#pb-msg-input {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 13px;
    outline: none;
    transition: border .2s;
    height: 36px;
    font-family: inherit;
}

    #pb-msg-input:focus {
        border-color: #c2185b;
    }

#pb-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #c2185b;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .2s;
}

    #pb-send-btn:hover {
        background: #880e4f;
    }

    #pb-send-btn svg {
        width: 16px;
        height: 16px;
        fill: #fff;
    }

.pb-new-ticket-form {
    display: none;
}

    .pb-new-ticket-form.show {
        display: block;
    }

.pb-form-field {
    margin-bottom: 10px;
}

    .pb-form-field label {
        font-size: 11px;
        font-weight: 600;
        color: #555;
        display: block;
        margin-bottom: 4px;
    }

    .pb-form-field input,
    .pb-form-field textarea,
    .pb-form-field select {
        width: 100%;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 7px 10px;
        font-size: 12px;
        outline: none;
        font-family: inherit;
        color: #333;
    }

    .pb-form-field textarea {
        height: 70px;
        resize: none;
    }

.pb-form-actions {
    display: flex;
    gap: 8px;
}

    .pb-form-actions button {
        flex: 1;
        padding: 8px;
        border-radius: 8px;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        transition: all .2s;
    }

.pb-btn-cancel {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #555;
}

.pb-btn-submit {
    background: #c2185b;
    border: 1px solid #c2185b;
    color: #fff;
}

    .pb-btn-submit:hover {
        background: #880e4f;
    }

.pb-success-msg {
    text-align: center;
    padding: 24px 16px;
    display: none;
}

    .pb-success-msg p {
        font-size: 13px;
        color: #555;
        margin-top: 8px;
        line-height: 1.6;
    }

@media(max-width:480px) {
    #pb-chat-window {
        right: 8px;
        left: 8px;
        width: auto;
        bottom: 82px;
        max-height: 75vh;
    }

    #pb-chat-fab {
        bottom: 16px;
        right: 16px;
    }
}


