
/* =========================================================
   BCC WHATSAPP FLOATER
   Desktop: Floating button with expandable contact panel
   Mobile: Fixed bottom contact bar
   ========================================================= */

.bcc-whatsapp-floater {
    --bcc-whatsapp-green: #176b4d;
    --bcc-whatsapp-green-dark: #10543b;
    --bcc-whatsapp-ink: #0d2230;
    --bcc-whatsapp-muted: #6b7478;
    --bcc-whatsapp-surface: #ffffff;
    --bcc-whatsapp-border: rgba(13, 34, 48, 0.12);

    position: relative;
    z-index: 9990;
    font-family: inherit;
}

.bcc-whatsapp-floater *,
.bcc-whatsapp-floater *::before,
.bcc-whatsapp-floater *::after {
    box-sizing: border-box;
}

.bcc-whatsapp-floater button,
.bcc-whatsapp-floater a {
    -webkit-tap-highlight-color: transparent;
}

.bcc-whatsapp-floater button {
    font: inherit;
}

/* Desktop trigger */

.bcc-whatsapp-floater__trigger {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 9992;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;

    min-height: 58px;
    padding: 0 21px;

    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;

    background: var(--bcc-whatsapp-green);
    color: #ffffff;

    font-size: 14px;
    font-weight: 600;
    line-height: 1;

    cursor: pointer;
    box-shadow: 0 8px 28px rgba(13, 34, 48, 0.17);

    transition:
        background-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
}

.bcc-whatsapp-floater__trigger:hover {
    background: var(--bcc-whatsapp-green-dark);
    box-shadow: 0 12px 34px rgba(13, 34, 48, 0.23);
    transform: translateY(-2px);
}

.bcc-whatsapp-floater__trigger:focus-visible,
.bcc-whatsapp-floater__close:focus-visible,
.bcc-whatsapp-floater__action:focus-visible,
.bcc-whatsapp-floater__mobile:focus-visible {
    outline: 3px solid #f4d738;
    outline-offset: 4px;
}

.bcc-whatsapp-floater__icon {
    display: block;
    flex: 0 0 23px;
    width: 23px;
    height: 23px;
}

.bcc-whatsapp-floater__trigger-text {
    white-space: nowrap;
}

.bcc-whatsapp-floater__chevron {
    display: block;
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
    margin-left: 1px;

    transition: transform 180ms ease;
}

.bcc-whatsapp-floater.is-open .bcc-whatsapp-floater__chevron {
    transform: rotate(180deg);
}

/* Desktop contact panel */

.bcc-whatsapp-floater__panel {
    position: fixed;
    right: 28px;
    bottom: 100px;
    z-index: 9991;

    width: min(370px, calc(100vw - 40px));
    overflow: hidden;

    border: 1px solid var(--bcc-whatsapp-border);
    border-radius: 18px;

    background: var(--bcc-whatsapp-surface);
    color: var(--bcc-whatsapp-ink);

    box-shadow: 0 18px 60px rgba(13, 34, 48, 0.16);

    transform-origin: bottom right;
    animation: bcc-whatsapp-panel-in 200ms ease both;
}

.bcc-whatsapp-floater__panel[hidden] {
    display: none;
}

.bcc-whatsapp-floater__panel-header {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;

    padding: 25px 22px 23px;

    background: var(--bcc-whatsapp-ink);
    color: #ffffff;
}

.bcc-whatsapp-floater__panel-icon {
    display: flex;
    flex: 0 0 43px;
    align-items: center;
    justify-content: center;

    width: 43px;
    height: 43px;

    border-radius: 50%;
    background: var(--bcc-whatsapp-green);
    color: #ffffff;
}

.bcc-whatsapp-floater__panel-icon svg {
    display: block;
    width: 23px;
    height: 23px;
}

.bcc-whatsapp-floater__panel-heading {
    min-width: 0;
    padding-right: 16px;
}

