/* Binoise — product live test availability */

.sp-purchase-notes.sp-purchase-notes--live-stock {
    display: block;
    padding-top: 20px;
}

.sp-live-stock-card {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 18px;
    border: 1px solid rgba(250, 121, 33, .22);
    border-radius: 18px;
    background:
            radial-gradient(circle at 100% 0, rgba(250, 121, 33, .10), transparent 38%),
            linear-gradient(180deg, #ffffff 0%, #fffaf6 100%);
    box-shadow: 0 8px 26px rgba(35, 37, 78, .035);
}

.sp-live-stock-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 20px;
    left: 20px;
    height: 3px;
    border-radius: 0 0 10px 10px;
    background: linear-gradient(90deg, transparent, #fa7921 35%, #ff9a55 65%, transparent);
    opacity: .95;
}

.sp-live-stock-card::after {
    content: "";
    position: absolute;
    top: -46px;
    left: -46px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(250, 121, 33, .045);
    pointer-events: none;
}

.sp-live-stock-head {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.sp-live-stock-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fa7921;
    background: #fff4ec;
    border: 1px solid #ffd8bd;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8);
}

.sp-live-stock-icon svg {
    width: 23px;
    height: 23px;
}

.sp-live-stock-title-wrap {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sp-live-stock-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: max-content;
    color: #e9640d;
    font-size: 11px;
    line-height: 1.6;
    font-weight: 900;
}

.sp-live-stock-eyebrow i,
.sp-live-stock-branch > i {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #18a36a;
    box-shadow: 0 0 0 4px rgba(24, 163, 106, .10);
}

.sp-live-stock-title-wrap strong {
    color: #2f3148;
    font-size: 15px;
    line-height: 1.8;
    font-weight: 900;
}

.sp-live-stock-state {
    min-height: 31px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #fff3ea;
    color: #e7650e;
    border: 1px solid #ffd8bd;
    font-size: 11px;
    line-height: 1;
    font-weight: 900;
    white-space: nowrap;
}

.sp-live-stock-message {
    position: relative;
    z-index: 1;
    margin: 15px 0 0;
    padding: 14px 15px;
    border: 1px solid rgba(250, 121, 33, .10);
    border-radius: 13px;
    background: rgba(255, 255, 255, .78);
    color: #4a4d65;
    font-size: 12.5px;
    font-weight: 750;
    line-height: 2;
}

.sp-live-stock-message strong,
.sp-live-stock-message b {
    color: #30324a;
    font-weight: 900;
}

.sp-live-stock-branches {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 12px;
}

.sp-live-stock-branch {
    min-width: 136px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #ebe1da;
    border-radius: 12px;
    background: #fff;
    display: grid;
    grid-template-columns: 7px auto;
    column-gap: 8px;
    align-items: center;
    color: #383b53;
    font-size: 11.5px;
    line-height: 1.55;
    font-weight: 900;
    box-shadow: 0 5px 14px rgba(35, 37, 78, .025);
}

.sp-live-stock-branch > i {
    grid-row: 1 / span 2;
    width: 7px;
    height: 7px;
    box-shadow: 0 0 0 3px rgba(24, 163, 106, .08);
}

.sp-live-stock-branch small {
    display: block;
    margin-top: 2px;
    color: #8c9099;
    font-size: 9.5px;
    line-height: 1.5;
    font-weight: 700;
}

.sp-live-stock-foot {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #eadfd7;
    color: #8a8e96;
}

.sp-live-stock-foot > span {
    display: inline-flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    color: #fa7921;
}

.sp-live-stock-foot svg {
    width: 17px;
    height: 17px;
}

.sp-live-stock-foot p {
    margin: 0;
    color: #878b94;
    font-size: 10px;
    line-height: 1.9;
    font-weight: 600;
}

@media (max-width: 767px) {

    .sp-live-stock-card {
        padding: 15px;
        border-radius: 15px;
    }

    .sp-live-stock-head {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 10px;
    }

    .sp-live-stock-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .sp-live-stock-icon svg {
        width: 20px;
        height: 20px;
    }

    .sp-live-stock-title-wrap strong {
        font-size: 13.5px;
    }

    .sp-live-stock-eyebrow {
        font-size: 10px;
    }

    .sp-live-stock-state {
        grid-column: 1 / -1;
        width: max-content;
        margin-right: 50px;
        min-height: 28px;
        font-size: 10px;
    }

    .sp-live-stock-message {
        padding: 11px 12px;
        font-size: 11px;
        line-height: 1.9;
    }

    .sp-live-stock-branches {
        gap: 7px;
    }

    .sp-live-stock-branch {
        min-width: calc(50% - 4px);
        padding: 7px 9px;
        font-size: 10.5px;
    }

    .sp-live-stock-branch small {
        font-size: 8.5px;
    }

    .sp-live-stock-foot p {
        font-size: 9px;
    }
}

/* V10 — keep legacy purchase notes hidden on mobile, but show live-stock card */
@media (max-width: 767px) {
    .sp-purchase-notes.sp-purchase-notes--live-stock {
        display: block !important;
        width: 100% !important;
        padding-top: 0px !important;
    }

    .sp-purchase-notes.sp-purchase-notes--live-stock .sp-live-stock-card {
        display: block !important;
        width: 100% !important;
    }
}

/* V11 — neutralize any cached legacy sticky add-to-cart class. */
body.single-product .sp-buy-card .woocommerce-variation-add-to-cart.stickyAddtocart,
body.single-product .sp-buy-card .simpleAddtocart.stickyAddtocart {
    position: static !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    z-index: auto !important;
    width: 100% !important;
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}


/* V2 — live stock status should read like a label, not a button */
.sp-live-stock-state {
    min-height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #fa7921;
    font-size: 12px;
    line-height: 1.8;
    font-weight: 900;
    white-space: normal;
    text-align: left;
}

@media (max-width: 767px) {
    .sp-live-stock-state {
        margin-right: 50px;
        width: auto;
        font-size: 11px;
    }
}
