/* =========================================================
   CTA BUTTON
   One component; only physical scale changes in COMPACT.
   ========================================================= */

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: var(--cta-height);
    padding-inline: var(--cta-padding-x);

    box-sizing: border-box;

    border: 0;
    background: var(--primary-color);
    /*background-color: #212C2D;*/
    color: #fff;

    font-family: var(--secondary-font);
    font-size: 16px;
    font-weight: var(--weight-medium);
    line-height: 1;
    text-align: center;
    text-decoration: none;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.cta-button:link,
.cta-button:visited {
    color: #fff;
}

.cta-button:hover {
    opacity: 0.72;
}

.cta-button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 5px;
}

.cta-button:active {
    transform: translateY(1px);
}

/* =========================================================
   DESKTOP HOVER MOTION
   Only runs on devices with a real hover-capable pointer.

   If a CTA contains at least two child elements (label + icon/emoji),
   both move slightly apart on hover. No margin or component-specific
   gap is overwritten, so existing spacing remains intact.
   ========================================================= */

@media (hover: hover) and (pointer: fine) {

    .cta-button:has(> :nth-child(2)) > :first-child,
    .cta-button:has(> :nth-child(2)) > :last-child {
        transition: transform 0.2s ease;
    }

    .cta-button:has(> :nth-child(2)):hover > :first-child {
        transform: translateX(-2px);
    }

    .cta-button:has(> :nth-child(2)):hover > :last-child {
        transform: translateX(2px);
    }
}


/* Respect reduced-motion preferences. */

@media (prefers-reduced-motion: reduce) {

    .cta-button,
    .cta-button > * {
        transition: none;
    }

    .cta-button:active,
    .cta-button:hover > * {
        transform: none;
    }
}