.bcc-whatsapp-floater__eyebrow {
    margin: 0 0 8px;

    color: #f4d738;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    line-height: 1.4;
}

.bcc-whatsapp-floater__panel-heading h2 {
    margin: 0;

    color: #ffffff;
    font-size: 23px;
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.2;
}

.bcc-whatsapp-floater__panel-heading > p:last-child {
    margin: 9px 0 0;

    color: rgba(255, 255, 255, 0.76);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
}

.bcc-whatsapp-floater__close {
    position: absolute;
    top: 16px;
    right: 15px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 31px;
    height: 31px;
    padding: 0;

    border: 0;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;

    cursor: pointer;

    transition: background-color 180ms ease;
}

.bcc-whatsapp-floater__close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.bcc-whatsapp-floater__close svg {
    display: block;
    width: 16px;
    height: 16px;
}

.bcc-whatsapp-floater__panel-body {
    padding: 22px;
}

.bcc-whatsapp-floater__message {
    position: relative;

    margin: 0 0 19px;
    padding: 14px 15px;

    border: 1px solid rgba(13, 34, 48, 0.07);
    border-radius: 4px 13px 13px 13px;

    background: #f5f7f5;
    color: var(--bcc-whatsapp-ink);

    font-size: 13px;
    line-height: 1.65;
}

.bcc-whatsapp-floater__action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    width: 100%;
    min-height: 51px;
    padding: 0 17px;

    border: 0;
    border-radius: 5px;

    background: var(--bcc-whatsapp-green);
    color: #ffffff;

    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;

    transition:
        background-color 180ms ease,
        transform 180ms ease;
}

.bcc-whatsapp-floater__action:hover {
    background: var(--bcc-whatsapp-green-dark);
    color: #ffffff;
    transform: translateY(-1px);
}

.bcc-whatsapp-floater__action svg {
    display: block;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
}

.bcc-whatsapp-floater__note {
    margin: 13px 0 0;

    color: var(--bcc-whatsapp-muted);
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
}

/* Mobile contact bar is hidden on desktop */

.bcc-whatsapp-floater__mobile {
    display: none;
}

/* Panel entrance */

@keyframes bcc-whatsapp-panel-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mobile layout */

@media (max-width: 767px) {
    .bcc-whatsapp-floater__trigger,
    .bcc-whatsapp-floater__panel {
        display: none;
    }

    .bcc-whatsapp-floater__mobile {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 9992;

        display: flex;
        align-items: center;
        justify-content: center;
        gap: 11px;

        min-height: 62px;
        padding: 12px 20px;
        padding-bottom: max(12px, env(safe-area-inset-bottom));

        border: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.12);

        background: var(--bcc-whatsapp-green);
        color: #ffffff;

        font-size: 14px;
        font-weight: 600;
        line-height: 1.4;
        text-decoration: none;

        box-shadow: 0 -5px 24px rgba(13, 34, 48, 0.1);

        transition: background-color 180ms ease;
    }

    .bcc-whatsapp-floater__mobile:hover {
        background: var(--bcc-whatsapp-green-dark);
        color: #ffffff;
    }

    .bcc-whatsapp-floater__mobile > svg:first-child {
        display: block;
        flex: 0 0 23px;
        width: 23px;
        height: 23px;
    }

    .bcc-whatsapp-floater__mobile-arrow {
        display: block;
        flex: 0 0 17px;
        width: 17px;
        height: 17px;
        margin-left: 2px;
    }

    /*
     * Keep page content and footer controls visible
     * above the fixed mobile contact bar.
     */
    body {
        padding-bottom: calc(62px + env(safe-area-inset-bottom));
    }
}

/* Respect reduced-motion preferences */

@media (prefers-reduced-motion: reduce) {
    .bcc-whatsapp-floater *,
    .bcc-whatsapp-floater *::before,
    .bcc-whatsapp-floater *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
