/**
 * AJAX Add to Cart Styling
 */

/* Loading button state */
.single_add_to_cart_button.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.single_add_to_cart_button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: krokus-spin 0.8s linear infinite;
}

@keyframes krokus-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Dark button variant */
.single_add_to_cart_button.alt.loading::after {
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: #000;
}
/* Success notification styling */
.krokus-add-to-cart-success {
    display: flex;
    align-items: center;
    background-color: #f0fdf4;
    border: 1px solid #22c55e;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
    max-width: 1170px;
    width: calc(100% - 40px);
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.krokus-add-to-cart-success::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    background-color: #22c55e;
    color: white;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    margin-right: 12px;
}

.krokus-success-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.krokus-success-content strong {
    color: #20201f;
    font-weight: 500;
    font-size: 16px;
    margin: 0;
}

.krokus-success-content a {
    color: #20201f;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
}

.krokus-success-content a:hover {
    color: #20201f;
    text-decoration: underline;
}