.wpcsp-predictor,
.wpcsp-predictor * {
    box-sizing: border-box;
}

.wpcsp-predictor {
    --wpcsp-accent: #0067b2;
    --wpcsp-dark: #000d22;
    --wpcsp-green: #15803d;
    --wpcsp-green-bg: #edf9f1;
    --wpcsp-amber: #a16207;
    --wpcsp-amber-bg: #fff8e7;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    width: 100%;
    margin: 14px 0;
    padding: 14px 15px;
    border: 1px solid #dbe4ed;
    border-radius: 10px;
    background: linear-gradient(135deg, #ffffff 0%, #f6f9fc 100%);
    color: var(--wpcsp-dark);
    font-family: inherit;
    line-height: 1.4;
    box-shadow: 0 8px 24px rgba(0, 13, 34, .06);
}

.wpcsp-predictor.is-available {
    border-color: rgba(21, 128, 61, .22);
}

.wpcsp-predictor.is-unavailable {
    border-color: rgba(161, 98, 7, .25);
    background: linear-gradient(135deg, #fff 0%, var(--wpcsp-amber-bg) 100%);
}

.wpcsp-predictor__icon {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #eaf4fb;
    color: var(--wpcsp-accent);
}

.wpcsp-predictor.is-unavailable .wpcsp-predictor__icon {
    background: var(--wpcsp-amber-bg);
    color: var(--wpcsp-amber);
}

.wpcsp-predictor__content {
    min-width: 0;
    flex: 1 1 auto;
}

.wpcsp-predictor__status {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 2px;
    font-size: 13px;
    line-height: 1.35;
}

.wpcsp-predictor__status strong {
    color: var(--wpcsp-dark);
    font-weight: 700;
}

.wpcsp-predictor__dot {
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--wpcsp-green);
    box-shadow: 0 0 0 4px rgba(21, 128, 61, .10);
}

.wpcsp-predictor.is-unavailable .wpcsp-predictor__dot {
    background: var(--wpcsp-amber);
    box-shadow: 0 0 0 4px rgba(161, 98, 7, .10);
}

.wpcsp-predictor__dispatch {
    margin-top: 2px;
    color: var(--wpcsp-dark);
    font-size: 14px;
    font-weight: 700;
}

.wpcsp-predictor__countdown {
    margin-top: 3px;
    color: #52647a;
    font-size: 12px;
    font-weight: 500;
}

.wpcsp-predictor__delivery {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 13, 34, .08);
    font-size: 12px;
}

.wpcsp-predictor__delivery span {
    color: #6b7a8d;
}

.wpcsp-predictor__delivery strong {
    color: var(--wpcsp-dark);
    font-weight: 700;
}

.wpcsp-predictor__note {
    margin-top: 6px;
    color: #6b7a8d;
    font-size: 11px;
}

/* Product page: replace the stock block without WooCommerce stock margins. */
.single-product .wpcsp-stock-replacement,
.single-product .stock.wpcsp-predictor {
    margin: 14px 0 !important;
}

/* Compact product card version. */
.wpcsp-predictor.is-compact {
    gap: 7px;
    margin: 8px 0 10px;
    padding: 8px 9px;
    border-radius: 8px;
    box-shadow: none;
}

.wpcsp-predictor.is-compact .wpcsp-predictor__icon {
    flex-basis: 28px;
    width: 28px;
    height: 28px;
    border-radius: 7px;
}

.wpcsp-predictor.is-compact .wpcsp-predictor__icon svg {
    width: 17px;
    height: 17px;
}

.wpcsp-predictor.is-compact .wpcsp-predictor__status {
    margin: 0;
    font-size: 10px;
}

.wpcsp-predictor.is-compact .wpcsp-predictor__dispatch {
    margin-top: 1px;
    font-size: 11px;
}

.wpcsp-predictor.is-compact .wpcsp-predictor__delivery {
    margin-top: 4px;
    padding-top: 4px;
    font-size: 9px;
}

.wpcsp-predictor.is-compact .wpcsp-predictor__note {
    display: none;
}

/* Keep cards tidy inside WooCommerce grids. */
.woocommerce ul.products li.product .wpcsp-predictor {
    text-align: left;
}

.woocommerce ul.products li.product .wpcsp-predictor__status strong,
.woocommerce ul.products li.product .wpcsp-predictor__dispatch,
.woocommerce ul.products li.product .wpcsp-predictor__delivery strong {
    color: var(--wpcsp-dark);
}

/* Cart version. */
.wpcsp-predictor--cart {
    max-width: 420px;
    margin-top: 9px;
    margin-bottom: 0;
}

@media (max-width: 767px) {
    .wpcsp-predictor {
        padding: 12px;
        border-radius: 9px;
    }

    .wpcsp-predictor__icon {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
    }

    .wpcsp-predictor__dispatch {
        font-size: 13px;
    }

    .wpcsp-predictor__delivery {
        display: block;
    }

    .wpcsp-predictor__delivery span,
    .wpcsp-predictor__delivery strong {
        display: block;
    }
}
