/* Cart Block Styles */
.komandel-cart-block {
  position: relative;
}

.komandel-cart-block.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.komandel-cart-block.is-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.cart-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.cart-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.cart-header-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  background: #ef4444;
  color: white;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
}

.cart-total-quantity {
  font-size: 0.875rem;
  color: #6b7280;
}

.cart-block-content {
  padding: 1rem;
  max-height: 400px;
  overflow-y: auto;
}

.cart-items-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cart-block-footer {
  padding: 1rem;
  border-top: 1px solid #e5e7eb;
}

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.cart-total-amount,
.cart-subtotal-amount {
  color: #1e40af;
}

.cart-actions {
  display: flex;
  gap: 0.5rem;
}

.cart-actions .button {
  flex: 1;
  text-align: center;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.button-primary {
  background: #1e40af;
  color: white;
}

.button-primary:hover {
  background: #1e3a8a;
  color: white;
}

.button-secondary {
  background: #f3f4f6;
  color: #374151;
}

.button-secondary:hover {
  background: #e5e7eb;
  color: #374151;
}

.cart-block-empty {
  padding: 3rem 1rem;
  text-align: center;
  color: #9ca3af;
}

.empty-cart-icon {
  margin-bottom: 1rem;
}

.empty-cart-icon svg {
  opacity: 0.3;
  margin: 0 auto;
}

.empty-message {
  font-size: 0.875rem;
  margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .cart-block-content {
    max-height: 300px;
  }
  
  .cart-actions {
    flex-direction: column;
  }
  
  .cart-actions .button {
    width: 100%;
  }
}
