/**
 * Sticky purchase bar on a single course page.
 * Markup: tutor/single/course/sticky-purchase-bar.php. Loaded only on course pages.
 */

.course-sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 990;
    background: #fff;
    box-shadow: 0 -8px 24px rgba(15, 34, 57, 0.12);
    transform: translateY(110%);
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0.25s ease;
    padding-bottom: env(safe-area-inset-bottom);
}
.course-sticky-cta.is-visible {
    transform: translateY(0);
    visibility: visible;
}
.course-sticky-cta__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 12px 24px;
}
.course-sticky-cta__thumb {
    width: 72px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    flex: 0 0 auto;
}
.course-sticky-cta__info {
    flex: 1 1 auto;
    min-width: 0;
}
.course-sticky-cta__title {
    margin: 0 0 2px;
    font-family: var(--title-font);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--title-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.course-sticky-cta .course-price {
    display: block;
    margin: 0;
    font-family: var(--title-font);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--title-color);
}
.course-sticky-cta .course-price .sale-price {
    font-size: 14px;
    font-weight: 500;
    text-decoration: line-through;
    opacity: 0.55;
    margin-right: 4px;
}
.course-sticky-cta .course-price .tag {
    display: inline-block;
    background-color: var(--theme-color2);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--white-color);
    border-radius: 99px;
    padding: 2px 10px;
    vertical-align: middle;
    margin-left: 4px;
}
.course-sticky-cta__action {
    flex: 0 0 auto;
}
.course-sticky-cta__action form,
.course-sticky-cta__action .tutor-enrol-course-form {
    margin: 0;
}
.course-sticky-cta__action .th-btn {
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    white-space: nowrap;
    padding: 16px 22px;
}
body.course-sticky-cta-visible {
    padding-bottom: var(--course-sticky-cta-height, 80px);
}
body.course-sticky-cta-visible .scroll-top {
    bottom: calc(var(--course-sticky-cta-height, 80px) + 16px);
}

@media (max-width: 767px) {
    .course-sticky-cta__inner {
        gap: 10px;
        padding: 10px 14px;
    }
    .course-sticky-cta__thumb {
        width: 56px;
        height: 40px;
    }
    .course-sticky-cta__title {
        font-size: 14px;
    }
    .course-sticky-cta .course-price {
        font-size: 15px;
    }
    .course-sticky-cta__action .th-btn {
        padding: 12px 14px;
        font-size: 12px;
    }
}

@media print {
    .course-sticky-cta {
        display: none !important;
    }
}
