/* ===== VL AJAX Cart ===== */

/* Loading state ant Add to Cart mygtuko */
.single_add_to_cart_button.vl-loading,
button.vl-loading {
    opacity: 0.7;
    cursor: wait !important;
    pointer-events: none;
    position: relative;
}

.single_add_to_cart_button.vl-loading::after,
button.vl-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 12px;
    margin-top: -8px;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: vlSpin 0.7s linear infinite;
}

@keyframes vlSpin {
    to { transform: rotate(360deg); }
}

/* Added state — žaliai blyksteli */
.single_add_to_cart_button.added {
    background: #43A047 !important;
    transition: background 0.3s;
}

/* ===== Toast pranešimas ===== */
.vl-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 16px 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 280px;
    max-width: 360px;
    z-index: 99999;
    transform: translateX(420px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.vl-toast--visible {
    transform: translateX(0);
    opacity: 1;
}

.vl-toast__icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vl-toast--success .vl-toast__icon {
    background: #E8F5E9;
    color: #43A047;
}

.vl-toast--error .vl-toast__icon {
    background: #FFEBEE;
    color: #E53935;
}

.vl-toast__content {
    flex: 1;
    min-width: 0;
    padding-top: 4px;
}

.vl-toast__message {
    font-size: 15px;
    font-weight: 600;
    color: #2D3142;
    line-height: 1.3;
    margin-bottom: 4px;
}

.vl-toast__link {
    font-size: 13px;
    color: #4A54C6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.vl-toast__link:hover {
    color: #3A43A8;
    text-decoration: underline;
}

.vl-toast__close {
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    color: #9298AD;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: color 0.2s;
}

.vl-toast__close:hover {
    color: #2D3142;
}

/* Slepiame standartinius WooCommerce wc-forward / „Žiūrėti krepšelį" linkus
   single produkto puslapyje (kad nesikartotų su toast) */
.single-product .woocommerce-message,
.single-product .woocommerce-notices-wrapper:has(.wc-forward) {
    display: none !important;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .vl-toast {
        top: auto;
        bottom: 20px;
        left: 16px;
        right: 16px;
        min-width: 0;
        max-width: none;
        transform: translateY(120px);
    }

    .vl-toast--visible {
        transform: translateY(0);
    }
}
