/* Sticky CTA composition.
 *
 * Sticky-CTA buttons live in the header's nav region and stay visible
 * on scroll because the header itself is sticky in the existing
 * layout. Color is driven by the brand's --color-primary custom
 * property (consumed via var()) so the button always matches the
 * provider's primary palette; no hard-coded color fallback that would
 * mask a missing palette.
 *
 * Composite variants (single / retail_cart_signin / saas_demo) reuse
 * the same .sticky-cta-button base — only the layout of the children
 * varies per composite. New composites can extend by adding a
 * modifier class without changing the base.
 */

[data-component="sticky-cta-region"] {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm, 0.75rem);
}

.sticky-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs, 0.5rem);
}

.sticky-cta-button {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs, 0.5rem);
    padding: 0.5rem 1rem;
    border-radius: var(--corner-default, 8px);
    text-decoration: none;
    font-weight: 600;
    line-height: 1;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform var(--anim-fast, 120ms) ease,
                box-shadow var(--anim-fast, 120ms) ease,
                background var(--anim-fast, 120ms) ease;
}

.sticky-cta-button:hover,
.sticky-cta-button:focus-visible {
    transform: translateY(calc(-1px * var(--motion-multiplier, 1)));
    box-shadow: var(--elevation-md, 0 4px 12px rgba(0, 0, 0, 0.12));
}

/* Primary composite — brand-color background. */
.sticky-cta-button--primary,
.sticky-cta-button--demo {
    background: var(--color-primary);
    color: var(--header-bg, #ffffff);
}

/* Cart icon-led affordance for the retail composite. The icon's color
 * is driven by currentColor so a future palette change does not
 * require touching the SVG markup.
 */
.sticky-cta-button--cart {
    background: var(--color-primary);
    color: var(--header-bg, #ffffff);
}

.sticky-cta-icon--cart svg {
    width: 20px;
    height: 20px;
}

.sticky-cta-button--cart .sticky-cta-label {
    /* Brand prefers the cart icon as the primary affordance on a
     * crowded retail header; keep the label available to assistive
     * tech but visually compact.
     */
    font-size: 0.875rem;
}

.sticky-cta-button--signin {
    background: transparent;
    color: var(--header-text, inherit);
    border-color: var(--color-primary);
}

.sticky-cta-button--signin:hover,
.sticky-cta-button--signin:focus-visible {
    background: var(--color-primary);
    color: var(--header-bg, #ffffff);
}

/* Hide sticky-CTA in the desktop header when the viewport collapses to
 * mobile — the layered mobile shell carries its own CTA surface so
 * the header doesn't double up.
 */
@media (max-width: 1023px) {
    [data-component="sticky-cta-region"] {
        display: none;
    }
}
