/* Frontend Styles for NLH WAT Floating Contact Plugin */

/* Overlay khi menu mở */
#nlh-wat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(128, 128, 128, 0.7);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#nlh-wat-overlay.show {
    opacity: 1;
}

#nlh-wat-floating-contact {
    position: fixed;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Nút chính */
.nlh-wat-contact-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    position: relative;
}

.nlh-wat-contact-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.2);
}

.nlh-wat-contact-button i {
    font-size: 16px;
}

/* Mặc định ẩn icon X */
.nlh-wat-contact-button .fa-times {
    display: none;
}

/* Khi menu mở - chuyển nút thành icon X tròn */
#nlh-wat-floating-contact.menu-open .nlh-wat-contact-button {
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    background: #7c3aed;
}

#nlh-wat-floating-contact.menu-open .nlh-wat-contact-button .dot-ping,
#nlh-wat-floating-contact.menu-open .nlh-wat-contact-button .fa-comments,
#nlh-wat-floating-contact.menu-open .nlh-wat-contact-button span {
    display: none;
}

#nlh-wat-floating-contact.menu-open .nlh-wat-contact-button .fa-times {
    display: inline-block;
    font-size: 20px;
    animation: rotateIn 0.3s ease;
}

@keyframes rotateIn {
    from {
        transform: rotate(-90deg);
        opacity: 0;
    }
    to {
        transform: rotate(0);
        opacity: 1;
    }
}

/* Menu popup dọc - xổ lên phía trên nút chính */
.nlh-wat-contact-menu {
    position: absolute;
    bottom: 60px;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 10000;
}

.nlh-wat-contact-menu.show {
    opacity: 1;
    transform: translateY(0);
}

/* Mỗi item trong menu */
.nlh-wat-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nlh-wat-menu-item:hover {
    text-decoration: none;
    transform: scale(1.05);
}

/* Label text bên trái icon */
.nlh-wat-menu-label {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Icon tròn */
.nlh-wat-menu-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.nlh-wat-menu-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.nlh-wat-menu-item:hover .nlh-wat-menu-icon {
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Nút đóng */
.nlh-wat-close-btn {
    display: flex;
    justify-content: flex-end;
    margin-top: 5px;
    cursor: pointer;
}

.nlh-wat-close-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #7c3aed;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.nlh-wat-close-btn:hover .nlh-wat-close-icon {
    background-color: #6d28d9;
    transform: rotate(90deg);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nlh-wat-menu-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .nlh-wat-menu-icon img {
        width: 24px;
        height: 24px;
    }
    
    .nlh-wat-close-icon {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .nlh-wat-menu-label {
        font-size: 12px;
        padding: 5px 10px;
    }
}

/* Animation cho từng item */
.nlh-wat-menu-item {
    opacity: 0;
    transform: translateY(20px);
}

.nlh-wat-contact-menu.show .nlh-wat-menu-item {
    opacity: 1;
    transform: translateY(0);
}

.nlh-wat-contact-menu.show .nlh-wat-menu-item:nth-child(1) {
    transition-delay: 0.05s;
}

.nlh-wat-contact-menu.show .nlh-wat-menu-item:nth-child(2) {
    transition-delay: 0.1s;
}

.nlh-wat-contact-menu.show .nlh-wat-menu-item:nth-child(3) {
    transition-delay: 0.15s;
}

.nlh-wat-contact-menu.show .nlh-wat-menu-item:nth-child(4) {
    transition-delay: 0.2s;
}

.nlh-wat-contact-menu.show .nlh-wat-menu-item:nth-child(5) {
    transition-delay: 0.25s;
}

.nlh-wat-contact-menu.show .nlh-wat-menu-item:nth-child(6) {
    transition-delay: 0.3s;
}

.nlh-wat-close-btn {
    opacity: 0;
    transform: translateY(20px);
}

.nlh-wat-contact-menu.show .nlh-wat-close-btn {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.35s;
}

/* Ping animation - chấm nhấp nháy */
.nlh-wat-contact-button .dot-ping {
    width: 14px;
    height: 14px;
    border-radius: 9999999px;
    position: absolute;
    top: 0px;
    right: -4px;
}

.nlh-wat-contact-button .ping {
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
    width: 14px;
    height: 14px;
    border-radius: 9999999px;
    background-color: red;
    position: absolute;
    opacity: .9;
}

.nlh-wat-contact-button .dot {
    background-color: red;
    width: 14px;
    height: 14px;
    border-radius: 9999999px;
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}
