/* YoCha Marketing Materials – floating app download buttons (1.12.0). */

#ymm-apps .ymm-app {
    position: fixed;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 9989;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: opacity .2s ease, visibility .2s;
}

#ymm-apps .ymm-app--left {
    left: 16px;
}

/* Same edge as the right popup tab: 84px clears the chat bubble and back-to-top on desktop. */
#ymm-apps .ymm-app--right {
    right: 84px;
}

/* Bottom of the page: fade out so footer links stay clickable (1.12.7). */
html.ymm-at-footer #ymm-apps .ymm-app {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Hidden on the side where the home page card is open. */
#ymm-apps .ymm-app.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#ymm-apps .ymm-app__pill {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    margin: 0;
    padding: 8px 10px 8px 8px;
    border: 2px solid #5cb83a;
    border-radius: 14px;
    background: #0c120d;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
    font-family: inherit;
    line-height: 1.1;
}

#ymm-apps .ymm-app__pill:hover {
    background: #142019;
}

#ymm-apps .ymm-app__pill:focus-visible {
    outline: 2px solid #94e95b;
    outline-offset: 2px;
}

/* Less green (9 Nov): dark tile with a green icon. */
#ymm-apps .ymm-app__icon {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #1a2a1e;
    color: #5cb83a;
}

#ymm-apps .ymm-app__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
}

#ymm-apps .ymm-app__text strong {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

#ymm-apps .ymm-app__text small {
    font-size: 11px;
    color: #9fb3a5;
}

#ymm-apps .ymm-app__chev {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #5cb83a;
    color: #0c120d;
    transition: transform .25s ease;
}

#ymm-apps .ymm-app.is-open .ymm-app__chev {
    transform: rotate(180deg);
}

#ymm-apps .ymm-app__menu {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    gap: 8px;
    visibility: hidden;
    pointer-events: none;
}

#ymm-apps .ymm-app.is-open .ymm-app__menu {
    visibility: visible;
    pointer-events: auto;
}

/* Store buttons: same width as the pill, icon + text centred, soft border, green on hover. */
#ymm-apps a.ymm-app__store {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 48px;
    box-sizing: border-box;
    padding: 0 14px;
    border: 1px solid rgba(159, 179, 165, .4);
    border-radius: 12px;
    background: #000;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .28);
    opacity: 0;
    transform: translateY(14px) scale(.96);
    transition: opacity .2s ease, transform .28s cubic-bezier(.2, .8, .2, 1), background .15s;
}

#ymm-apps a.ymm-app__store span {
    display: flex;
    flex-direction: column;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.05;
    color: #fff;
}

#ymm-apps a.ymm-app__store small {
    font-size: 10px;
    font-weight: 500;
    color: #cfd8d2;
}

#ymm-apps a.ymm-app__store:hover,
#ymm-apps a.ymm-app__store:focus-visible {
    background: #2f7a17;
    border-color: #5cb83a;
    color: #fff;
    outline: none;
}

#ymm-apps .ymm-app.is-open a.ymm-app__store {
    opacity: 1;
    transform: none;
}

#ymm-apps .ymm-app.is-open a.ymm-app__store:nth-of-type(1) {
    transition-delay: .06s;
}

#ymm-apps .ymm-app:not(.is-open) a.ymm-app__store {
    transition-delay: 0s;
}

/* Same breakpoint as the plugin's right popup tab. */
@media (max-width: 689px) {
    #ymm-apps .ymm-app--right {
        right: 16px;
    }
}

@media (max-width: 600px) {
    #ymm-apps .ymm-app__pill {
        width: 160px;
        min-width: 0;
        gap: 8px;
        padding: 6px 8px 6px 6px;
    }

    #ymm-apps .ymm-app__icon {
        width: 30px;
        height: 30px;
    }

    #ymm-apps .ymm-app__text strong {
        font-size: 12px;
    }

    #ymm-apps .ymm-app__text small {
        font-size: 10px;
    }

    #ymm-apps .ymm-app__chev {
        width: 24px;
        height: 24px;
    }

    #ymm-apps a.ymm-app__store {
        height: 44px;
    }

    /* "Also show on phones" switched off. */
    #ymm-apps.ymm-apps--no-phones {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    #ymm-apps a.ymm-app__store,
    #ymm-apps .ymm-app__chev,
    #ymm-apps .ymm-app {
        transition: none;
    }
}
