/* NOTE: STICKY CTA BAR (inc/new/sections/sticky-cta.php, javascript/new/sticky-cta.js) */

.kmd-sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 15;
    border-top: 1px solid var(--kmd-line-strong);
    background: var(--kmd-white);
    box-shadow: 0 -6px 18px rgba(0, 0, 0, .08);
    transform: translateY(110%);
    transition: transform .25s ease;
}

.kmd-sticky-cta.is-visible {
    transform: none;
}

/* keeps the end of the page reachable while the bar is shown; the bar's real height is measured by
   javascript/new/sticky-cta.js, so no gap is left under the footer */
body.has-kmd-sticky-cta {
    padding-bottom: var(--kmd-sticky-cta-height, 72px);
}

.kmd-sticky-cta__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding-block: 10px;
}

.kmd-sticky-cta__name {
    font-size: 15px;
    font-weight: 800;
}

.kmd-sticky-cta__details {
    color: var(--kmd-muted);
    font-size: 13px;
}

.kmd-sticky-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media screen and (max-width: 599px) {
    /* the details line sits above the two buttons */
    .kmd-sticky-cta__inner {
        gap: 6px;
        padding-block: 8px;
    }

    .kmd-sticky-cta__info {
        width: 100%;
        text-align: center;
    }

    .kmd-sticky-cta__name {
        display: none;
    }

    .kmd-sticky-cta__details {
        overflow: hidden;
        color: var(--kmd-text);
        font-weight: 600;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .kmd-sticky-cta__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }
}

/* very small phones: both button labels stay on one line */
@media screen and (max-width: 359px) {
    .kmd-sticky-cta__actions .kmd-btn {
        padding-inline: 8px;
        font-size: 13px;
        white-space: nowrap;
    }
}
