/* ──────────────────────────────────────────────
   Mobile sticky "Iscriviti" bar + bottom drawer
   Only visible on mobile (≤ 767 px)
   ────────────────────────────────────────────── */

/* ── Sticky bar ──────────────────────────────── */
#hhp-sticky-bar {
    display: none;
}

@media (max-width: 767px) {
    #hhp-sticky-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9998;
        padding: 12px 16px;
        background: #fff;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.12);
        align-items: center;
        justify-content: center;
    }

    #hhp-sticky-iscriviti {
        width: 100%;
        max-width: 480px;
        padding: 14px 24px;
        background: #457992;
        color: #fff;
        font-size: 16px;
        font-weight: 700;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        transition: background 0.2s;
    }

    #hhp-sticky-iscriviti:hover,
    #hhp-sticky-iscriviti:focus {
        background: #356378;
        outline: none;
    }

    /* ── Backdrop ──────────────────────────── */
    #hhp-drawer-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 9999;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        transition: opacity 0.25s;
    }

    #hhp-drawer-backdrop.hhp-open {
        display: block;
        opacity: 1;
    }

    /* ── Bottom drawer ─────────────────────── */
    #hhp-product-drawer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 10000;
        background: #fff;
        border-radius: 16px 16px 0 0;
        padding: 0 0 env(safe-area-inset-bottom, 16px);
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.32, 0, 0.15, 1);
        max-height: 90vh;
        overflow-y: auto;
    }

    #hhp-product-drawer.hhp-open {
        transform: translateY(0);
    }

    /* handle bar at top */
    .hhp-drawer-handle {
        width: 40px;
        height: 4px;
        background: #ddd;
        border-radius: 2px;
        margin: 12px auto 8px;
    }

    .hhp-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 20px 12px;
        border-bottom: 1px solid #f0f0f0;
    }

    .hhp-drawer-title {
        font-size: 17px;
        font-weight: 700;
        color: #1a1a1a;
        line-height: 1.3;
    }

    .hhp-drawer-close {
        background: none;
        border: none;
        font-size: 22px;
        line-height: 1;
        color: #888;
        cursor: pointer;
        padding: 4px 4px;
    }

    .hhp-drawer-close:hover {
        color: #333;
    }

    .hhp-drawer-body {
        padding: 20px;
    }

    /* ── Course list (radio items) ───────── */
    .hhp-course-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 16px;
    }

    .hhp-course-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 14px;
        border: 1.5px solid #e0e0e0;
        border-radius: 8px;
        cursor: pointer;
        transition: border-color 0.15s, background 0.15s;
        margin: 0;
    }

    .hhp-course-item:has(.hhp-course-radio:checked) {
        border-color: #457992;
        background: #f0f6f9;
    }

    .hhp-course-radio {
        display: none;
    }

    .hhp-course-item-name {
        flex: 1;
        font-size: 14px;
        font-weight: 500;
        color: #1a1a1a;
        line-height: 1.4;
    }

    .hhp-course-item-price {
        font-size: 15px;
        font-weight: 700;
        color: #457992;
        white-space: nowrap;
    }

    .hhp-course-item-price ins {
        text-decoration: none;
    }

    .hhp-course-item-price del {
        font-size: 12px;
        color: #999;
        margin-right: 4px;
    }

    /* ── CTA button ────────────────────────── */
    #hhp-drawer-cta {
        display: block;
        width: 100%;
        padding: 15px 24px;
        background: #000;
        color: #fff;
        font-size: 16px;
        font-weight: 700;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        transition: background 0.2s, opacity 0.2s;
    }

    #hhp-drawer-cta:disabled {
        background: #b0b0b0;
        cursor: not-allowed;
        opacity: 0.7;
    }

    #hhp-drawer-cta:not(:disabled):hover,
    #hhp-drawer-cta:not(:disabled):focus {
        background: #333;
        outline: none;
    }

    /* body scroll lock while drawer is open */
    body.hhp-drawer-open {
        overflow: hidden;
    }
}
