/*
 * The subscriber mark, and the subscriber variant of the "É SUA" badge.
 *
 * Two jobs: make a paying subscriber feel recognised on every page, and put Special Support one click away
 * without turning the corner of the screen into a menu.
 *
 * Positioned bottom-left on purpose. The audio player's bar owns the bottom of the viewport and the basket
 * drawer comes in from the right, so those two edges are taken; sitting above the player's bar rather than
 * beside it also means the mark never covers a transport control.
 */

.hs-mark {
    position: fixed;
    left: 16px;
    /* Clear of the player bar, which is 64px plus the safe area on a phone. */
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    z-index: 9000;
    max-width: 320px;
    font-family: Arial, Helvetica, sans-serif;
}

.hs-mark[hidden] {
    display: none;
}

.hs-mark__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 38px 14px 14px;
    border-radius: 14px;
    /*
     * A warm, slightly metallic panel rather than a flat brand-coloured box. This is meant to read as a mark of
     * standing - something earned - and a saturated rectangle reads as an advertisement, which is the one thing
     * it must not look like to somebody who has already paid.
     */
    background: linear-gradient(160deg, #1d2430 0%, #121820 100%);
    border: 1px solid rgba(168, 223, 0, .35);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
    color: #f2f5f8;
}

.hs-mark__badge {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
}

.hs-mark__star {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #a8df00;
    color: #0a0d14;
}

.hs-mark__star svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.hs-mark__text {
    min-width: 0;
}

.hs-mark__title {
    display: block;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

.hs-mark__sub {
    display: block;
    margin-top: 2px;
    font-size: 11.5px;
    line-height: 1.35;
    color: #aebac7;
}

.hs-mark__links {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    flex-wrap: wrap;
}

/* The support link is the action; it looks like one. */
.hs-mark__cta {
    display: inline-flex;
    align-items: center;
    padding: 7px 13px;
    border-radius: 999px;
    background: #a8df00;
    color: #0a0d14;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.hs-mark__cta:hover,
.hs-mark__cta:focus {
    background: #b9ee16;
    color: #0a0d14;
    text-decoration: none;
}

.hs-mark__link {
    font-size: 11.5px;
    color: #aebac7;
    text-decoration: underline;
}

.hs-mark__link:hover,
.hs-mark__link:focus {
    color: #f2f5f8;
}

.hs-mark__close {
    position: absolute;
    top: 6px;
    right: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #8c9aa8;
    cursor: pointer;
}

.hs-mark__close svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
}

.hs-mark__close:hover {
    color: #f2f5f8;
}

.hs-mark__cta:focus-visible,
.hs-mark__link:focus-visible,
.hs-mark__close:focus-visible {
    outline: 2px solid #a8df00;
    outline-offset: 2px;
}

/*
 * On a phone the mark spans the width, minus the margins, and loses the subtitle.
 *
 * A 320px panel floating over a 360px screen covers the content behind it. Full width with less text reads as a
 * status bar, which is what it is, instead of as a dialog that has to be dealt with.
 */
@media (max-width: 599px) {
    .hs-mark {
        left: 10px;
        right: 10px;
        max-width: none;
    }

    .hs-mark__sub {
        display: none;
    }
}

/*
 * Respect a reduced-motion preference by having no motion to reduce: the mark appears, it does not animate in.
 * Noted rather than omitted so nobody adds a slide-in later without thinking about it.
 */

/* ------------------------------------------------- the subscriber's É SUA badge */

/*
 * Same badge, different reason.
 *
 * A subscriber sees "É SUA" on every Solution because the subscription covers all of them. They do not OWN them
 * - the subscription is streaming only, with no download and no offline copy - so the badge is tinted
 * differently from a purchased one. The wording stays identical at the owner's instruction; the colour is the
 * only thing that distinguishes "bought" from "included in your subscription", and the tooltip says which.
 */
.hp-own-flag--sub {
    background: #1d2430;
    color: #a8df00;
    border: 1px solid rgba(168, 223, 0, .5);
}
