/* ExhaustHub stock availability badges — see ../stock-status.php.
   Loaded on WooCommerce pages and, via exhausthub_shop_do_enqueue(), on the
   custom shop grid, so the pill looks identical on both. */

.exhub-stock-wrap {
    margin: 0 0 16px;
}

.exhub-stock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: middle;
}

.exhub-stock__dot {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

/* A soft halo behind the dot reads as a status light rather than a bullet. */
.exhub-stock--in .exhub-stock__dot {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
}
.exhub-stock--low .exhub-stock__dot {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22);
}
.exhub-stock--backorder .exhub-stock__dot {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}
.exhub-stock--out .exhub-stock__dot {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.exhub-stock--in {
    color: #047857;
    background: #ecfdf5;
    border-color: #a7f3d0;
}
.exhub-stock--low {
    color: #b45309;
    background: #fffbeb;
    border-color: #fde68a;
}
.exhub-stock--backorder {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #bfdbfe;
}
.exhub-stock--out {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}

/* --- SINGLE PRODUCT PAGE --- */
.exhub-stock-wrap--single .exhub-stock {
    font-size: 13px;
    padding: 9px 18px;
}
.exhub-stock-wrap--single .exhub-stock__dot {
    width: 9px;
    height: 9px;
}

.exhub-stock-notice {
    max-width: 46em;
    margin: 12px 0 0;
    font-size: 14px;
    line-height: 1.55;
    color: #4b5563;
    text-transform: none;
    letter-spacing: 0;
}
.exhub-stock-notice a {
    color: #9b51e0;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.exhub-stock-notice a:hover,
.exhub-stock-notice a:focus {
    color: #7b3cb8;
}

/* The variation form's own availability slot already sits in a tight column,
   so don't double up on the wrapper's bottom margin. */
.woocommerce-variation-availability .exhub-stock-wrap {
    margin-bottom: 8px;
}

/* WooCommerce's unstyled "Out of stock" / "currently out of stock and
   unavailable" paragraphs — the styled badge above the form replaces them. */
.elementor-widget-woocommerce-product-add-to-cart p.stock,
.woocommerce div.product form.cart > p.stock {
    display: none;
}

/* --- WOOCOMMERCE PRODUCT LOOPS (related products, archives) --- */
.exhub-stock-wrap--loop {
    margin: 4px 0 10px;
}
.exhub-stock-wrap--loop .exhub-stock {
    font-size: 11px;
    padding: 4px 11px;
    gap: 6px;
}
.exhub-stock-wrap--loop .exhub-stock__dot {
    width: 6px;
    height: 6px;
}

/* --- CUSTOM SHOP GRID (.exshop-* cards) --- */
/* Sits inline with the price in .exshop-card-pricerow — no vertical margin. */
.exshop-card .exhub-stock-wrap {
    margin: 0;
}
.exshop-card .exhub-stock {
    font-size: 11px;
    padding: 4px 11px;
    gap: 6px;
    letter-spacing: 0.05em;
}
.exshop-card .exhub-stock__dot {
    width: 6px;
    height: 6px;
}
/* Sold-out cards stay browsable but visibly step back from the rest. */
.exshop-card.exshop-card--out .exshop-card-image {
    opacity: 0.65;
    filter: grayscale(0.4);
}

@media (max-width: 768px) {
    .exhub-stock-wrap--single .exhub-stock {
        font-size: 12px;
        padding: 8px 15px;
    }
    .exhub-stock-notice {
        font-size: 13px;
    }
}
