/* ═══════════════════════════════════════════════════════════════════════
   WooCommerce Notices — Dina Theme
   Covers: .woocommerce-notices-wrapper, .woocommerce-message,
           .woocommerce-error, .woocommerce-info
   ═══════════════════════════════════════════════════════════════════════ */

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

/* ── Base notice ─────────────────────────────────────────────────────── */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info,
ul.woocommerce-message,
ul.woocommerce-error,
ul.woocommerce-info {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 11px 14px !important;
    margin: 0 0 10px 0 !important;
    border-radius: var(--radius-md) !important;
    border: none !important;
    border-left: 3px solid transparent !important;
    font-family: var(--font-body, 'Inter', sans-serif) !important;
    font-size: 0.82rem !important;
    line-height: 1.4 !important;
    list-style: none !important;
    animation: ostore-notice-in 0.2s ease forwards;
    position: relative;
}

@keyframes ostore-notice-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Success / Message ───────────────────────────────────────────────── */
.woocommerce-message,
ul.woocommerce-message {
    background: #f0faf4 !important;
    border-left-color: #22a05a !important;
    color: #1a6640 !important;
}

.woocommerce-message::before,
ul.woocommerce-message::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 1px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2322a05a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

/* ── Error ───────────────────────────────────────────────────────────── */
.woocommerce-error,
ul.woocommerce-error {
    background: #fff5f5 !important;
    border-left-color: var(--color-primary, var(--color-sale)) !important;
    color: #991111 !important;
}

.woocommerce-error::before,
ul.woocommerce-error::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 1px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23cc0000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

/* ── Info ────────────────────────────────────────────────────────────── */
.woocommerce-info,
ul.woocommerce-info {
    background: #f0f6ff !important;
    border-left-color: #3b82f6 !important;
    color: #1d4ed8 !important;
}

.woocommerce-info::before,
ul.woocommerce-info::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 1px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

/* ── Notice list items ───────────────────────────────────────────────── */
.woocommerce-error li,
ul.woocommerce-error li {
    margin: 0 !important;
    padding: 2px 0 !important;
    list-style: none !important;
}

/* ── Notice links & buttons inside notices ───────────────────────────── */
.woocommerce-message a,
.woocommerce-error a,
.woocommerce-info a {
    font-weight: 600 !important;
    text-decoration: underline !important;
    color: inherit !important;
    opacity: 0.9;
}

.woocommerce-message a:hover,
.woocommerce-error a:hover,
.woocommerce-info a:hover {
    opacity: 1;
}

/* CTA button inside notices (e.g. "View cart") */
.woocommerce-message .button,
.woocommerce-info .button {
    margin-left: auto !important;
    flex-shrink: 0 !important;
    height: 28px !important;
    padding: 0 12px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    font-family: var(--font-body, 'Inter', sans-serif) !important;
    border-radius: var(--radius-sm) !important;
    border: none !important;
    background: #22a05a !important;
    color: #fff !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    text-decoration: none !important;
    transition: background 0.15s ease !important;
    white-space: nowrap !important;
}

.woocommerce-message .button:hover,
.woocommerce-info .button:hover {
    background: #1a7a45 !important;
    opacity: 1 !important;
}

.woocommerce-error .button {
    background: var(--color-primary, var(--color-sale)) !important;
    color: #fff !important;
}

.woocommerce-error .button:hover {
    background: var(--color-primary-hover) !important;
}

/* ── Mobile ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .woocommerce-message,
    .woocommerce-error,
    .woocommerce-info,
    ul.woocommerce-message,
    ul.woocommerce-error,
    ul.woocommerce-info {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .woocommerce-message .button,
    .woocommerce-error .button,
    .woocommerce-info .button {
        width: 100% !important;
        justify-content: center !important;
    }
}
