.btn {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    padding: 1rem 2rem;
    border-radius: 999px;
    text-align: center;
    text-decoration: none;
    display: inherit;
    align-items: center;
    gap: .5rem;
    transition: all .2s;

    &.btn--ghost {
        color: #fff;
        border: 1px solid #fff;
        background: transparent;

        &:hover {
            transform: translateY(-2px);
            background: #fff;
            color: #0072ce;
            box-shadow: 0 10px 24px rgb(0 114 206 / 0.16);
        }
    }
}

/* Button-Elemente (z. B. in .mvp-hero__actions) wie Links stylen */
button.btn {
    appearance: none;
    border: none;
    cursor: pointer;
}

/* Beide Primary-Klassen teilen Layout und Zustände; keine Komponenten-Duplikate. */
.btn.btn--primary,
.m5-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    box-sizing: border-box;
    width: max-content;
    max-width: 100%;
    min-height: 44px;
    padding: 1rem 2rem;
    appearance: none;
    border: 0;
    border-radius: 999px;
    background: #FFD500;
    color: #243C4B;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    /* Sofortiges Tap-Feedback statt Browser-Highlight oder Textauswahl. */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    transition: background-color .16s ease-out, box-shadow .16s ease-out,
                transform .16s ease-out;
}

.btn.btn--primary:visited,
.m5-btn-primary:visited {
    color: #243C4B;
}

/* Kein hängenbleibender Hover auf Touch-Geräten. */
@media (hover: hover) and (pointer: fine) {
    .btn.btn--primary:hover:where(:not(:disabled, .disabled, [aria-disabled="true"])),
    .m5-btn-primary:hover:where(:not(:disabled, .disabled, [aria-disabled="true"])) {
        background: #F2CA00;
        color: #243C4B;
        transform: translateY(-2px);
        box-shadow: 0 10px 24px rgb(255 213 0 / .4);
    }
}

.btn.btn--primary:active:where(:not(:disabled, .disabled, [aria-disabled="true"])),
.m5-btn-primary:active:where(:not(:disabled, .disabled, [aria-disabled="true"])) {
    background: #E6BF00;
    color: #243C4B;
    transform: translateY(0);
    box-shadow: none;
}

/* Kontrastring bleibt auf hellen und dunklen Flächen erkennbar. */
.btn.btn--primary:focus-visible,
.m5-btn-primary:focus-visible {
    outline: 3px solid #243C4B;
    outline-offset: 3px;
    box-shadow: 0 0 0 3px #fff;
}

.btn.btn--primary:is(:disabled, .disabled, [aria-disabled="true"]),
.m5-btn-primary:is(:disabled, .disabled, [aria-disabled="true"]) {
    background: #FFD500;
    color: #243C4B;
    opacity: .55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
    .btn.btn--primary,
    .m5-btn-primary {
        transition: none;
        transform: none !important;
    }
}

/* Dunkelblaue Ghost-Variante für helle Hintergründe. */
.btn.btn--ghost.ci-darkblue {
    color: #243C4B;
    border: 2px solid #243C4B;
    background: transparent;
}

.btn.btn--ghost.ci-darkblue:hover {
    color: #fff;
    background: #243C4B;
    box-shadow: 0 10px 24px rgb(36 60 75 / 0.16);
}

.btn.btn--ghost.ci-darkblue:focus-visible {
    outline: 3px solid #243C4B;
    outline-offset: 3px;
}

.btn.btn--ghost.ci-darkblue:active {
    color: #fff;
    background: #243C4B;
    transform: translateY(0);
    box-shadow: none;
}

/* CI-Plan-Blau: gefüllte Secondary-Variante, unabhängig von Ghost-Buttons. */
.btn.btn--secondary.ci-plan-blue {
    display: inline-flex;
    justify-content: center;
    max-width: 100%;
    min-height: 44px;
    background: var(--plan-blau, #0072CE);
    border: 1px solid var(--plan-blau, #0072CE);
    color: #fff;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    transition: background-color .16s ease-out, border-color .16s ease-out,
                box-shadow .16s ease-out, transform .16s ease-out;
}

.btn.btn--secondary.ci-plan-blue:visited {
    color: #fff;
}

.btn.btn--secondary.ci-plan-blue ion-icon {
    flex-shrink: 0;
    font-size: 1.25em;
    color: currentColor;
    pointer-events: none;
}

/* Hover nur für präzise Zeigegeräte: kein hängenbleibender Touch-Hover. */
@media (hover: hover) and (pointer: fine) {
    .btn.btn--secondary.ci-plan-blue:hover:not(:disabled):not(.disabled):not([aria-disabled="true"]) {
        background: #005BA8;
        border-color: #005BA8;
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgb(0 114 206 / .22);
    }
}

.btn.btn--secondary.ci-plan-blue:focus-visible {
    outline: 3px solid #243C4B;
    outline-offset: 3px;
    box-shadow: 0 0 0 3px #fff;
}

.btn.btn--secondary.ci-plan-blue:active:not(:disabled):not(.disabled):not([aria-disabled="true"]) {
    background: #004B87;
    border-color: #004B87;
    color: #fff;
    transform: translateY(0);
    box-shadow: none;
}

.btn.btn--secondary.ci-plan-blue:is(:disabled, .disabled, [aria-disabled="true"]) {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
    .btn.btn--secondary.ci-plan-blue {
        transition: none;
        transform: none !important;
    }
}
