/* ==========================================================================
   WOOCOMMERCE NOTICES (global)
   Inline messages shown after WC actions (cart updated, coupon applied, etc.)
   ========================================================================== */

.woocommerce-notices-wrapper {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 16px var(--container-padding) 0;
}

.woocommerce-notices-wrapper:empty {
    padding: 0;
    margin: 0;
}

/* --- Base notice styling (success / info / error share the layout) --- */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    position: relative;
    list-style: none;
    background: var(--color-white);
    color: var(--color-black);
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 15px;
    line-height: 1.5;
    padding: 16px 20px 16px 56px;
    margin: 0 0 16px;
    border: 1px solid #E6E6E6;
    border-left-width: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* Override WC default ::before glyph — replace with our own circular icon */
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    color: var(--color-white);
}

/* --- Variant: success (Koszyk zaktualizowany, kupon dodany) --- */
.woocommerce-message {
    border-left-color: #2E7D32;
}

.woocommerce-message::before {
    content: '\2713';
    background: #2E7D32;
}

/* --- Variant: info (np. minimum order, shipping calculator) --- */
.woocommerce-info {
    border-left-color: var(--color-red);
}

.woocommerce-info::before {
    content: 'i';
    font-family: Georgia, serif;
    font-style: italic;
    background: var(--color-red);
}

/* --- Variant: error (kupon nieprawidlowy itp.) --- */
.woocommerce-error {
    border-left-color: #C62828;
    color: #5C1F1F;
}

.woocommerce-error::before {
    content: '!';
    background: #C62828;
}

.woocommerce-error li {
    list-style: none;
    margin: 0;
}

/* --- Links inside notices --- */
.woocommerce-message a,
.woocommerce-info a,
.woocommerce-error a {
    color: var(--color-red);
    font-weight: 500;
    text-decoration: none;
    transition: opacity var(--transition);
}

.woocommerce-message a:hover,
.woocommerce-info a:hover,
.woocommerce-error a:hover {
    opacity: 0.7;
    text-decoration: underline;
}

/* --- Restore-item / Return-to-shop button styling inside notices --- */
.woocommerce-message .button,
.woocommerce-message .restore-item {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 18px;
    background: var(--color-black);
    color: var(--color-white);
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    border-radius: 100px;
    transition: opacity var(--transition);
    margin-left: auto;
    white-space: nowrap;
}

.woocommerce-message .button:hover,
.woocommerce-message .restore-item:hover {
    opacity: 0.85;
    color: var(--color-white);
    text-decoration: none;
}

/* --- Mobile --- */
@media (max-width: 768px) {
    .woocommerce-notices-wrapper {
        padding: 12px var(--container-padding) 0;
    }

    .woocommerce-message,
    .woocommerce-info,
    .woocommerce-error {
        font-size: 14px;
        padding: 14px 16px 14px 50px;
        gap: 8px;
    }

    .woocommerce-message::before,
    .woocommerce-info::before,
    .woocommerce-error::before {
        width: 24px;
        height: 24px;
        font-size: 14px;
        left: 14px;
    }

    .woocommerce-message .button,
    .woocommerce-message .restore-item {
        margin-left: 0;
        height: 34px;
        font-size: 12px;
    }
}
