/**
 * Woo Easy Life — styles WooCommerce built-in notice banners only.
 *
 * WC Blocks structure:
 * .wc-block-components-notice-banner.is-error
 *   > svg (icon)
 *   > .wc-block-components-notice-banner__content
 *       > .wel-notice__body (our content)
 */

.woocommerce-notices-wrapper {
    margin-bottom: 16px;
}

/* ── WooCommerce Blocks notice (primary on modern checkout) ── */
.wc-block-components-notice-banner.is-error {
    align-items: flex-start !important;
    margin: 0 0 16px !important;
    padding: 16px !important;
    border: 1px solid #cc1818 !important;
    border-radius: 4px !important;
    background-color: #fff0f0 !important;
    color: #2f2f2f !important;
    font-size: 0.875em !important;
    line-height: 1.5 !important;
    gap: 12px !important;
}

.wc-block-components-notice-banner.is-error > svg {
    flex-shrink: 0 !important;
    width: 24px !important;
    height: 24px !important;
    margin-top: 1px !important;
    padding: 2px !important;
    border-radius: 50% !important;
    fill: #fff !important;
    background-color: #cc1818 !important;
}

.wc-block-components-notice-banner.is-error > .wc-block-components-notice-banner__content {
    padding: 0 !important;
    flex: 1 !important;
    min-width: 0 !important;
}

/* Our content inside WC banner */
.wel-notice__body {
    margin: 0;
    padding: 0;
}

.wel-notice__title {
    margin: 0 0 4px !important;
    padding: 0 !important;
    color: #2f2f2f !important;
    font-size: 0.875em !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
}

.wel-notice__text {
    margin: 0 !important;
    padding: 0 !important;
    color: #505050 !important;
    font-size: 0.875em !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
}

.wel-notice__badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(204, 24, 24, 0.1);
    color: #cc1818;
    font-size: 0.85em;
    font-weight: 600;
}

.wel-notice__link {
    color: #cc1818 !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
}

.wel-notice__link:hover {
    opacity: 0.85 !important;
}

/* Dark checkout — override WC / theme light pink banners.
 * CartFlows funnel CSS uses `#order #wcf-embed-checkout-form p|span|a { color:… !important }`,
 * so dark notice text/link/badge rules must match that ID specificity.
 */
body.wel-dark-checkout .wc-block-components-notice-banner.is-error,
body.wel-dark-checkout .woocommerce-notices-wrapper .woocommerce-error,
body.wel-dark-checkout .woocommerce-NoticeGroup .woocommerce-error,
body.wel-dark-checkout form.checkout .woocommerce-error,
body.wel-dark-checkout .woocommerce-checkout .woocommerce-error,
body.wel-dark-checkout .wcf-embed-checkout-form .woocommerce-error,
body.wel-dark-checkout #wcf-embed-checkout-form .woocommerce-error,
body.wel-dark-checkout #order #wcf-embed-checkout-form .woocommerce-error,
body.wel-dark-checkout #order #wcf-embed-checkout-form ul.woocommerce-error {
    background-color: #1f1414 !important;
    border: 1px solid #cc1818 !important;
    border-style: solid !important;
    color: #f5f5f5 !important;
}

body.wel-dark-checkout .wc-block-components-notice-banner.is-error .wel-notice__title,
body.wel-dark-checkout .woocommerce-error .wel-notice__title,
body.wel-dark-checkout .woocommerce-error .wel-notice__body .wel-notice__title,
body.wel-dark-checkout #order #wcf-embed-checkout-form .woocommerce-error .wel-notice__title,
body.wel-dark-checkout #order #wcf-embed-checkout-form .woocommerce-error p.wel-notice__title {
    color: #fafafa !important;
}

