/* ========================================
   Contact Widget - Floating Contact Button
   ======================================== */

/* Main Container */
.contact-widget {
    position: fixed;
    left: 20px;
    bottom: 200px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Label */
.contact-widget-label {
    background: linear-gradient(135deg, #ff9800 0%, #ff5722 100%);
    color: white;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 14px;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(255, 152, 0, 0.4);
    animation: labelPulse 2s ease-in-out infinite;
}

@keyframes labelPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Main Toggle Button */
.contact-widget-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.contact-widget-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.5);
}

.contact-widget-toggle svg {
    width: 28px;
    height: 28px;
    fill: white;
    transition: transform 0.3s ease;
}

.contact-widget.active .contact-widget-toggle svg {
    transform: rotate(45deg);
}

/* Sub Buttons Container */
.contact-widget-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-widget.active .contact-widget-buttons,
.contact-widget:hover .contact-widget-buttons {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Individual Action Buttons */
.contact-widget-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    text-decoration: none;
}

.contact-widget-btn:hover {
    transform: scale(1.15);
}

.contact-widget-btn svg {
    width: 24px;
    height: 24px;
    fill: white;
}

/* Call Button */
.contact-widget-btn.call-btn {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.contact-widget-btn.call-btn:hover {
    box-shadow: 0 5px 25px rgba(17, 153, 142, 0.5);
}

/* WhatsApp Button */
.contact-widget-btn.whatsapp-btn {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

.contact-widget-btn.whatsapp-btn:hover {
    box-shadow: 0 5px 25px rgba(37, 211, 102, 0.5);
}

/* Tooltip Labels */
.contact-widget-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 15px);
    right: auto;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    font-family: 'Cairo', sans-serif;
}

.contact-widget-btn:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Phone Numbers Dropdown */
.phone-dropdown {
    position: absolute;
    left: calc(100% + 15px);
    right: auto;
    bottom: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 12px 0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.call-btn:hover .phone-dropdown,
.call-btn:focus .phone-dropdown,
.phone-dropdown:hover {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.phone-dropdown-title {
    padding: 8px 16px;
    font-size: 12px;
    color: #666;
    border-bottom: 1px solid #eee;
    margin-bottom: 8px;
    font-family: 'Cairo', sans-serif;
}

.phone-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    font-family: 'Cairo', sans-serif;
    direction: ltr;
    text-align: left;
}

.phone-dropdown a:hover {
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.1) 0%, rgba(56, 239, 125, 0.1) 100%);
    color: #11998e;
}

.phone-dropdown a svg {
    width: 18px;
    height: 18px;
    fill: #11998e;
    flex-shrink: 0;
}

/* Pulse Animation for Main Button */
.contact-widget-toggle::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    z-index: -1;
    animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .contact-widget {
        left: 15px;
        bottom: 150px;
    }

    .contact-widget-label {
        font-size: 12px;
        padding: 8px 14px;
    }

    .contact-widget-toggle {
        width: 55px;
        height: 55px;
    }

    .contact-widget-toggle svg {
        width: 24px;
        height: 24px;
    }

    .contact-widget-btn {
        width: 45px;
        height: 45px;
    }

    .contact-widget-btn svg {
        width: 20px;
        height: 20px;
    }

    .contact-widget-btn::before {
        display: none;
    }

    .phone-dropdown {
        right: auto;
        left: calc(100% + 10px);
        bottom: auto;
        top: 0;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .contact-widget {
        left: 10px;
        bottom: 120px;
    }

    .contact-widget-toggle {
        width: 50px;
        height: 50px;
    }

    .contact-widget-btn {
        width: 42px;
        height: 42px;
    }

    .contact-widget-label {
        font-size: 11px;
        padding: 7px 12px;
    }
}