/*---  Quick message integrated  ---*/
/* Container to position buttons */
.floating-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
    z-index: 999;
}

/* --- General Widget Styles --- */
.chat-widget-box {
    width: 320px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    display: none; /* Hidden by default */
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 15px;
    transform-origin: bottom right;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

    .chat-widget-box.active {
        display: flex;
    }

keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.widget-header {
    padding: 16px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .widget-header h3 {
        font-size: 18px;
        font-weight: 600;
    }

.close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

    .close-btn:hover {
        background: rgba(255,255,255,0.4);
    }

.widget-body {
    padding: 20px;
}

/* --- Messenger Specific --- */
.messenger-theme .widget-header {
    background: var(--messenger-blue);
}

.messenger-preview {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    text-align: center;
}

.ms-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    padding: 2px;
}

    .ms-avatar img {
        width: 100%;
        height: 100%;
        border-radius: 50%;
    }

.messenger-btn {
    margin-top: 15px;
    width: 100%;
    padding: 12px;
    background: var(--messenger-blue);
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

    .messenger-btn:hover {
        background: #0073e6;
    }

/* --- Zalo Specific --- */
.zalo-theme .widget-header {
    background: var(--zalo-blue);
}

.zalo-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

    .zalo-form label {
        font-size: 14px;
        font-weight: 500;
        color: var(--text-dark);
    }

.zalo-input-group {
    position: relative;
}

    .zalo-input-group input {
        width: 100%;
        padding: 12px 12px 12px 40px;
        border: 1px solid var(--gray-200);
        border-radius: 8px;
        font-size: 14px;
        outline: none;
        transition: border-color 0.2s;
    }

        .zalo-input-group input:focus {
            border-color: var(--zalo-blue);
        }

.zalo-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.zalo-btn {
    padding: 12px;
    background: var(--zalo-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

    .zalo-btn:hover {
        background: #0056cc;
    }

.error-msg {
    color: #ef4444;
    font-size: 12px;
    display: none;
    margin-top: -10px;
}

/* --- Floating Buttons --- */
.float-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s;
    position: relative;
}

    .float-btn:hover {
        transform: scale(1.05);
    }

.float-messenger {
    background: var(--messenger-blue);
}

.float-zalo {
    background: var(--zalo-blue);
}

.float-btn svg {
    width: 28px;
    height: 28px;
    fill: white;
}

/* Tooltips */
.float-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 70px;
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.float-btn:hover::before {
    opacity: 1;
}
