/* WhatsApp bubble widget */
#qlwapp {
    position: fixed;
    z-index: 99999;
    bottom: 20px;
    left: 20px;
    font-family: segoe-ui, Arial, sans-serif;
}

#qlwapp.qlwapp-bottom-right {
    left: auto;
    right: 20px;
}

.qlwapp-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.qlwapp-box {
    display: none;
    width: 320px;
    max-width: calc(100vw - 40px);
    margin-bottom: 12px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    background: #fff;
}

#qlwapp.qlwapp-show .qlwapp-box {
    display: block;
    animation: qlwappFadeIn 0.25s ease;
}

@keyframes qlwappFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qlwapp-header {
    position: relative;
    background: #e31e24;
    color: #fff;
    padding: 18px 40px 18px 18px;
}

.qlwapp-header .qlwapp-close {
    position: absolute;
    top: 8px;
    right: 12px;
    font-style: normal;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: #fff;
    opacity: 0.85;
}

.qlwapp-header .qlwapp-close:hover {
    opacity: 1;
}

.qlwapp-description h3 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}

.qlwapp-description p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
}

.qlwapp-description a {
    color: #fff;
    text-decoration: underline;
}

.qlwapp-body {
    background: #fff;
    padding: 8px 0;
}

.qlwapp-account {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none !important;
    color: inherit;
    cursor: pointer;
    transition: background 0.2s ease;
}

.qlwapp-account:hover {
    background: #f5f7fa;
}

.qlwapp-avatar {
    position: relative;
    flex-shrink: 0;
}

.qlwapp-avatar-container {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: #eee;
    border: 2px solid #e8e8e8;
}

.qlwapp-avatar-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.qlwapp-avatar:after {
    content: "";
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #25d366 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347z'/%3E%3Cpath d='M12 2C6.477 2 2 6.477 2 12c0 1.89.525 3.66 1.438 5.168L2 22l4.988-1.308A9.955 9.955 0 0012 22c5.523 0 10-4.477 10-10S17.523 2 12 2z'/%3E%3C/svg%3E") center / 10px no-repeat;
    border: 2px solid #fff;
}

.qlwapp-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.qlwapp-label {
    font-size: 12px;
    color: #8a8a8a;
    line-height: 1.3;
}

.qlwapp-name {
    font-size: 15px;
    font-weight: 700;
    color: #222;
    line-height: 1.3;
}

.qlwapp-footer {
    background: #fff;
    border-top: 1px solid #eee;
    padding: 8px 12px;
    text-align: center;
}

.qlwapp-footer p {
    margin: 0;
    font-size: 11px;
    color: #888;
}

.qlwapp-footer a {
    color: #e31e24;
    text-decoration: none;
    font-weight: 600;
}

.qlwapp-toggle {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    background: transparent;
    position: relative;
    text-decoration: none !important;
    border: none;
    padding: 0;
    overflow: hidden;
}

.qlwapp-toggle img {
    width: 65px !important;
    height: 65px;
    display: block;
    object-fit: cover;
}

.qlwapp-toggle .qlwapp-close {
    display: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #000 !important;
    color: #fff;
    font-style: normal;
    font-size: 36px;
    font-weight: 400;
    line-height: 1;
    text-align: center;
    box-sizing: border-box;
}

#qlwapp.qlwapp-show .qlwapp-toggle img {
    display: none;
}

#qlwapp.qlwapp-show .qlwapp-toggle .qlwapp-close {
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 575px) {
    #qlwapp {
        bottom: 16px;
        left: 12px;
    }

    .qlwapp-box {
        width: 290px;
    }

    .qlwapp-toggle {
        width: 58px;
        height: 58px;
    }

    .qlwapp-toggle img {
        width: 58px !important;
        height: 58px;
    }
}
