﻿
.chat-window {
    position: fixed;
    right: 20px;
    bottom: 2px;
    width: 390px;
    height: 610px;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 45px rgba(0,0,0,.18);
    font-family: 'Segoe UI',sans-serif;
    z-index: 99999
}

.chat-header {
    height: 92px;
    background: linear-gradient(135deg,#2563eb,#3b82f6);
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff
}

.chat-profile {
    display: flex;
    align-items: center;
    gap: 14px
}

.chat-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px
}

.chat-title {
    font-size: 18px;
    font-weight: 700
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 13px;
    color: #eef2ff
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e
}

.chat-icons {
    display: flex;
    gap: 18px
}

    .chat-icons i {
        cursor: pointer;
        color: #fff;
        font-size: 18px
    }

.chat-body {
    flex: 1;
    padding: 22px;
    overflow-y: auto;
    background: #f7faff
}

.chat-item {
    display: flex;
    gap: 14px;
    align-items: flex-start
}

.small-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px
}

.chat-bubble {
    max-width: 250px;
    background: #fff;
    border-radius: 18px;
    padding: 14px 18px;
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
    line-height: 1.6;
    font-size: 15px
}

.chat-time {
    margin-top: 8px;
    color: #94a3b8;
    font-size: 12px
}

.chat-footer {
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-top: 1px solid #edf2f7
}

.attach-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: #f3f6fb;
    color: #64748b;
    cursor: pointer;
    font-size: 18px
}

.chat-footer input {
    flex: 1;
    height: 48px;
    border: 2px solid #3b82f6;
    border-radius: 28px;
    padding: 0 18px;
    font-size: 15px;
    outline: none
}

    .chat-footer input:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 4px rgba(37,99,235,.12)
    }

.send-btn {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg,#2563eb,#3b82f6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer
}

.chat-body::-webkit-scrollbar {
    width: 6px
}

.chat-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px
}

@media(max-width:768px) {
    .chat-window {
        width: calc(100% - 20px);
        height: 80vh;
        right: 10px;
        bottom: 10px;
        border-radius: 18px
    }

    .chat-footer {
        padding: 10px;
        gap: 8px
    }

        .chat-footer input {
            height: 44px
        }

    .send-btn, .attach-btn {
        width: 44px;
        height: 44px
    }
}


.chat-icons {
    display: flex;
    align-items: center;
}

.icon-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .25s;
}

    .icon-btn:hover {
        background: rgba(255,255,255,.18);
    }

    .icon-btn:focus {
        outline: none;
        box-shadow: none;
    }

    .icon-btn i {
        font-size: 22px;
        font-weight: 700;
    }

.icon-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .25s;
}

    .icon-btn:hover {
        background: rgba(255,255,255,.18);
    }

#toggleIcon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 30px;
    font-weight: 700;
    color: #fff;
    font-family: Arial, sans-serif;
    line-height: 1;
    user-select: none;
}
