.hbctb,
.hbctb * {
    box-sizing: border-box;
}

.hbctb {
    --hbctb-primary: #109456;
    --hbctb-primary-dark: #087a43;
    --hbctb-text: #111827;
    --hbctb-muted: #64748b;
    --hbctb-border: rgba(15, 23, 42, 0.1);
    --hbctb-surface: #ffffff;
    --hbctb-soft: #f0fbf6;
    --hbctb-bottom: 88px;
    --hbctb-right: 18px;
    --hbctb-mobile-bottom: 88px;
    position: fixed;
    right: var(--hbctb-right);
    bottom: calc(var(--hbctb-bottom) + env(safe-area-inset-bottom, 0px));
    z-index: 99999;
    font-family: inherit;
    color: var(--hbctb-text);
}

.hbctb svg {
    display: block;
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.hbctb__launcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 62px;
    padding: 10px 18px 10px 12px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--hbctb-primary), var(--hbctb-primary-dark));
    box-shadow: 0 18px 35px rgba(8, 122, 67, 0.32), 0 4px 12px rgba(15, 23, 42, 0.2);
    cursor: pointer;
    font: inherit;
    line-height: 1.2;
    isolation: isolate;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.hbctb__launcher::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: inherit;
    border: 2px solid rgba(16, 148, 86, 0.26);
    opacity: 0;
    animation: hbctb-pulse 2.6s ease-out infinite;
    z-index: -1;
}

.hbctb__launcher:hover,
.hbctb__launcher:focus-visible {
    transform: translateY(-2px);
    filter: brightness(1.03);
    box-shadow: 0 22px 42px rgba(8, 122, 67, 0.38), 0 4px 14px rgba(15, 23, 42, 0.22);
}

.hbctb__launcher:focus-visible,
.hbctb__close:focus-visible,
.hbctb__action:focus-visible {
    outline: 3px solid rgba(16, 148, 86, 0.28);
    outline-offset: 3px;
}

.hbctb__launcher-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: var(--hbctb-primary);
    background: #ffffff;
    font-size: 22px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.hbctb__launcher-copy {
    display: grid;
    gap: 2px;
    text-align: left;
    white-space: nowrap;
}

.hbctb__launcher-copy strong {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.hbctb__launcher-copy small {
    color: rgba(255, 255, 255, 0.86);
    font-size: 11px;
    font-weight: 600;
}

.hbctb__panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 14px);
    width: min(360px, calc(100vw - 32px));
    padding: 20px;
    border: 1px solid var(--hbctb-border);
    border-radius: 24px;
    background: var(--hbctb-surface);
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.22), 0 4px 16px rgba(15, 23, 42, 0.1);
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    transform-origin: bottom right;
    transition: opacity 180ms ease, transform 180ms ease;
}

.hbctb__panel.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.hbctb__panel[hidden] {
    display: none !important;
}

.hbctb__close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--hbctb-border);
    border-radius: 999px;
    color: #475569;
    background: #ffffff;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.hbctb__close:hover {
    color: var(--hbctb-text);
    background: #f8fafc;
    transform: rotate(5deg);
}

.hbctb__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-right: 34px;
}

.hbctb__brand-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    color: var(--hbctb-primary);
    background: var(--hbctb-soft);
    font-size: 24px;
}

.hbctb__eyebrow {
    display: block;
    margin: 0 0 2px;
    color: var(--hbctb-primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.hbctb__brand h2 {
    margin: 0;
    color: var(--hbctb-text);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.hbctb__subtitle {
    margin: 13px 0 16px;
    color: var(--hbctb-muted);
    font-size: 14px;
    line-height: 1.55;
}

.hbctb__actions {
    display: grid;
    gap: 10px;
}

.hbctb__action {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    padding: 13px 14px;
    border: 1px solid rgba(16, 148, 86, 0.16);
    border-radius: 18px;
    color: var(--hbctb-text);
    background: #ffffff;
    text-decoration: none !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.hbctb__action:hover {
    transform: translateY(-1px);
    border-color: rgba(16, 148, 86, 0.32);
    background: #fbfffd;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.hbctb__action-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #ffffff;
    background: var(--hbctb-primary);
    font-size: 20px;
}

.hbctb__action-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.hbctb__action-copy strong {
    color: var(--hbctb-text);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.15;
}

.hbctb__action-copy small {
    overflow: hidden;
    color: var(--hbctb-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hbctb__trust {
    margin: 14px 0 0;
    padding: 12px 13px;
    border-radius: 16px;
    color: #335047;
    background: var(--hbctb-soft);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
}

@keyframes hbctb-pulse {
    0% {
        opacity: 0.75;
        transform: scale(0.92);
    }

    70%,
    100% {
        opacity: 0;
        transform: scale(1.08);
    }
}

@media (max-width: 640px) {
    .hbctb {
        right: 14px;
        bottom: calc(var(--hbctb-mobile-bottom) + env(safe-area-inset-bottom, 0px));
    }

    .hbctb__launcher {
        min-height: 58px;
        padding: 9px 15px 9px 10px;
    }

    .hbctb__launcher-icon {
        width: 40px;
        height: 40px;
        font-size: 21px;
    }

    .hbctb__launcher-copy strong {
        font-size: 14px;
    }

    .hbctb__launcher-copy small {
        font-size: 10.5px;
    }

    .hbctb__panel {
        position: fixed;
        right: 14px;
        left: 14px;
        bottom: calc(var(--hbctb-mobile-bottom) + 74px + env(safe-area-inset-bottom, 0px));
        width: auto;
        max-height: calc(100vh - 130px - env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        border-radius: 22px;
        transform-origin: bottom right;
    }
}

@media (max-width: 380px) {
    .hbctb__launcher-copy small {
        display: none;
    }

    .hbctb__launcher {
        min-height: 54px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hbctb__launcher,
    .hbctb__launcher::before,
    .hbctb__panel,
    .hbctb__close,
    .hbctb__action {
        animation: none !important;
        transition: none !important;
    }
}
