/* === RESET === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === WIDGET WRAPPER === */
.sticky-contact-widget {
    position: fixed;
    left: 20px;
    bottom: 60px;
    z-index: 99999;
    will-change: transform;
    animation: widgetAppear 0.5s ease forwards;
}

/* === WIDGET CORE === */
.widget-core {
    background: rgba(18, 25, 45, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 80px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    animation: gentleFloat 3s ease-in-out infinite;
    animation-delay: 0.5s; /* starts after widgetAppear */
}

/* === ICONS === */
.contact-icon {
    position: relative;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, background 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.contact-icon i {
    font-size: 28px;
    transition: color 0.3s ease;
}

.contact-icon.whatsapp i { color: #25D366; }
.contact-icon.phone i    { color: #1E88E5; }

.contact-icon:hover {
    transform: translateY(-4px) scale(1.08);
}

.contact-icon.whatsapp:hover { background: #25D366; }
.contact-icon.whatsapp:hover i { color: #fff; }

.contact-icon.phone:hover { background: #1E88E5; }
.contact-icon.phone:hover i { color: #fff; }

/* === TOOLTIP === */
.tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: rgba(15, 23, 42, 0.95);
    color: #fff;
    padding: 7px 14px;
    border-radius: 40px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    z-index: 9;
}

.tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(15, 23, 42, 0.95);
}

.contact-icon:hover .tooltip,
.contact-icon:focus-visible .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* === DIVIDER === */
.widget-divider {
    width: 1px;
    height: 38px;
    background: rgba(255, 255, 255, 0.25);
    pointer-events: none;
    flex-shrink: 0;
}

/* === ANIMATIONS === */
@keyframes widgetAppear {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes gentleFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-6px); }
}

/* === TABLET (≤768px) === */
@media (max-width: 768px) {
    .sticky-contact-widget {
        left: 15px;
        bottom: 15px;
    }

    .widget-core {
        flex-direction: column;
        gap: 12px;
        padding: 14px 10px;
        border-radius: 60px;
        animation: none; /* disable float on touch devices */
    }

    .widget-divider {
        width: 30px;
        height: 1px;
    }

    .contact-icon {
        width: 52px;
        height: 52px;
    }

    .contact-icon i { font-size: 26px; }

    /* show tooltips to the right on mobile (above is cramped) */
    .tooltip {
        bottom: auto;
        top: 50%;
        left: calc(100% + 14px);
        transform: translateY(-50%) translateX(-8px);
    }

    .tooltip::after {
        top: 50%;
        left: -10px;
        transform: translateY(-50%);
        border-top-color: transparent;
        border-right-color: rgba(15, 23, 42, 0.95);
    }

    .contact-icon:hover .tooltip,
    .contact-icon:focus-visible .tooltip {
        transform: translateY(-50%) translateX(0);
    }
}

/* === MOBILE (≤480px) === */
@media (max-width: 480px) {
    .sticky-contact-widget {
        left: 12px;
        bottom: 100px;
    }

    .contact-icon {
        width: 48px;
        height: 48px;
    }

    .contact-icon i { font-size: 24px; }

    .tooltip {
        font-size: 11px;
        padding: 6px 10px;
    }
}