/*
 * Floating buy button (Magento_Theme/templates/html/sr-buy-button.phtml), bottom right, same height
 * as the chat button (satrunner-chat.css) and 12px to its left; it moves into the corner while the chat
 * button is hidden (before Zendesk has loaded). Iconsax TwoTone bag, white on theme.prepaid green (#00843d), darker
 * on hover (owner, 4 November 2026: it was dark #1f2328 and blended into the Prepaid page's dark hero). #00843d, not
 * the light #32cd32 for dark grounds, because the button floats over light sections too and keeps its white label
 * readable on both.
 */
a.sr-buy-button {
    position: fixed;
    right: max(24px, env(safe-area-inset-right, 0px));
    bottom: max(24px, env(safe-area-inset-bottom, 0px));
    z-index: 999998;
    display: flex;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    height: 56px;
    padding: 0 24px 0 20px;
    border-radius: 28px;
    background-color: #00843d;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

body:has(.sr-chat-button:not([hidden])) a.sr-buy-button {
    right: calc(max(24px, env(safe-area-inset-right, 0px)) + 56px + 12px);
}

a.sr-buy-button:visited,
a.sr-buy-button:hover,
a.sr-buy-button:focus,
a.sr-buy-button:active {
    color: #ffffff;
    text-decoration: none;
}

a.sr-buy-button:hover {
    background-color: #006b31;
    transform: translateY(-2px);
}

a.sr-buy-button:focus-visible {
    outline: 3px solid rgba(0, 132, 61, 0.4);
    outline-offset: 4px;
}

.sr-buy-button__icon {
    display: block;
    flex: none;
    width: 20px;
    height: 20px;
    background-color: currentColor;
    -webkit-mask: url('../images/icons/bag.svg') center / 20px 20px no-repeat;
    mask: url('../images/icons/bag.svg') center / 20px 20px no-repeat;
}

@media (max-width: 448px) {
    a.sr-buy-button {
        right: max(16px, env(safe-area-inset-right, 0px));
        bottom: max(16px, env(safe-area-inset-bottom, 0px));
        height: 52px;
        padding: 0 20px 0 16px;
        font-size: 1.6rem;
    }

    body:has(.sr-chat-button:not([hidden])) a.sr-buy-button {
        right: calc(max(16px, env(safe-area-inset-right, 0px)) + 52px + 8px);
    }
}

@media (prefers-reduced-motion: reduce) {
    a.sr-buy-button {
        transition: none;
    }

    a.sr-buy-button:hover {
        transform: none;
    }
}
