/* WooCommerce Notices */
.woocommerce {
    .woocommerce-error,
    .woocommerce-info,
    .woocommerce-message {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin: 0 0 1.5rem;
        padding: 1rem 1.25rem;
        border: 1px solid transparent;
        border-radius: 0.5rem;
        font-size: 0.875rem;
        line-height: 1.5;
        position: relative;
        word-wrap: break-word;
        list-style: none;
        background-color: #ffffff;
        box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1),
            0 1px 2px 0 rgba(0, 0, 0, 0.06);

        &::before {
            content: "";
            position: relative;
            top: 0;
            left: 0;
            width: 1.25rem;
            height: 1.25rem;
            background-size: contain;
            background-repeat: no-repeat;
            background-position: center;
        }

        a {
            &:not(.button) {
                color: inherit;
                text-decoration: underline;
                text-underline-offset: 2px;
                transition: opacity 0.2s ease;

                &:hover {
                    opacity: 0.8;
                }
            }

            &.button,
            &.wc-forward {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                float: none;
                margin-left: auto;
                padding: 0.5rem 1rem;
                background-color: var(--digi-crimson);
                color: #ffffff;
                text-decoration: none;
                border-radius: 0.375rem;
                font-weight: 500;
                font-size: 0.875rem;
                transition: all 0.2s ease;
                border: none;
                cursor: pointer;

                &:hover {
                    background-color: var(--digi-ruby);
                    color: #ffffff;
                    transform: translateY(-1px);
                }
            }
        }

        li {
            margin: 0;
            padding: 0;
            list-style: none;

            &:not(:last-child) {
                margin-bottom: 0.5rem;
            }
        }
    }
}

/* Success Messages */
.woocommerce .woocommerce-message {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d;

    &::before {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2315803d'%3E%3Cpath fill-rule='evenodd' d='M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.236 4.53L7.53 10.06a.75.75 0 00-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z' clip-rule='evenodd'/%3E%3C/svg%3E");
    }

    a.button,
    a.wc-forward {
        background-color: #16a34a;

        &:hover {
            background-color: #15803d;
        }

        &:focus {
            outline-color: #16a34a;
        }
    }
}

/* Error Messages */
.woocommerce .woocommerce-error {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;

    &::before {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23dc2626'%3E%3Cpath fill-rule='evenodd' d='M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z' clip-rule='evenodd'/%3E%3C/svg%3E");
    }

    a.button,
    a.wc-forward {
        background-color: #ef4444;

        &:hover {
            background-color: #dc2626;
        }

        &:focus {
            outline-color: #ef4444;
        }
    }
}

/* Info Messages */
.woocommerce .woocommerce-info {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;

    &::before {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%231d4ed8'%3E%3Cpath fill-rule='evenodd' d='M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z' clip-rule='evenodd'/%3E%3C/svg%3E");
    }

    a.button,
    a.wc-forward {
        background-color: #3b82f6;

        &:hover {
            background-color: #1d4ed8;
        }

        &:focus {
            outline-color: #3b82f6;
        }
    }
}
