/*
 * ETG social icons.
 *
 * Inline SVG rather than an icon font. The snippet this replaces pulled the
 * whole Font Awesome 6 stylesheet - around 100KB - onto every page of the
 * site to draw nine icons in the footer. These cost nothing extra: they are
 * already in the HTML.
 *
 * Each link carries its brand colour as --etg-si-colour, so one rule styles
 * all of them and adding a network needs no new CSS.
 */

.etg-social-icons {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 35px;
    margin-bottom: 35px;
}

.etg-social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 50%;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.07);
    color: var(--etg-si-colour, #fff);
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.etg-social-icons a svg {
    width: 17px;
    height: 17px;
    display: block;
    /* The glyph follows the link's colour, which is the only thing that
       changes on hover. */
    fill: currentColor;
}

.etg-social-icons a:hover,
.etg-social-icons a:focus-visible {
    transform: scale(1.15);
    background-color: var(--etg-si-colour, rgba(255, 255, 255, 0.2));
    color: #ffffff;
    outline: none;
}

/* X reads white already, so filling with white would erase it. */
.etg-social-icons a.etg-si-twitter:hover,
.etg-social-icons a.etg-si-twitter:focus-visible,
.etg-social-icons a.etg-si-tiktok:hover,
.etg-social-icons a.etg-si-tiktok:focus-visible {
    background-color: #111111;
    color: #ffffff;
}

.etg-social-icons a.etg-si-instagram:hover,
.etg-social-icons a.etg-si-instagram:focus-visible {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: #ffffff;
}

.etg-social-icons a.etg-si-whatsapp svg,
.etg-social-icons a.etg-si-telegram svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 480px) {
    .etg-social-icons {
        gap: 10px;
    }

    .etg-social-icons a {
        width: 36px;
        height: 36px;
    }

    .etg-social-icons a svg {
        width: 15px;
        height: 15px;
    }

    .etg-social-icons a.etg-si-whatsapp svg,
    .etg-social-icons a.etg-si-telegram svg {
        width: 18px;
        height: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .etg-social-icons a {
        transition: none;
    }
}

/* The WhatsApp channel mark is a ring cut out of the bubble. It is drawn in
   the footer's own dark colour so it reads as a hole; on hover the bubble
   fills the circle behind it, so it switches to that fill instead. */
.etg-social-icons a.etg-si-whatsapp svg circle {
    stroke: #16202c;
}

.etg-social-icons a.etg-si-whatsapp svg circle[fill]:not([fill="none"]) {
    fill: #16202c;
}

.etg-social-icons a.etg-si-whatsapp:hover svg circle {
    stroke: #25D366;
}

.etg-social-icons a.etg-si-whatsapp:hover svg circle[fill]:not([fill="none"]) {
    fill: #25D366;
}

/* ------------------------------------------------------------------
   Floating contact button

   Replaces Chaty, which shipped 59KB across four files - two of them
   copies of an emoji picker - to draw three links. Everything below is
   part of the stylesheet the footer icons already load, so the button
   costs no extra request.
   ------------------------------------------------------------------ */

.etg-si-float {
    position: fixed;
    bottom: 24px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.etg-si-float-right { right: 24px; }

.etg-si-float-left {
    left: 24px;
    align-items: flex-start;
}

.etg-si-float-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.etg-si-float-left .etg-si-float-list { align-items: flex-start; }

.etg-si-float-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px 8px 8px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
    text-decoration: none;
    color: #1f2d3d;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    /* Each item slides in behind the one before it. */
    animation: etg-si-float-in 0.18s ease both;
}

.etg-si-float-item:nth-child(2) { animation-delay: 0.04s; }
.etg-si-float-item:nth-child(3) { animation-delay: 0.08s; }

.etg-si-float-item:hover,
.etg-si-float-item:focus-visible {
    color: #1f2d3d;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

.etg-si-float-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    background: var(--etg-si-colour, #25D366);
    color: #fff;
}

.etg-si-float-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* The channel mark is a ring cut out of the bubble, so on a coloured
   chip it has to be painted in the chip colour, not the page colour. */
.etg-si-float-whatsapp-channel .etg-si-float-icon svg circle {
    stroke: #fff;
}

.etg-si-float-whatsapp-channel .etg-si-float-icon svg circle[fill]:not([fill="none"]) {
    fill: #fff;
}

.etg-si-float-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.42);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.etg-si-float-toggle:hover { transform: scale(1.06); }

.etg-si-float-toggle svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

.etg-si-float-toggle .etg-si-float-close,
.etg-si-float.is-open .etg-si-float-toggle .etg-si-float-open { display: none; }

.etg-si-float.is-open .etg-si-float-toggle .etg-si-float-close { display: block; }

@keyframes etg-si-float-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
    .etg-si-float { bottom: 18px; }
    .etg-si-float-right { right: 16px; }
    .etg-si-float-left { left: 16px; }

    .etg-si-float-toggle {
        width: 50px;
        height: 50px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .etg-si-float-item,
    .etg-si-float-toggle {
        animation: none;
        transition: none;
    }
}
