/* --- MaiThai Cart Count badge ---
   Targets the Elementor Icon widget specifically to avoid side-effects
   on other widgets. The badge is absolutely positioned top-right of the
   icon wrapper, so it visually overlays the icon.
-------------------------------------------------- */

/* Allow the badge to bleed outside the widget boundaries */
.elementor-widget-icon .elementor-widget-container,
.elementor-widget-icon .elementor-icon-wrapper {
    overflow: visible !important;
}

/* The icon wrapper is the positioning parent for the badge */
.elementor-widget-icon .elementor-icon-wrapper {
    position: relative !important;
}

/* The badge itself */
.maithai-cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: var(--e-global-color-accent, #612D76);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    box-sizing: border-box;
    pointer-events: none;
    z-index: 100;
    font-style: normal;
    font-family: var(--e-global-typography-text-font-family, sans-serif);
    transition: transform 0.2s ease;
}

.maithai-cart-badge[data-count="0"] {
    display: none;
}

/* Shortcode wrapper */
.maithai-cart-count-wrap {
    position: relative;
    display: inline-block;
    overflow: visible;
}

@keyframes maithai-cart-pulse {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.maithai-cart-badge--pulse {
    animation: maithai-cart-pulse 0.4s ease;
}
