/*
 * Hamza Efendi — Classic WooCommerce notices
 * Global presentation for WooCommerce's three classic notice types only.
 * Typography and link/button styling inherit the active Impreza theme.
 * WooCommerce Blocks notices are intentionally out of scope.
 */

:root {
    --he-wc-notice-radius: 0.65rem;
    --he-wc-notice-success-bg: #edf7ee;
    --he-wc-notice-success-border: #6fa879;
    --he-wc-notice-info-bg: #f7f0de;
    --he-wc-notice-info-border: #c4a64e;
    --he-wc-notice-error-bg: #fbe8e6;
    --he-wc-notice-error-border: #d9746c;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    position: relative;
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 1rem !important;
    padding: 0.9rem 1.05rem !important;
    border: 1px solid transparent !important;
    border-left-width: 4px !important;
    border-radius: var(--he-wc-notice-radius) !important;
    box-shadow: none !important;
    color: var(--color-content-text, inherit) !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: 1.5 !important;
    list-style: none !important;
}

/* WooCommerce may programmatically focus a notice after reload/AJAX.
 * Impreza's generic focus ring must not turn the whole notice into a gold outlined control.
 */
.woocommerce-message:focus,
.woocommerce-info:focus,
.woocommerce-error:focus,
.woocommerce-message:focus-visible,
.woocommerce-info:focus-visible,
.woocommerce-error:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
    display: none !important;
    content: none !important;
}

.woocommerce-message {
    background: var(--he-wc-notice-success-bg) !important;
    border-color: var(--he-wc-notice-success-border) !important;
}

.woocommerce-info {
    background: var(--he-wc-notice-info-bg) !important;
    border-color: var(--he-wc-notice-info-border) !important;
}

.woocommerce-error {
    background: var(--he-wc-notice-error-bg) !important;
    border-color: var(--he-wc-notice-error-border) !important;
}

ul.woocommerce-error,
ul.woocommerce-message,
ul.woocommerce-info {
    padding-left: 1.05rem !important;
}

.woocommerce-error li,
.woocommerce-message li,
.woocommerce-info li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.woocommerce-error li + li,
.woocommerce-message li + li,
.woocommerce-info li + li {
    margin-top: 0.45rem !important;
}

.woocommerce-message a:not(.button),
.woocommerce-info a:not(.button),
.woocommerce-error a:not(.button) {
    color: var(--color-content-link, currentColor) !important;
    font-weight: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.woocommerce-message a.button,
.woocommerce-info a.button,
.woocommerce-error a.button {
    margin-top: -0.15rem;
    margin-bottom: -0.15rem;
}

/* Add-to-cart forward link is intentionally a clear text action, not a second button. */
.woocommerce-message a.wc-forward {
    float: none !important;
    display: inline-flex !important;
    align-items: baseline;
    gap: 0.2em;
    min-height: 0 !important;
    margin: 0 0 0 0.4em !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
    color: var(--color-content-link, currentColor) !important;
    font: inherit !important;
    font-weight: 600 !important;
    line-height: inherit !important;
    text-decoration: underline !important;
    text-decoration-thickness: 1px !important;
    text-underline-offset: 2px !important;
    vertical-align: baseline;
}

.woocommerce-message a.wc-forward::after {
    content: "→";
    display: inline-block;
    text-decoration: none;
}

.woocommerce-message a.wc-forward:hover {
    opacity: 0.78;
}

/* Product-page add-to-cart notice must not touch the quantity/add-to-cart controls above it. */
.single-product .woocommerce-message {
    margin-top: 0.8rem !important;
}

@media (max-width: 600px) {
    .woocommerce-message,
    .woocommerce-info,
    .woocommerce-error {
        padding: 0.8rem 0.9rem !important;
        border-left-width: 3px !important;
    }

    .woocommerce-message a.button:not(.wc-forward),
    .woocommerce-info a.button,
    .woocommerce-error a.button {
        float: none !important;
        display: inline-flex !important;
        margin: 0.6rem 0 0 !important;
    }

    .woocommerce-message a.wc-forward {
        margin-left: 0.35em !important;
    }
}
