/* MRPSN coming-soon and scheduled-sale countdowns. */

.mrpsn-countdown {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    max-width: 100%;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.mrpsn-countdown b,
.mrpsn-countdown i,
.mrpsn-countdown small {
    font: inherit;
    color: inherit;
}

.mrpsn-countdown i {
    font-style: normal;
    opacity: .5;
}

.mrpsn-countdown__unit,
.mrpsn-countdown__time {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
}

.mrpsn-countdown__unit small {
    font-size: .78em;
    opacity: .72;
}

.mrpsn-countdown.is-expired {
    visibility: hidden;
}

/* Shared MRPSN product cards reserve this small line on every card, so a
   scheduled-sale timer never makes sale cards taller than their neighbours. */
.product-card-pro .mrpsn-product-card-commerce {
    display: grid;
    gap: 6px;
    margin-top: auto;
}

.product-card-pro .mrpsn-product-card-commerce .product-price-button {
    margin-top: 0;
}

.product-card-pro .mrpsn-product-card-timer-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 20px;
    overflow: hidden;
}

.mrpsn-countdown--sale-card {
    color: rgb(var(--mrpsn-sale-rgb, 239, 68, 68));
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1;
}

.mrpsn-countdown--sale-card .mrpsn-countdown__lead {
    color: var(--mrpsn-muted, #667085);
    font-weight: 600;
}

/* Coming-soon uses electric violet: clearly distinct from MRPSN blue and
   sale orange/red, while remaining readable and consistent across widgets. */
.mrpsn-coming-soon-price,
.mrpsn-coming-soon-badge,
.mrpsn-coming-soon-native {
    --mrpsn-coming-soon: #8b5cf6;
    --mrpsn-coming-soon-dark: #7c3aed;
    --mrpsn-coming-soon-soft: #f3e8ff;
}

.mrpsn-countdown--coming-card,
.mrpsn-coming-soon-price__label {
    color: #fff;
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1;
}

.product-card-pro .product-price-button.mrpsn-coming-soon-price,
.elementor-widget .product-card-pro .product-price-button.mrpsn-coming-soon-price,
.elementor .product-card-pro .product-price-button.mrpsn-coming-soon-price,
.product-card-pro .product-price-button.mrpsn-coming-soon-price:hover,
.product-card-pro .product-price-button.mrpsn-coming-soon-price:focus {
    background: var(--mrpsn-coming-soon, #8b5cf6) !important;
    background-color: var(--mrpsn-coming-soon, #8b5cf6) !important;
    background-image: none !important;
    border-color: var(--mrpsn-coming-soon, #8b5cf6) !important;
    color: #fff !important;
    filter: none !important;
    cursor: default;
    pointer-events: none;
}

.product-card-pro .product-price-button.mrpsn-coming-soon-price *,
.elementor-widget .product-card-pro .product-price-button.mrpsn-coming-soon-price * {
    color: #fff !important;
}

.product-card-pro .mrpsn-coming-soon-badge,
.woocommerce ul.products li.product .mrpsn-coming-soon-badge {
    --mrpsn-coming-soon: #8b5cf6;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 24;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 7px 13px;
    border-radius: 8px;
    background: var(--mrpsn-coming-soon, #8b5cf6) !important;
    color: #fff !important;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    box-shadow: none;
}

.product-card-pro.is-coming-soon::before {
    content: none !important;
}

.mrpsn-coming-soon-native {
    display: grid;
    gap: 9px;
    width: 100%;
}

.mrpsn-coming-soon-native__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--mrpsn-coming-soon, #8b5cf6);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.mrpsn-coming-soon-native--undated .mrpsn-coming-soon-native__label {
    min-width: 120px;
}

.mrpsn-countdown--single {
    justify-content: flex-start;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid rgba(139, 92, 246, .22);
    border-radius: var(--mrpsn-radius-sm, 12px);
    background: var(--mrpsn-coming-soon-soft, #f3e8ff);
    color: var(--mrpsn-coming-soon-dark, #7c3aed);
    font-size: 14px;
    font-weight: 750;
}

.mrpsn-countdown--undated {
    white-space: normal;
    text-align: center;
    line-height: 1.6;
}

.mrpsn-native-sale-timer {
    min-height: 20px;
    margin: 4px 0;
    text-align: center;
}

.mrpsn-coming-soon-view {
    text-align: center;
}

@media (max-width: 576px) {
    .product-card-pro .mrpsn-product-card-timer-slot {
        height: 18px;
    }

    .mrpsn-countdown--sale-card {
        gap: 4px;
        font-size: 9.5px;
    }

    .mrpsn-countdown--sale-card .mrpsn-countdown__lead {
        display: none;
    }

    .product-card-pro .mrpsn-coming-soon-badge {
        top: 8px;
        right: 8px;
        min-height: 28px;
        padding: 6px 10px;
        border-radius: 6px;
        font-size: 10px;
    }

    .mrpsn-countdown--coming-card,
    .mrpsn-coming-soon-price__label {
        font-size: 10.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mrpsn-countdown {
        scroll-behavior: auto;
    }
}
