/* ===== CONTACT WIDGETS COMPONENT ===== */
/* WhatsApp, Phone, Inquiry buttons & Mobile Call Bar */
/* Extracted from index.php for reusability */

/* Floating Contact Widget */
.contact-widget {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    text-decoration: none;
}

.contact-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.contact-btn.whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
}

.contact-btn.phone {
    background: linear-gradient(135deg, #FF6B35, #E55529);
    color: white;
}

.contact-btn.inquiry {
    background: linear-gradient(135deg, #1E4D8C, #153A6B);
    color: white;
    font-size: 20px;
}

/* Tooltip on hover */
.contact-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 70px;
    background: #333;
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

.contact-btn:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Pulse animation for attention */
.contact-btn.inquiry {
    animation: pulseBtn 2s ease-in-out infinite;
}

@keyframes pulseBtn {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(30, 77, 140, 0.4);
    }

    50% {
        box-shadow: 0 4px 25px rgba(30, 77, 140, 0.7);
    }
}

/* Mobile Sticky Call Bar */
.mobile-call-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #047857, #059669);
    padding: 12px 20px;
    z-index: 9997;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.mobile-call-bar a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
}

.mobile-call-bar .call-icon {
    font-size: 20px;
    animation: ring 1.5s ease-in-out infinite;
}

@keyframes ring {

    0%,
    100% {
        transform: rotate(0deg);
    }

    10%,
    30% {
        transform: rotate(-10deg);
    }

    20%,
    40% {
        transform: rotate(10deg);
    }

    50% {
        transform: rotate(0deg);
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .contact-widget {
        bottom: 80px;
        right: 16px;
    }

    .contact-btn {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }

    .contact-btn::before {
        display: none;
    }

    .mobile-call-bar {
        display: block;
    }
}

@media (max-width: 480px) {
    .contact-widget {
        bottom: 75px;
        right: 12px;
        gap: 10px;
    }

    .contact-btn {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    /* Hide contact widget when popup is visible */
    body:has(#dialog:not([style*="display: none"])) .contact-widget,
    body:has(#mask:not([style*="display: none"])) .contact-widget {
        display: none !important;
    }
}

/* Hide contact widget when popup is active (fallback using lower z-index) */
#dialog.window~.contact-widget,
#mask~.contact-widget {
    z-index: 999 !important;
}

@media print {
    .contact-widget {
        display: none !important;
    }

    .mobile-call-bar {
        display: none !important;
    }
}