body.wel-dark-checkout .wc-block-components-notice-banner.is-error .wel-notice__text,
body.wel-dark-checkout .woocommerce-error .wel-notice__text,
body.wel-dark-checkout .woocommerce-error .wel-notice__body .wel-notice__text,
body.wel-dark-checkout .woocommerce-error > li,
body.wel-dark-checkout #order #wcf-embed-checkout-form .woocommerce-error .wel-notice__text,
body.wel-dark-checkout #order #wcf-embed-checkout-form .woocommerce-error p.wel-notice__text,
body.wel-dark-checkout #order #wcf-embed-checkout-form .woocommerce-error li {
    color: #e5e5e5 !important;
}

body.wel-dark-checkout .wc-block-components-notice-banner.is-error .wel-notice__link,
body.wel-dark-checkout .woocommerce-error .wel-notice__link,
body.wel-dark-checkout .woocommerce-error a.wel-notice__link,
body.wel-dark-checkout .woocommerce-error .wel-notice__body a.wel-notice__link,
body.wel-dark-checkout .woocommerce-error .wel-notice__text a,
body.wel-dark-checkout #order #wcf-embed-checkout-form .woocommerce-error a.wel-notice__link,
body.wel-dark-checkout #order #wcf-embed-checkout-form .woocommerce-error .wel-notice__text a {
    color: #fca5a5 !important;
}

body.wel-dark-checkout .wc-block-components-notice-banner.is-error .wel-notice__badge,
body.wel-dark-checkout .woocommerce-error .wel-notice__badge,
body.wel-dark-checkout .woocommerce-error .wel-notice__body .wel-notice__badge,
body.wel-dark-checkout .woocommerce-error .wel-notice__text .wel-notice__badge,
body.wel-dark-checkout #order #wcf-embed-checkout-form .woocommerce-error .wel-notice__badge,
body.wel-dark-checkout #order #wcf-embed-checkout-form .woocommerce-error span.wel-notice__badge {
    background: rgba(204, 24, 24, 0.28) !important;
    color: #fecaca !important;
}

/* ── Classic woocommerce-error list (wrapper + CartFlows NoticeGroup) ── */
.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-NoticeGroup .woocommerce-error {
    list-style: none !important;
    margin: 0 0 16px !important;
    padding: 16px !important;
    border: 1px solid #cc1818 !important;
    border-radius: 4px !important;
    background-color: #fff0f0 !important;
    color: #2f2f2f !important;
}

.woocommerce-notices-wrapper .woocommerce-error > li,
.woocommerce-NoticeGroup .woocommerce-error > li {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: inherit !important;
    font-size: 0.875em !important;
    line-height: 1.5 !important;
    list-style: none !important;
}

.woocommerce-notices-wrapper .woocommerce-error > li::before,
.woocommerce-notices-wrapper .woocommerce-error > li::after,
.woocommerce-NoticeGroup .woocommerce-error > li::before,
.woocommerce-NoticeGroup .woocommerce-error > li::after {
    display: none !important;
    content: none !important;
}

body.wel-dark-checkout .woocommerce-notices-wrapper .woocommerce-error > li,
body.wel-dark-checkout .woocommerce-NoticeGroup .woocommerce-error > li,
body.wel-dark-checkout form.checkout .woocommerce-error > li,
body.wel-dark-checkout .woocommerce-checkout .woocommerce-error > li,
body.wel-dark-checkout .wcf-embed-checkout-form .woocommerce-error > li {
    background: transparent !important;
    border: none !important;
    color: #e5e5e5 !important;
}

/* Hide legacy custom alert shell if cached HTML still has it */
.wel-checkout-alert {
    display: contents !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
}

.wel-checkout-alert__icon,
.wel-checkout-alert__close {
    display: none !important;
}

.wel-checkout-alert__content,
.wel-checkout-alert__body {
    display: block !important;
}

@media (max-width: 480px) {
    .wc-block-components-notice-banner.is-error,
    .woocommerce-notices-wrapper .woocommerce-error > li {
        padding: 12px !important;
    }
}
