/**
 * AdvancedWoo — Grid Cart Badge + Modal Styles
 *
 * Cart badge appears on product cards when product is in the cart.
 * Cart modal is created dynamically by grid-cart.js.
 *
 * @package AdvancedWoo
 * @since   1.6.0
 */

/* ── Cart Badge (top-right of card image) ──────────────────── */
.awoo-cart-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--awoo-incart-color, #43a047);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    z-index: 3;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.awoo-cart-badge:hover {
    transform: scale(1.1);
    background: #2e7d32;
}
.awoo-cart-badge svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* ── Button loading state ──────────────────────────────────── */
.awoo-btn-group.awoo-loading {
    opacity: 0.6;
    pointer-events: none;
}
.awoo-btn-group.awoo-loading .awoo-btn::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    margin-left: 6px;
    animation: awoo-spinner 0.6s linear infinite;
}
@keyframes awoo-spinner {
    to { transform: rotate(360deg); }
}

/* ── Cart Modal overrides ──────────────────────────────────── */
.awoo-cart-modal .uk-modal-dialog {
    border-radius: 12px;
    overflow: hidden;
}
.awoo-cart-modal .uk-modal-header {
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
}
.awoo-cart-modal .uk-modal-footer {
    background: #f9f9f9;
    border-top: 2px solid #eee;
}
.awoo-modal-item:last-child {
    border-bottom: none !important;
}
.awoo-modal-item img {
    border-radius: 4px;
}
.awoo-modal-remove:hover {
    color: #e53935 !important;
}
.awoo-modal-qty-btn:hover {
    background: #e0e0e0 !important;
}

/* ── Disabled checkout button ───────────────────────────────── */
.awoo-btn-disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 639px) {
    .awoo-cart-modal .uk-modal-dialog {
        margin: 10px;
    }
    .awoo-modal-item {
        flex-wrap: wrap;
    }
}
