/* ============================================================
   The sign-up gift nudge (guests, home page): Ajebhom fixed in the page's bottom inline-start corner, rising from
   the edge, and a speech bubble above it with the gift and the way to sign up. Classes: hm-giftbot.
   ============================================================ */
.hm-giftbot {
    position: fixed;
    bottom: 0;
    inset-inline-start: 18px;
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 290px;
    pointer-events: none;
}

    .hm-giftbot[hidden] {
        display: none;
    }

/* Ajebhom rises from the screen's bottom edge */
.hm-giftbot-bot {
    display: block;
    width: 132px;
    height: 132px;
    margin-bottom: -18px;
    margin-inline-start: 6px;
    pointer-events: auto;
    transform: translateY(110%);
    transition: transform .55s cubic-bezier(.3, 1.3, .5, 1);
}

    .hm-giftbot-bot img {
        display: block;
        width: 100%;
        height: 100%;
        filter: drop-shadow(0 14px 22px rgba(201, 29, 19, 0.28));
    }

.hm-giftbot.is-in .hm-giftbot-bot {
    transform: none;
}

/* the bubble: grows out of its mouth (the tail points down at the robot) */
.hm-giftbot-say {
    position: relative;
    display: grid;
    gap: 8px;
    margin-bottom: 4px;
    padding: 14px 16px 16px;
    border-radius: 18px;
    background: var(--ds-surface);
    border: 1px solid var(--ds-tint-line);
    border-top: 3px solid var(--ds-red);
    box-shadow: var(--ds-shadow-lg);
    color: var(--ds-text);
    font-size: 13.5px;
    line-height: 1.6;
    pointer-events: auto;
    transform-origin: bottom left;
    transform: translateY(12px) scale(.3);
    opacity: 0;
    transition: transform .4s cubic-bezier(.3, 1.4, .5, 1), opacity .25s ease;
}

html[dir="rtl"] .hm-giftbot-say {
    transform-origin: bottom right;
}

    .hm-giftbot-say::after {
        content: "";
        position: absolute;
        bottom: -8px;
        inset-inline-start: 62px;
        width: 14px;
        height: 14px;
        background: var(--ds-surface);
        border-inline-end: 1px solid var(--ds-tint-line);
        border-bottom: 1px solid var(--ds-tint-line);
        transform: rotate(45deg);
    }

.hm-giftbot.is-talking .hm-giftbot-say {
    transform: none;
    opacity: 1;
}

.hm-giftbot-tag {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    border-radius: var(--ds-r-pill);
    background: var(--ds-red-soft);
    color: var(--ds-red);
    font-size: 12px;
    font-weight: 700;
}

.hm-giftbot-title {
    padding-inline-end: 22px;
    color: var(--ds-ink);
    font-size: 16px;
    line-height: 1.5;
}

.hm-giftbot-parts {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

    .hm-giftbot-parts li {
        display: flex;
        align-items: center;
        gap: 8px;
    }

.hm-giftbot-ic {
    flex: none;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--ds-tint);
    color: var(--ds-red);
    font-size: 11px;
}

.hm-giftbot-go {
    width: 100%;
    justify-content: center;
    margin-top: 2px;
}

.hm-giftbot-x {
    position: absolute;
    top: 10px;
    inset-inline-end: 10px;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: var(--ds-soft);
    color: var(--ds-muted);
    font-size: 11px;
    cursor: pointer;
}

    .hm-giftbot-x:hover {
        color: var(--ds-ink);
    }

/* Ajebhom's tour has the stage */
.is-touring .hm-giftbot {
    display: none;
}

@media (max-width: 575px) {
    .hm-giftbot {
        inset-inline-start: 10px;
        width: min(260px, calc(100vw - 20px));
    }

    .hm-giftbot-bot {
        width: 96px;
        height: 96px;
        margin-bottom: -12px;
    }

    .hm-giftbot-say {
        padding: 12px 14px 14px;
        font-size: 13px;
    }

    .hm-giftbot-title {
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hm-giftbot-bot,
    .hm-giftbot-say {
        transition: none;
    }
}
