﻿.floating-contact-button {
    position: fixed;
    right: 0;
    max-height: auto; /* ความสูงตอนย่อ */
    transition: max-width 0.5s ease, max-height 0.5s ease, padding 0.4s ease;
    top: 40%;
    bottom: 80px; /* ดีกว่าสำหรับมือถือ */
    z-index: 1000;
    overflow: hidden;
    bottom: 80px; /* ดีกว่าสำหรับมือถือ */
}

.contact-expand-button {
    display: inline-flex;
    align-items: center;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 25px 0 0 25px;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    overflow: hidden;
    /* เริ่มแสดงแค่ไอคอน */
    width: fit-content;
    max-width: 40px;
    transition: max-width 0.5s ease, padding-right 0.5s ease;
}

    .contact-expand-button:hover {
        max-width: 2400px; /* ขยายสุดได้แค่ตรงนี้ แต่ข้างใน auto */
        padding-right: 16px;
    }

.icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    transition: transform 0.4s ease;
}

.contact-expand-button:hover .icon {
    transform: scale(1.05);
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 10px;
    opacity: 0;
    white-space: nowrap;
    transform: scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.contact-expand-button:hover .contact-info {
    opacity: 1;
    transform: scale(1);
}
