/**
 * Deal of the Day - Frontend Notices Styling
 */

/* Compact pill centred under the category title. It never gets wider than
   the category image (1200px); before, it ran over the full menu width. */
.deal-notice {
    --deal-accent: var(--wp--preset--color--primary, #c86200);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
    width: fit-content;
    max-width: min(1200px, 100%);
    margin: 14px auto 22px;
    padding: 9px 18px 9px 10px;
    border: 1px solid color-mix(in srgb, var(--deal-accent) 22%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--deal-accent) 8%, #fff);
    color: #333;
    font-size: 15px;
    line-height: 1.35;
    text-align: left;
    box-shadow: none;
}

/* Percent badge icon */
.deal-notice::before {
    content: "";
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M7 17 17 7'/%3E%3Ccircle cx='7.5' cy='7.5' r='1.6'/%3E%3Ccircle cx='16.5' cy='16.5' r='1.6'/%3E%3C/svg%3E") center / 16px 16px no-repeat,
        var(--deal-accent);
}

.deal-notice strong {
    font-weight: 700;
    color: var(--deal-accent) !important;
}

@media (max-width: 600px) {
    .deal-notice {
        width: auto;
        margin: 12px 0 18px;
        padding: 9px 14px 9px 9px;
        border-radius: 16px;
        font-size: 14px;
    }
}

/* Pulsating effect for highlighted products */
@keyframes bringmal-deal-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

.wc-restaurant-menu-product.bringmal-deal-highlight .wc-restaurant-menu-product-inner.add {
    animation: bringmal-deal-pulse 1.5s infinite;
    position: relative;
    z-index: 1;
}
