/* Стили для новой системы корзины */

/* Индикатор загрузки для количества */

.item-quantity.updating {
  opacity: 0.6;
  pointer-events: none;
}

.item-quantity.updating::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #333;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Индикатор ошибки для количества */
.item-quantity.error {
  background-color: #ffe6e6;
  border-color: #ff6b6b;
}

/* Анимация вращения */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Состояние удаления товара */
.cart-item.removing {
  opacity: 0.5;
  pointer-events: none;
}

/* Стили для сообщений об ошибках */
.cart-error-message {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #dc3545;
  color: white;
  padding: 12px 20px;
  border-radius: 4px;
  z-index: 10000;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cart-error-message.show {
  opacity: 1;
}

/* Анимация добавления товара */
.cart-item.new-item {
  animation: slideInCart 0.3s ease;
}

@keyframes slideInCart {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
