/**
 * Sticky Contact Bar Styles
 * Floating contact buttons on the right side of the screen
 */

.tru-sticky-contact-bar {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Sticky Contact Popup - Same style as recruitment popup */
#tru-sticky-form-popup.tru-form-popup-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#tru-sticky-form-popup.tru-form-popup-modal.active {
    display: flex;
    opacity: 1;
}

/* Individual Sticky Button */
.tru-sticky-btn {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    color: #ffffff;
    text-decoration: none;
}

.tru-sticky-btn svg {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

/* Label (hidden by default, shown on hover) */
.tru-sticky-label {
    position: absolute;
    right: 70px;
    background: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.tru-sticky-label::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid rgba(0, 0, 0, 0.85);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

/* Show label on hover */
.tru-sticky-btn:hover .tru-sticky-label {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.tru-sticky-btn:hover {
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.tru-sticky-btn:hover svg {
    transform: scale(1.1);
}

.tru-sticky-btn:active {
    transform: scale(1.05);
}

/* Hotline Button - Green */
.tru-sticky-hotline {
    background: linear-gradient(135deg, #34c759 0%, #30b350 100%);
}

/* Zalo Button - Blue */
.tru-sticky-zalo {
    background: linear-gradient(135deg, #0068ff 0%, #0052cc 100%);
}

/* Facebook Button - Blue */
.tru-sticky-facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0c63d4 100%);
}

/* Contact Form Button - Orange/Red */
.tru-sticky-contact {
    background: linear-gradient(135deg, #dc4d28 0%, #c43d18 100%);
}

/* Back to Top Button - Gray */
.tru-sticky-backtop {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.tru-sticky-backtop.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Animation on page load */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.tru-sticky-contact-bar .tru-sticky-btn {
    animation: slideInRight 0.5s ease forwards;
}

.tru-sticky-contact-bar .tru-sticky-btn:nth-child(1) {
    animation-delay: 0.1s;
}

.tru-sticky-contact-bar .tru-sticky-btn:nth-child(2) {
    animation-delay: 0.2s;
}

.tru-sticky-contact-bar .tru-sticky-btn:nth-child(3) {
    animation-delay: 0.3s;
}

.tru-sticky-contact-bar .tru-sticky-btn:nth-child(4) {
    animation-delay: 0.4s;
}

.tru-sticky-contact-bar .tru-sticky-btn:nth-child(5) {
    animation-delay: 0.5s;
}

/* Responsive */
@media (max-width: 768px) {
    .tru-sticky-contact-bar {
        right: 12px;
        bottom: 12px;
        gap: 10px;
    }

    .tru-sticky-btn {
        width: 48px;
        height: 48px;
    }

    .tru-sticky-btn svg {
        width: 20px;
        height: 20px;
    }

    /* Hide labels on mobile */
    .tru-sticky-label {
        display: none;
    }
}

@media (max-width: 480px) {
    .tru-sticky-contact-bar {
        right: 8px;
        bottom: 8px;
        gap: 8px;
    }

    .tru-sticky-btn {
        width: 44px;
        height: 44px;
    }
}

/* Ensure sticky bar is above other elements but below popups */
@media (min-width: 769px) {
    .tru-sticky-contact-bar {
        z-index: 9998;
    }
}
