/* استایل اختصاصی و مدرن پیام‌های ووکامرس (با آیکون‌های SVG داخلی) */

.woocommerce-notices-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* --- تنظیمات کلی باکس‌ها --- */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    background-color: #fff !important;
    border-radius: 16px !important;
    /* گوشه‌های گردتر */
    padding: 16px 24px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    font-family: inherit !important;
    position: relative !important;
    overflow: hidden !important;
    border: 1px solid transparent !important;
    width: 100% !important;
    box-sizing: border-box !important;
    color: #4b5563 !important;
    /* رنگ متن خاکستری تیره */
    list-style: none !important;
    line-height: 1.8 !important;
}

/* حذف بولت پوینت‌های لیست خطا */
.woocommerce-error li {
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
}

/* --- 1. پیام موفقیت (سبز) --- */
.woocommerce-message {
    border: 1px solid #d1fae5 !important;
    border-right: 6px solid #10b981 !important;
    background-color: #f0fdf4 !important;
    /* پس‌زمینه خیلی روشن */
}

/* آیکون چک (SVG) */
.woocommerce-message::before {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    margin-left: 15px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%2310b981' d='M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm113.1 199L241 335c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    flex-shrink: 0;
}

/* --- 2. پیام خطا (قرمز) --- */
.woocommerce-error {
    border: 1px solid #fee2e2 !important;
    border-right: 6px solid #ef4444 !important;
    background-color: #fef2f2 !important;
    color: #991b1b !important;
}

/* آیکون ضربدر (SVG) */
.woocommerce-error::before {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    margin-left: 15px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23ef4444' d='M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L256 265.9 168.3 353.6c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9L222.1 232 134.4 144.3c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0L256 198.1l87.7-87.7c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L289.9 232l87.7 87.7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    flex-shrink: 0;
}

/* --- 3. پیام اطلاعات (آبی) --- */
.woocommerce-info {
    border: 1px solid #dbeafe !important;
    border-right: 6px solid #3b82f6 !important;
    background-color: #eff6ff !important;
    color: #1e40af !important;
}

/* آیکون اطلاعات (SVG) */
.woocommerce-info::before {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    margin-left: 15px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%233b82f6' d='M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    flex-shrink: 0;
}

/* --- دکمه "مشاهده سبد خرید" --- */
.woocommerce-message .button.wc-forward,
.woocommerce-error .button.wc-forward,
.woocommerce-info .button.wc-forward {
    background-color: #415B6C !important;
    color: #fff !important;
    border-radius: 12px !important;
    padding: 10px 24px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 12px rgba(65, 91, 108, 0.25) !important;
    margin: 0 !important;

    /* قرارگیری دکمه در سمت چپ */
    margin-right: auto !important;
    float: none !important;
    order: 2;
    /* در انتهای فلکس */
}

.woocommerce-message .button.wc-forward:hover {
    background-color: #2c3e4a !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(65, 91, 108, 0.35) !important;
}

/* آیکون سبد خرید داخل دکمه (SVG) */
.woocommerce-message .button.wc-forward::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'%3E%3Cpath fill='%23ffffff' d='M0 24C0 10.7 10.7 0 24 0H69.5c22 0 41.5 12.8 50.6 32h411c26.3 0 45.5 25 38.6 50.4l-41 152.3c-8.5 31.4-37 53.3-69.5 53.3H170.7l5.4 28.5c2.2 11.3 12.1 19.5 23.6 19.5H488c13.3 0 24 10.7 24 24s-10.7 24-24 24H199.7c-34.6 0-64.3-24.6-70.7-58.5L77.4 54.5c-.7-3.8-4-6.5-7.9-6.5H24C10.7 48 0 37.3 0 24zM128 464a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm336-48a48 48 0 1 1 0 96 48 48 0 1 1 0-96z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* --- ریسپانسیو (موبایل) --- */
@media (max-width: 768px) {

    .woocommerce-message,
    .woocommerce-error,
    .woocommerce-info {
        flex-direction: column !important;
        align-items: flex-start !important;
        text-align: right !important;
        padding: 20px !important;
    }

    .woocommerce-message::before,
    .woocommerce-error::before,
    .woocommerce-info::before {
        margin-left: 0 !important;
        margin-bottom: 15px !important;
        width: 30px;
        height: 30px;
    }

    .woocommerce-message .button.wc-forward,
    .woocommerce-error .button.wc-forward,
    .woocommerce-info .button.wc-forward {
        width: 100% !important;
        margin-right: 0 !important;
        margin-top: 15px !important;
        text-align: center !important;
    }
}