/* ============================================================================
   NV Conversion Booster — Frontend Styles
   Version: 1.1.1
   ============================================================================ */

/* ── Countdown Bar ───────────────────────────────────────────────────────── */

.nvcb-countdown-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #f0fdf9;
    border: 1px solid #99f6e4;
    border-radius: 6px;
    font-size: 14px;
    color: #0f766e;
    font-weight: 500;
    margin: 0 0 10px;
}

.nvcb-countdown-bar.nvcb-urgent {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #b91c1c;
}

.nvcb-countdown-bar__label {
    flex: 1;
}

.nvcb-countdown-timer {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.02em;
    min-width: 42px;
    text-align: right;
}

/* ── Viewer Count ────────────────────────────────────────────────────────── */

.nvcb-viewer-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #374151;
    margin: 0 0 10px;
    transition: opacity 0.3s ease;
}

.nvcb-viewer-icon {
    font-size: 15px;
}

.nvcb-viewer-number {
    font-weight: 700;
    color: #0f766e;
}

.nvcb-viewer-label {
    color: #6b7280;
}

/* ── Review Stars ────────────────────────────────────────────────────────── */

.nvcb-review-stars {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 10px;
    font-size: 13px;
    color: #6b7280;
}

.nvcb-stars-display {
    position: relative;
    display: inline-block;
    font-size: 18px;
    line-height: 1;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.nvcb-stars-empty {
    color: #d1d5db;
}

.nvcb-stars-filled {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    white-space: nowrap;
    color: #f59e0b;
}

.nvcb-review-rating {
    font-weight: 700;
    color: #111827;
    font-size: 14px;
}

.nvcb-review-count {
    color: #6b7280;
    font-size: 12px;
}

/* ── Urgency Copy ────────────────────────────────────────────────────────── */

.nvcb-urgency-copy {
    font-size: 13px;
    color: #0f766e;
    font-weight: 500;
    margin: 0 0 12px;
    padding: 6px 10px;
    background: #f0fdf9;
    border-left: 3px solid #0f766e;
    border-radius: 0 4px 4px 0;
}

/* ── Sticky Add-to-Cart Bar ──────────────────────────────────────────────── */

#nvcb-sticky-atc {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.10);
    padding: 10px 16px;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    will-change: transform;
}

/* Keep element in DOM so CSS transition can fire, but hide it visually */
#nvcb-sticky-atc[hidden] {
    display: block !important;
    visibility: hidden;
    pointer-events: none;
}

#nvcb-sticky-atc.is-visible {
    transform: translateY(0);
    visibility: visible;
    pointer-events: all;
}

.nvcb-sticky-atc__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
}

.nvcb-sticky-atc__img {
    width: 40px;
    height: 54px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background: #f3f4f6;
}

.nvcb-sticky-atc__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nvcb-sticky-atc__name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.nvcb-sticky-atc__savings {
    font-size: 12px;
    color: #0f766e;
    font-weight: 500;
    display: block;
}

/* WooCommerce wraps prices in <ins> inside wc_price() output */
.nvcb-sticky-atc__savings ins,
.nvcb-sticky-atc__price ins {
    text-decoration: none;
}

.nvcb-sticky-atc__price {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    flex-shrink: 0;
    white-space: nowrap;
}

.nvcb-sticky-atc__btn {
    flex-shrink: 0;
    background: #0f766e;
    color: #ffffff !important;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
    line-height: 1.4;
}

.nvcb-sticky-atc__btn:hover {
    background: #0d6b64;
    color: #ffffff !important;
}

.nvcb-sticky-atc__btn:active {
    transform: scale(0.97);
}

.nvcb-sticky-atc__btn.is-loading {
    opacity: 0.7;
    cursor: wait;
}

.nvcb-sticky-atc__btn.is-added {
    background: #059669;
}

/* Variable product: neutral button since we scroll-to instead of direct ATC */
.nvcb-sticky-atc--variable .nvcb-sticky-atc__btn {
    background: #374151;
}

.nvcb-sticky-atc--variable .nvcb-sticky-atc__btn:hover {
    background: #1f2937;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
    .nvcb-sticky-atc__img {
        display: none;
    }

    .nvcb-sticky-atc__price {
        display: none;
    }

    .nvcb-sticky-atc__btn {
        padding: 10px 14px;
        font-size: 13px;
    }

    .nvcb-review-count {
        display: none;
    }

    .nvcb-countdown-bar {
        font-size: 13px;
        padding: 7px 12px;
    }
}
