/* AD Pro Woo Suite — Frontend Styles */

/* ================================================================
   DISCONTINUED — BADGE (catalog grid + single product image)
   Follows the same positioning pattern as WooCommerce's .onsale flash.
   ================================================================ */

/* Catalog grid badge — mirrors Blocksy's native .onsale / ct-woo-badge-* rules */
ul.products li.product .ad-pws-discontinued-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    position: var(--has-container, absolute);
    top: var(--has-container, var(--badge-top, 15px));
    inset-inline-start: var(--has-container, var(--badge-left, 15px));
    height: var(--badge-height, 28px);
    min-width: var(--badge-min-width, 55px);
    border-radius: var(--badge-radius, 0px);
    padding: var(--badge-padding, 5px 10px);
    text-align: center;
    color: var(--badge-text-color, #fff);
    background-color: #1d2327;
    font-size: 0.72em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    pointer-events: none;
}

/* Single product page: inline above the breadcrumb */
.ad-pws-discontinued-badge--page {
    display: inline-block;
    background: #1d2327;
    color: #fff;
    font-size: 0.72em;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
}

/* ── Discontinued notice (standalone, no alternative) ── */
.ad-pws-discontinued-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #f8f8f8;
    border: 1px solid #c3c4c7;
    border-left: 4px solid #1d2327;
    border-radius: 4px;
    padding: 10px 14px;
    margin: 0 0 14px;
    color: #1d2327;
    font-size: 0.9em;
    font-weight: 600;
    line-height: 1.5;
}

.ad-pws-discontinued-notice__icon {
    flex-shrink: 0;
    font-size: 1.05em;
    margin-top: 1px;
}

/* ── Alternative product notification pill ──────────── */
/* max-width, margin-bottom, background, color, border  */
/* are output dynamically via wp_head (see frontend class). */
.ad-pws-discontinued-alternative {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border-radius: 4px;
    padding: 12px 18px;
    font-size: 0.92em;
    line-height: 1.55;
}

.ad-pws-discontinued-alternative__link {
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
}

/* ── Product page notice ──────────────────────────────────── */
.ad-pws-backorder-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #fff8e6;
    border: 1px solid #f0c040;
    border-left: 4px solid #f0ad4e;
    border-radius: 4px;
    padding: 10px 14px;
    margin: 14px 0;
    color: #7a5c00;
    font-size: 0.9em;
    line-height: 1.5;
}

.ad-pws-backorder-notice .ad-pws-icon {
    flex-shrink: 0;
    font-size: 1.1em;
    margin-top: 1px;
}

/* ── Catalog badge ────────────────────────────────────────── */
.ad-pws-catalog-badge {
    display: inline-block;
    background: #f0ad4e;
    color: #fff;
    font-size: 0.72em;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.6;
}

/* ── Mini cart lead time span ─────────────────────────────── */
.ad-pws-mini-cart-lead-time {
    display: block;
    font-size: 0.8em;
    color: #646970;
    font-weight: 400;
    margin-top: 2px;
}

/* ── Cart / checkout preorder row ────────────────────────── */
.woocommerce-cart .wc-item-meta .wc-item-meta-label,
.woocommerce-checkout .wc-item-meta .wc-item-meta-label {
    font-weight: 600;
}

/* ── Cart / checkout backorder notice banner ─────────────── */
.ad-pws-cart-backorder-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fff8e6;
    border: 1px solid #f0c040;
    border-left: 4px solid #f0ad4e;
    border-radius: 4px;
    padding: 12px 16px;
    margin: 0 0 20px;
    color: #7a5c00;
    font-size: 0.9em;
    line-height: 1.6;
}

.ad-pws-cart-backorder-notice .ad-pws-icon {
    flex-shrink: 0;
    font-size: 1.15em;
    margin-top: 1px;
}

.ad-pws-cart-backorder-body {
    flex: 1;
}

.ad-pws-cart-backorder-list {
    margin: 6px 0 0 16px;
    padding: 0;
    list-style: disc;
}

.ad-pws-cart-backorder-list li {
    margin: 2px 0;
}

